Unix/Linux Go Back    

Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Understanding the output of TOP

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 07-09-2010
SkySmart SkySmart is offline
Registered User
Join Date: Dec 2006
Last Activity: 26 September 2016, 6:17 PM EDT
Posts: 776
Thanks: 578
Thanked 3 Times in 3 Posts
Understanding the output of TOP

ok, so I have a script im running on a linux box that uses "egrep" a lot. now, when i run this script, i check the TOP to see how much system resource it is using.

the "top" command gives the following output:

last pid: 25384;  load avg:  1.06,  1.04,  0.76;       up 351+06:30:24                                                                                                                           00:10:08
139 processes: 2 running, 136 sleeping, 1 zombie
CPU states: 93.5% user,  0.0% nice,  6.3% system,  0.0% idle,  0.2% iowait
Kernel: 8 newproc
Memory: 5149M used, 2965M free, 303M buffers, 1341M cached
Swap: 6840K used, 1986M free, 1844K cached

25174 root        1  25    0 4256K  716K run     0:24 99.59% egrep
14120 www         1  15    0  127M  110M sleep   0:08  8.00% mongrel_rails
10243 root        1  15    0   48M   45M sleep  46.1H  3.60% ruby
 8880 www         1  15    0  146M  131M sleep   0:12  1.80% mongrel_rails
18157 www         1  15    0  155M  140M sleep   0:21  0.60% mongrel_rails

In the above output, it shows that the egrep command is using 99% of the CPU. does this mean it is actually taking up 99% of the entire CPU resource of the system, which would mean there's only 1% left for the other numerous processes on the system to use? this can't be right.

What do I need to look at in the above output to determine or isolate the system impact of this script i'm running.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem in understanding the output of errpt -d H -T PERM -s `date +"%m%d%H00%y"` Sounddappan Shell Programming and Scripting 1 07-09-2010 11:57 AM
Problem in understanding the output of errpt -d H -T PERM -s `date +"%m%d%H00%y"` Sounddappan AIX 0 07-09-2010 10:32 AM
Understanding the output command Ariean UNIX for Dummies Questions & Answers 5 01-13-2010 04:54 PM
Help Understanding Output and question about /dev/ mojoman UNIX for Dummies Questions & Answers 5 07-09-2009 07:13 PM
Ifconfig output - help understanding flags 'Smart, Simplex', etc littlefrog OS X (Apple) 1 01-14-2009 01:33 PM

All times are GMT -4. The time now is 06:21 PM.