On Mon, 20 Jan 2003, Michael Sternberg wrote:

> Hello.
> >From time to time I notice in output of /usr/bin/top that my system CPU
> time jumps to nearly 90%. How can I know which task kernel performs ?
> I'm looking for some kind of "top" for kernel.. Maybe some file in /proc
> directory ?

please note that 'system' time will include the time spent by user-space 
processes, running in kernel mode. for example, if a process does a lot of 
disk I/O, then you'll see it is spending a lot of time in 'system' mode, 
and thus 'top' will show the 'system' time as non-zero. the same goes for 
other types of heavy I/O (networking, swapping, interrupt handling).

without too much hasteling, you could use a few standard utilities ot help 
you debug problems. there is 'vmstat' (run it as 'vmstat 3' to refresh 
every 3 seconds, and ignore the first line of output. read the man page 
for more info). there is 'iostat' (similar, but concentrates on device 
I/O, like disks). you might also have 'sar'. 

in order to actually decipher the output of these programs, you should 
look at what they show you wihle the system is in 'silent' mode, and then 
compare that to what they show under various types of activities. then 
compare to other systems - otherwise, you'll have no idea what 'high 
ammount of context switches' is, or what ammount of interrupts per second 
makes the mahcine too slow... you need to know the capacity of your 
machine, in order to know if its saturated regarding activity of a given 
resource, or not (i.e. if its getting so many interrupts per second, that 
this comes on account of its ability to run user-space programs, etc).

i don't suppose this will actually help you in the short run, but perhaps 
it will in the long run. if you manage to find a resource that gives 
'proper numbers' for various types of hardware - let me know, please ;)
will help me quite alot.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to