2
votes
2answers
96 views

Is there a way to get “top” to run exactly once and exit?

I find the output of the shell command top to be a simple and familiar way to get a rough idea of the health of a machine. I'd like to serve top's output (or something very similar to it) from a tiny ...
2
votes
1answer
48 views

PBS equivalent of 'top' command: avoid running 'qstat' repeatedly

When I run several jobs on a head node, I like to monitor the progress using the command top. However, when I'm using PBS to run several jobs on a cluster, top will of course not show these jobs, and ...
0
votes
1answer
39 views

get cpu by user

Working with monit I need create an alert that get cpu usage of system users, so: top -b -n 1 -u user1 | awk 'NR>7 { sum += $9; } END { print sum; }' seems a good solution but I'm not sure about ...
0
votes
0answers
21 views

Contradictory information from “top” [duplicate]

As we all know, the top command displays various real-time information about the running system. What I can't figure out is this: top claims that gzip is using 95% CPU. (Not unreasonable, considering ...
1
vote
1answer
625 views

Make top shows only server process

Can I make top show info about the web and db servers? Can it be done by piping the pids to the top? They can be many process from every one?!? Or is there any better method for this?
30
votes
5answers
34k views

How to monitor CPU/memory usage of a single process?

I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.