What function returns the system load?

What function returns the system load?

Post by Andre Hertwi » Wed, 18 Jul 2001 03:55:37



I want to determine the system load of my Linux
box. Is there a system function that provides
this information? What is the name of this
function? Is this function a POSIX standard so
that I can use it on Solaris or HPUX as well?

Many thanks in advance
Andre

 
 
 

What function returns the system load?

Post by Damiano Fasol » Wed, 18 Jul 2001 04:53:47



> I want to determine the system load of my Linux
> box. Is there a system function that provides
> this information? What is the name of this
> function? Is this function a POSIX standard so
> that I can use it on Solaris or HPUX as well?

> Many thanks in advance
> Andre

You can use
top
(q to exit) usually available on Solaris and HPUX as well.

 
 
 

What function returns the system load?

Post by f » Wed, 18 Jul 2001 07:51:48



> I want to determine the system load of my Linux
> box. Is there a system function that provides
> this information? What is the name of this
> function? Is this function a POSIX standard so
> that I can use it on Solaris or HPUX as well?

> Many thanks in advance
> Andre

I think you need 'uptime' program - it indicates 'load average', seems
you need that. Or you can simply 'cat /proc/loadavg' it really
helps...
 
 
 

What function returns the system load?

Post by Eric Gusukum » Thu, 19 Jul 2001 01:09:32


there are 2 standard unix commands i know of, 1 is uptime and the other is w.  uptime displays the
same info that's on the top line of w.

hope this helps.

regards,

eric



> > I want to determine the system load of my Linux
> > box. Is there a system function that provides
> > this information? What is the name of this
> > function? Is this function a POSIX standard so
> > that I can use it on Solaris or HPUX as well?

> > Many thanks in advance
> > Andre

> I think you need 'uptime' program - it indicates 'load average', seems
> you need that. Or you can simply 'cat /proc/loadavg' it really
> helps...

 
 
 

What function returns the system load?

Post by Herb Stei » Thu, 19 Jul 2001 01:45:56


top also displays useful info.


Quote:> there are 2 standard unix commands i know of, 1 is uptime and the other is

w.  uptime displays the
> same info that's on the top line of w.

> hope this helps.

> regards,

> eric





Quote:> > > I want to determine the system load of my Linux
> > > box. Is there a system function that provides
> > > this information? What is the name of this
> > > function? Is this function a POSIX standard so
> > > that I can use it on Solaris or HPUX as well?

> > > Many thanks in advance
> > > Andre

> > I think you need 'uptime' program - it indicates 'load average', seems
> > you need that. Or you can simply 'cat /proc/loadavg' it really
> > helps...

--
Herb Stein
The Herb Stein Group
www.herbstein.com

314 952-4601
 
 
 

What function returns the system load?

Post by Nickola MAPBuH Trupche » Fri, 20 Jul 2001 21:00:43


ps aux | sort -n +2 ( 3rd column is cpu% )
ps aux | sort -n +3 ( 4th column is mem% )