1832642 Members
2975 Online
110043 Solutions
New Discussion

top -> cpu states

 
SOLVED
Go to solution
j773303
Super Advisor

top -> cpu states

What's the mean of the LOAD and USER? The below info is the result of top command.

Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.04 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
1 0.00 0.0% 0.0% 0.2% 99.8% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.02 0.0% 0.0% 0.2% 99.8% 0.0% 0.0% 0.0% 0.0%
Hero
5 REPLIES 5
twang
Honored Contributor
Solution

Re: top -> cpu states

I saw the top output interpretation from this forum somewhere:
CPU - The CPU number
LOAD - Current system load average
USER - % used by user processes
NICE - % CPU scheduling priority
SYS - % used by operating system processes
IDLE - % IDLE
BLOCK - % blocked by system waits
SWAIT - % system wait states
INTR - % of system interupts
SSYS - % sub system
Michael Tully
Honored Contributor

Re: top -> cpu states

percentage of cpu used for users other than root.

load (or load average is the average number of jobs waiting in the queue to be processed (given cpu time)

Basically your system is not doing much at all.
Anyone for a Mutiny ?
Tim D Fulford
Honored Contributor

Re: top -> cpu states

LOAD is the load average. This is the number of running OR runnable processes

USER is the ammount of CPU spent is USER mode, generally this only used when processes are run with "nice".

So having a USER value of 0.00% means you are not running any (many) process using nice and your load average of 0.02 menas you have 0.02 processes running oir runable.

Regards

Tim
-
Dietmar Konermann
Honored Contributor

Re: top -> cpu states

Some more comments, since not all of the above answered are quite correct.

The load average is the average number of non-system processes on the run queue. The top command shows the over-all averages of the last 1-minute, 5-minute and 15-minute interval in line 2 ("Load averages:"). For each CPU it also shows the 1-minute average ("LOAD" cpu column).

But what are non-system proecesses...

# UNIX95=1 ps -eo flags= -o comm= |
while read f c; do
(( f >> 1 & 1 )) && echo $f $c
done

1003 swapper
1003 supsched
1003 strmem
1003 strweld
1003 strfreebd
1003 vhand
1003 statdaemon
1003 unhashdaemon
1003 ttisr
1003 ioconfigd
1003 lvmkd
1003 lvmkd
1003 lvmkd
1003 lvmkd
1003 lvmkd
1003 lvmkd
1003 lvmschedd
1003 smpsched
1003 smpsched
1003 sblksched
1003 sblksched
1003 vxfsd
1003 nfskd
1003 autofs_proc
1003 nfsktcpd

Before 11.11 also "fast sleepers" were added to the runq length, these are those with 127 < Prio < 154.

Concerning USER and SYSTEM... this has nothing to do with the user id or nice level a process is running with. USER is the percentage of the CPU usage in user mode and SYSTEM the percentage in system mode, e.g. in while executing syscalls.

Run this empty loop as root:
# while :; do :; done

It takes about 100% USER cpu, although running as root.

Try this as non-root:
# ls -lR / >/dev/null 2>&1

And you will see a signifcat amount of SYSTEM cpu, although the process is non-root.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Tim D Fulford
Honored Contributor

Re: top -> cpu states

oops.. Dieter is right, I got NICE & USER wrong way round (in my head anyway) What I said for USER is actually NICE....

Tim
-