3
votes
3answers
144 views

Alert when running process finishes

There are a few questions and answers on here with regard to being alerted when a process completes/exits(1, 2) – but these all assume that the user has issued said process themselves, and thus can ...
3
votes
2answers
55 views

CPU percentage of a single process

How do I get the average CPU percentage (for every second) consumed by a single process since it starts until it ends (exists)? Could I make this with Top?
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 ...
3
votes
2answers
67 views

What does it mean exactly when a processes “Time” has stopped in top?

I'll be looking into why we're getting critical swap alerts, and I'll find something like: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND 14683 user1 30 10 16.0g 772m ...
-1
votes
1answer
78 views

Which is the most precise command to get processes and system information? [closed]

I'm trying to evaluate performances of some active processes of mine on linux. Searching the internet I found that ps and top are the only command available for that. More precisely here, it says ...
0
votes
1answer
69 views

Why my cpu spend so much time on system? [closed]

top - 08:58:42 up 20 days, 8:23, 1 user, load average: 67.17, 58.94, 62.75 Tasks: 630 total, 40 running, 524 sleeping, 0 stopped, 66 zombie Cpu(s): 57.3%us, 41.6%sy, 0.0%ni, 0.0%id, 0.0%wa, ...
6
votes
2answers
150 views

Why are there so few “running” processes?

On all of BSD/Linux/MacOS and Solaris, I made an observation - no matter how busy the system is, top always reports very few (usually 1-2) running processes. According to my limited understanding, a ...
5
votes
1answer
183 views

How to monitor top applications using CPU (and IO if possible) in a graph?

I need to find what and when these applications used so much CPU (and IO if possible too). This should be in a graphic timeline like we see in GNOME System Monitor CPU History. I also want to compare ...
1
vote
2answers
971 views

How can I automatically kill the process with the highest CPU load?

Sometimes programs will lock up in the background and cause high CPU usage. Is there any way I can programmatically ascertain which process is causing the highest CPU load at the moment and kill it?
5
votes
3answers
379 views

Determining the particular processor on which a process is running

I have access to an 8-core node of a Linux cluster. When logged in to the node, I can see a list of processors using this command: more /proc/cpuinfo In my 8-core node, the processors are numbered ...
4
votes
2answers
1k views

Why “uninterruptible sleep” is not counted as “IDLE”?

When I run top -bi, where the parameter -i means "ignore idle processes", the resulted list(see below) of processes are either R or D, although there're S processes at that time. So, why ...
0
votes
3answers
4k views

What is the difference between ps and top command?

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?
0
votes
0answers
264 views

Very large values for utime and stime for foo. Is foo still running?

I am running a program foo It has been running for close to 30 days now (even more) Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
1
vote
2answers
3k views

ATOP shows red line vmcom and vmlim. What does it mean?

utility atop shows: ATOP - MyServer 2013/01/07 00:03:57 10 seconds elapsed PRC | sys 2.18s | user 8.33s | #proc 141 | #zombie 0 | #exit 0 | CPU | sys 21% | ...
2
votes
4answers
151 views

How to find out what is this process for?

I have this 'java' process running for 3 hours ( I guess ). I didn't see it before and I wonder how could I find out where it's coming from? Here is a screenshot: EDIT: ok I figured it out, it's ...
2
votes
2answers
1k views

Find the PID of top CPU/MEM usage, save to a shell variable

Is there any way to get the PID of the top CPU/MEM usage, I need to use that in a script, top command doesn't seem to work for it.
3
votes
2answers
746 views

How can I kill the top CPU/IO process quickly?

I find that sometimes my Linux will stop responding, so I need to switch to another terminal with CtrlAltF2, and type a command to kill the top CPU usage process or top IO usage process, so that the ...
0
votes
1answer
969 views

The TIME field in ps -ef

When I do ps -ef, I see "TIME" field. What does this field mean? From what I understand, this tells the actual CPU time, that the process got (amidst all the context switching). Does the TIME field ...
5
votes
2answers
5k views

How to see complete list of processes in top

When I do 'top', I learn that there are many processes running out of which many are in sleep state. I need to see complete snapshot of all processes at that point. the 'top' is able to show listing ...
9
votes
2answers
5k views

How to know reason of a process going to sleep state and wake it up?

When I do 'top' , I see my perl script process in 'S' state. Is there a way to know, what is making this perl process go in sleep state and ways to wake it up? Any way to debug to give more insights ...
1
vote
1answer
129 views

How do you prevent user from opening a program?

I'm trying to write a script which prevents the concerned user from opening programs (mostly internet browsers) from being run during a certain time (like 1000 to 1200 hrs). This is like a ...
1
vote
3answers
5k views

Why is apache2 showing up a defunct in the process list?

When I run top I see one line that doesn't look too good: 2475 www-data 20 0 0 0 0 Z 1 0.0 0:00.19 apache2 <defunct> Why is this process <defunct> and what should I ...
3
votes
2answers
567 views

How is FireFox running on a virtual machine that has no display?

I am using a Red Hat virtual machine, accessible only remotely. However when I use the top command, one of the displayed processes taking up the most memory is firefox, located at ...
1
vote
1answer
622 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?
1
vote
1answer
377 views

Queries about top command

top command shows the process cpu utilization, and it when we sum the cpu utilization of all the processes then it goes greater than 100%. And how can it shows the cpu utilization of each process( ...
18
votes
2answers
5k views

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | ...
8
votes
3answers
3k views

Understanding top and load average

I'm observing a high load average on a certain machine (about 9) in all three load fields. I understand load as the number of processes in state "run" / currently desiring CPU time. Am I correct at ...
3
votes
2answers
948 views

Using top to see processes run by a user on behalf of sudo

If I run top -u username I will see all the processes by a particular user. Is there a way to also see all the processes that the user called via sudo?
25
votes
5answers
47k views

How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
5
votes
2answers
1k views

Number of running processes show in top

The usual maximum number that I have seen in the "running" field displayed in top(1) is the number of logical CPUs installed in the system. However, I have observed that under Ubuntu 10.04 (not ...
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.