Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

top-command

What do top %cpu abbreviations mean?

September 11, 2023 by Tarik

In “top” what are us, sy, ni, id, wa, hi, si and st (for CPU usage)? us – user cpu time (or) % CPU time spent in user space sy – system cpu time (or) % CPU time spent in kernel space ni – user nice cpu time (or) % CPU time spent on low … Read more

Categories linux Tags abbreviation, linux, top-command Leave a comment

Inspecting Java threads in Linux using top

July 23, 2023 by Tarik

You can inspect java threads with the tool jstack. It will list the names, stacktraces and other useful information of all threads belonging to the specified process pid. Edit: The parameter nid in the thread dump of jstack is the hex version of the LWP that is displayed by top in the pid column for … Read more

Categories java Tags java, linux, top-command Leave a comment

In Linux, what do all the values in the “top” command mean?

March 2, 2023 by Tarik

The man page says what the state codes are mapped to, but not what they actually mean. From the top man page: ‘D’ = uninterruptible sleep ‘R’ = running ‘S’ = sleeping ‘T’ = traced or stopped ‘Z’ = zombie ‘R’ is the easiest; the process is ready to run, and will run whenever its … Read more

Categories linux Tags command-line, linux, top-command Leave a comment

Limit the output of the TOP command to a specific process name

January 30, 2023 by Tarik

I prefer the following so I can still use top interactively without having to look up the pids each time I run it: top -p `pgrep process-name | tr “\\n” “,” | sed ‘s/,$//’` Of course if the processes change you’ll have to re-run the command. Explanation: pgrep process-name returns a list of process ids … Read more

Categories macos Tags command-line, macos, top-command, unix Leave a comment

top -c command in linux to filter processes listed based on processname

October 20, 2022 by Tarik

Using pgrep to get pid’s of matching command lines: top -c -p $(pgrep -d’,’ -f string_to_match_in_cmd_line) top -p expects a comma separated list of pids so we use -d’,’ in pgrep. The -f flag in pgrep makes it match the command line instead of program name.

Categories linux Tags linux, process, top-command, unix Leave a comment

Network usage top/htop on Linux [closed]

October 2, 2022 by Tarik

NetHogs is probably what you’re looking for: a small ‘net top’ tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there’s suddenly a lot of network traffic, you can fire … Read more

Categories linux Tags htop, linux, networking, top-command Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa