Unix Technical Forum

System Usage Stats.

This is a discussion on System Usage Stats. within the Linux Operating System forums, part of the Unix Operating Systems category; --> Apparently in 2.6.x kernels top does not look at the threads of programs. So if say you have the ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 06:54 AM
Joseph
 
Posts: n/a
Default System Usage Stats.

Apparently in 2.6.x kernels top does not look at the threads of programs.
So if say you have the daemon program 'foo' running, which has spawned a
few threads which are using 100% of the processor juice, top will show the
processor usage at 100% but will show foo as using 0% of the processor.

The problem is that the base install of FC2 has a few things running in cron
(I assume) which are doing just that. They're sucking up all my proccessor
power, but I can't run top to find out what it is that's running so that I
can either keep it from running entirely, or re-schedule to a more
convenient time.

Does anybody know of a way to find out what processes are doing this since
top does not appear to do the trick?

TIA,
Joseph
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 06:54 AM
dxp2532
 
Posts: n/a
Default Re: System Usage Stats.

Joseph wrote:

> Apparently in 2.6.x kernels top does not look at the threads of programs.
> So if say you have the daemon program 'foo' running, which has spawned a
> few threads which are using 100% of the processor juice, top will show the
> processor usage at 100% but will show foo as using 0% of the processor.
>
> The problem is that the base install of FC2 has a few things running in
> cron
> (I assume) which are doing just that. They're sucking up all my
> proccessor power, but I can't run top to find out what it is that's
> running so that I can either keep it from running entirely, or re-schedule
> to a more convenient time.
>
> Does anybody know of a way to find out what processes are doing this since
> top does not appear to do the trick?
>
> TIA,
> Joseph


Read the man page for 'ps'.

ps -xau
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 06:54 AM
Joseph
 
Posts: n/a
Default Re: System Usage Stats.

Hey thanks. I didn't know that ps could show CPU usage statistics.
Apparently you can get it to show the threads too. This is exactly what I
was looking for.

Thanks again,
Joseph

>
> Read the man page for 'ps'.
>
> ps -xau


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 06:54 AM
Gumby
 
Posts: n/a
Default Re: System Usage Stats.

Joseph wrote:

> Hey thanks. I didn't know that ps could show CPU usage statistics.
> Apparently you can get it to show the threads too. This is exactly what I
> was looking for.
>
> Thanks again,
> Joseph
>
>>
>> Read the man page for 'ps'.
>>
>> ps -xau


I occasionally like to use the /bin/ps version of
ps, then you can request particular columns
(like the process owner, process id, % of cpu and
the command line arguments)

/bin/ps -A -o user,pid,pcpu,args

which shows something like:
root 2675 0.0 /sbin/mingetty tty5
root 2676 0.0 /sbin/mingetty tty6
mos 2827 0.0 -tcsh
mos 2854 0.0 /bin/sh /usr/X11R6/bin/startx
mos 2866 0.0 xinit /etc/X11/xinit/xinitrc --
root 2867 0.0 X :0
mos 2906 0.0 /bin/sh /usr/bin/startkde
mos 2920 0.0 ssh-agent /home/mos/.Xclients
mos 2960 0.0 kdeinit: Running...

since there's fewer columns this way, you get to
see more of the args (not chopped off on the right edge)

Mark

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 06:54 AM
dxp2532
 
Posts: n/a
Default Re: System Usage Stats.

On Thursday 09 December 2004 22:32 Gumby (none@xxxyy.com) wrote to
comp.os.linux.setup as msd_id: <cN8ud.3613$mn6.2661@trnddc07> :

> Joseph wrote:
>
>> Hey thanks. I didn't know that ps could show CPU usage statistics.
>> Apparently you can get it to show the threads too. This is exactly what
>> I was looking for.
>>
>> Thanks again,
>> Joseph
>>
>>>
>>> Read the man page for 'ps'.
>>>
>>> ps -xau

>
> I occasionally like to use the /bin/ps version of
> ps, then you can request particular columns
> (like the process owner, process id, % of cpu and
> the command line arguments)
>
> /bin/ps -A -o user,pid,pcpu,args
>
> which shows something like:
> root 2675 0.0 /sbin/mingetty tty5
> root 2676 0.0 /sbin/mingetty tty6
> mos 2827 0.0 -tcsh
> mos 2854 0.0 /bin/sh /usr/X11R6/bin/startx
> mos 2866 0.0 xinit /etc/X11/xinit/xinitrc --
> root 2867 0.0 X :0
> mos 2906 0.0 /bin/sh /usr/bin/startkde
> mos 2920 0.0 ssh-agent /home/mos/.Xclients
> mos 2960 0.0 kdeinit: Running...
>
> since there's fewer columns this way, you get to
> see more of the args (not chopped off on the right edge)
>
> Mark


You can see all of the args if you pipe output of 'ps' to 'more' or 'less'
eg: ps xau | less

it won't truncate, but it will line wrap.

dxp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com