1849518 Members
7046 Online
104044 Solutions
New Discussion

Re: top USER and SYS

 
j773303
Super Advisor

top USER and SYS

Please view the attachment.
10 CPU,

From the top outputs, USER avg: 53.1%,
SYS avg: 26.0%

Does anyone knows any formula for top commana USER and SYS? I just want to know why USER 53.1 % and SYS 26 % . Thanks.
Hero
4 REPLIES 4
Ninad_1
Honored Contributor

Re: top USER and SYS

The top command is showing you the amount of time spent by each CPU in each of the stats - USER, SYSTEM, IDLE and so on.
and the avg figure is average for all the CPUs thus representing the overall system time spent in each of the states.
If you are asking for formula for avg - its naturally - (Sum of records)/number of records.
Thus in your case the total of SYS colum comes to 260.5 and since you have 10 CPUs - 260.5/10 = 26.0 %
If you are asking how top calculates USER, SYS etc percentage for each CPU - it uses the kernel information to present you the data.

Hope that clarifies.

Regards,
Ninad
Rajeev  Shukla
Honored Contributor

Re: top USER and SYS

Thats right the your USR, SYS, IDLE average to the value with respect to number of CPU.
And if you look it means that the system is spending 53.1% of time in User proccess and only 26.1% of time on system proccess which is good as it gives you good performance. And if you have the reverse then your system would actually be getting hammered because of system resources. Also if you have 0% IDLE then your system surely has bottleneck of resource as its fully utilized and any addition to applications on this server will result in poor performance.
j773303
Super Advisor

Re: top USER and SYS

I'm not really understand how the "SYS"% calculated by kernel of HPUX? Is it possible to get any formula or resource about "SYS"% in top?

In the Glance, there's also "SYS"%, it inlucding system call,context switch,virtual fault and so on.

I'd really appreciated anyone can give me some advise.
Hero
Bill Hassell
Honored Contributor

Re: top USER and SYS

I think you are asking whether 26% SYS is normal, and the answer is yes for your system based on what the applications are asking HP-UX to do. Now whether that is correct behavior for your applications is a much more complex question which will require extensive knowledge of the applications, the interrupts they are using, the system calls they are making and the disk I/O statistics. Since none of the native HP-UX commands can provide that information, you'll have to get a copy of Glance and begin analyzing the applications.


Bill Hassell, sysadmin