About the version 1.34 TOP output. CMD_PROCESS_MONITOR

Nerigal

Verified User
Joined
Jul 6, 2009
Messages
123
this is great idea but there is something funny happening with top used as command line "/usr/bin/top -b -n 1"

here a little exemple you might understand what i means

(doing this in SSH)

# /usr/bin/top -b -n 1 | head -n 3
top - 16:43:56 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

# /usr/bin/top -b -n 1 | head -n 3
top - 16:44:00 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

# /usr/bin/top -b -n 1 | head -n 3
top - 16:44:02 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

# /usr/bin/top -b -n 1 | head -n 3
top - 16:44:06 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

# /usr/bin/top -b -n 1 | head -n 3
top - 16:44:08 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

# /usr/bin/top -b -n 1 | head -n 3
top - 16:44:13 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

# /usr/bin/top -b -n 1 | head -n 3
top - 16:44:15 up 532 days, 8:33, 2 users, load average: 0.00, 0.01, 0.00
Tasks: 101 total, 1 running, 100 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 2.5% sy, 1.7% ni, 87.6% id, 4.7% wa, 0.5% hi, 0.0% si

after a fast look into this... you can see the time stamp change for each but notting else... like exemple Cpu % us is always at 3.0% witch is impossible in fact... but i dont think top is responsable of this probleme because it happend with vmstat, sar, iostat etc.. command similar that i tried.

note that if you use just "top" as standar in SSH you will see all information get well refresh each 5 sec...

maby the solution is some where in /proc/stat by calculating it on your own...but if any one have an idea how to get cpu status "up to date" i would apreciate to know how...
 
This is not a DirectAdmin issue at all; you may want to post in a forum for your OS.

I've moved the thread from DirectAdmin General Discussion to System-Level Technical Discussion.

Jeff
 
i use htop that maybe is more efficent.

on debian you can install using

Code:
apt-get install htop

Sorry, dunno about other os.

Hope it help!
 
oh, ok, didnt know im sorry.

Ive tested your command line and i got same result, tryed for 30 sec the data never changed.. so.. maybe should be a bug dunno
 
Back
Top