Questions tagged [top]
A command-line system monitor tool that produces a frequently-updated list of processes.
496 questions
2 votes
0 answers
33 views
Linux: why is there a CPU% output difference between "top -H -p <pid>" and "mpstat" for CPU-bound multi-thread app?
I'm investigating a difference in behavior of using "top -H -p < pid >" and "mpstat -P ALL 2". My company's app is a multi-threaded process in which we bind each thread to ...
1 vote
1 answer
240 views
How to measure actual CPU utilization in Linux for multi core applications?
I have a computation intensive process that I need to run multiple times on a multi-core processor but "top" isn't showing utilization or load in a useful way. For example, imagine my task ...
2 votes
3 answers
136 views
how to auto wrap top command output
When I use the top command in linux terminal: top -c the output like this: top - 21:54:17 up 197 days, 6:34, 1 user, load average: 0.10, 0.65, 1.47 Tasks: 255 total, 1 running, 200 sleeping, 0 ...
0 votes
1 answer
323 views
Command-line option to disable too many processes in htop
By default, htop shows many more processes than other tools (top, ps). The solution is to press H, as mentionned in Why are there many processes listed under the same title in htop?, to get the "...
7 votes
1 answer
1k views
Understanding top memory bar
I'm trying to switch from using htop to top because a few too many times I have been in servers that don't have the former. When I first type top and enter, the memory usage in shown in MiB: Then I ...
2 votes
5 answers
2k views
Continuously monitor a process and all its children with `top`?
I want to run a process that spawns children, e.g., for i in {1..4}; do sh -c 'echo $$; for j in {1..3}; do sh -c "echo ...\$\$; sleep 1" done' done and I would like to monitor the ...
1 vote
0 answers
23 views
Script/Daemon to kill specific resource-consuming tools?
I'm working on a SGE linux cluster and beginners often run memory/resource consuming tools on the login node instead of using qsub or qlogin ( https://gridscheduler.sourceforge.net/htmlman/htmlman1/...
0 votes
1 answer
76 views
getting %CPU value from top for all cores in a system
I have a 4 socket server having 24 core cpu's. 96 cores total. How can I, in RHEL 7/8 Linux, get the value that is %CPU as shown by top for every core in the system? I plan on writing C code that ...