10-14-2008
To answer your questions, yes it is possible for short-lived processes to never show up. In fact it is very unlikely that a short lived process will show up in ps or top. Those programs read the process table with techniques that are almost as fast as a memory to memory data move. Once they have this snapshot, they prepare a report. top repeats this every n seconds, but top presents you with a program...it does not want to show all processes, just the "top" ones. You have a better shot with ps. A short-lived process can be gone in well under a tenth of a second.... let's say that yours is lasting exactly one tenth of a second... That means that ps must capture a process table snapshot sometime during that tenth of a second. This is very hard to arrange in a reliable fashion. A very clever wrapper program that runs both ps and your program nearly simultaneously might be able to do it.
But if the program shows up in glance but not ps/top, I tend to suspect something else. It could be that the program is destroying it's command line. You might try: ps -el and see if it shows up.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
When I run the top command, it shows 1 process as being Stopped. This is not a zombie, but simply a stopped process. Unfortunately, I can't figure out how to tell which process this is, nor why it is in a stopped state? Any way of finding this out? (7 Replies)
Discussion started by: IrishRogue
7 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have an oracle process running on top for a week now, but I couldnt see the same process with in oracle. how do I know what this process is?
-GK
P.S: when I say i didn't see within oracle, what I mean is I didn't see this process through oracle utility which shows all the oracle process (1 Reply)
Discussion started by: caprikar
1 Replies
3. Shell Programming and Scripting
Hi, what I want to do is get the SIZE of a particular process from top into a shell script so I can put it in a while loop. I want to display a warning message when the process size gets up to a certain amount, but I don't know how to get that one line spit out from Top and thrown into my shell... (5 Replies)
Discussion started by: satraver
5 Replies
4. UNIX for Advanced & Expert Users
Hi,
top process is shows like this in solaris server oracle 8i running:
load averages: 5.01, 3.35, 2.82 18:24:45
344 processes: 332 sleeping, 5 running, 2 stopped, 5 on cpu
CPU states: 22.2% idle, 29.6% user, 14.7% kernel, 33.5% iowait, 0.0% swap... (3 Replies)
Discussion started by: prakash.gr
3 Replies
5. Shell Programming and Scripting
Hi,
I have written a script to monitor a Process with the help of top command. This is my script.
======================
#!/bin/sh
DATE=`date +%Y%m%d%H%M%S`
HOME=/home/xmp/testing/xmp_report
RADIUS_PID=`xms -xmp sh pr | grep "RADIUS.iamsp02ldv" |awk '{ print $3 }'`
PSE_PID=`xms -xmp sh... (5 Replies)
Discussion started by: Siddheshk
5 Replies
6. Shell Programming and Scripting
i have edited a script to kill an exact mysql process is causing the high load on the server, my problem is, kill dont kill it!
script:
#!/bin/sh
top -n 1 -u mysql | grep mysqld | awk '{print $1}' > pid
proc='cat pid'
kill -9 $proc
or i try with
kill -9 `top -n 1 -u mysql | grep mysqld... (8 Replies)
Discussion started by: chandro
8 Replies
7. Red Hat
I wanted to know how to find the memory taken by a process using top command. The output of the top command is as follows as an example:
Mem: 13333364k total, 13238904k used, 94460k free, 623640k buffers
Swap: 25165816k total, 112k used, 25165704k free, 4572904k cached
PID USER ... (6 Replies)
Discussion started by: RHCE
6 Replies
8. Shell Programming and Scripting
Hello, on my openvz server, i can output load averages of containers:
Code:
# vzlist -o laverage,ctid -H
0.00/0.00/0.00 130
0.10/0.10/0.10 150
2.26/2.28/2.28 190please which command/script to use so it outputs top 1 or 2 processes on the linux system with 2.26 laverage?
i mean, i want... (1 Reply)
Discussion started by: postcd
1 Replies
9. Shell Programming and Scripting
Hi All,
how to kill 5 top memory used process in my hp-ux.
Thanks,
Kki (9 Replies)
Discussion started by: kki
9 Replies