Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* load average from C
@ 1994-05-02 15:36 Stefan Monnier
  1994-05-02 20:13 ` Nick Doulas
  1994-05-02 20:17 ` Roland Schemers
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 1994-05-02 15:36 UTC (permalink / raw)



Is it possible to get the load average (or an approximation of it)
from C, without calling system() ?
(the more portable the better, but specific to osf/1 would be OK)


	Stefan

PS: nntp1.5.11 sources read /dev/kmem but I don't have root access and
/dev/kmem is protected.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: load average from C
  1994-05-02 15:36 load average from C Stefan Monnier
@ 1994-05-02 20:13 ` Nick Doulas
  1994-05-02 20:17 ` Roland Schemers
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Doulas @ 1994-05-02 20:13 UTC (permalink / raw)



In article <2q36mf$cia@info.epfl.ch>, monnier@di.epfl.ch (Stefan Monnier) writes:

> Is it possible to get the load average (or an approximation of it)
> from C, without calling system() ?
> (the more portable the better, but specific to osf/1 would be OK)
>
>
> 	Stefan
>
> PS: nntp1.5.11 sources read /dev/kmem but I don't have root access and
> /dev/kmem is protected.


Try using rstat() if its available on your system.  It reads /dev/kmem for you.


Nick
ndoulas@ccad.uiowa.edu


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: load average from C
  1994-05-02 15:36 load average from C Stefan Monnier
  1994-05-02 20:13 ` Nick Doulas
@ 1994-05-02 20:17 ` Roland Schemers
  1994-05-07 11:21   ` Anthony Baxter
  1 sibling, 1 reply; 5+ messages in thread
From: Roland Schemers @ 1994-05-02 20:17 UTC (permalink / raw)


In article <2q36mf$cia@info.epfl.ch>,
Stefan Monnier <monnier@di.epfl.ch> wrote:
>
>Is it possible to get the load average (or an approximation of it)
>from C, without calling system() ?
>(the more portable the better, but specific to osf/1 would be OK)
>

There really isn't a portable way to get the load average. Take a look 
at the man page under "table" (man table). I'm not sure if you need
any privs to get the load average using this call.

Roland



-- 
Roland J. Schemers III             |    Networking Systems 
Authentication Services Programmer |    414 Sweet Hall  +1 (415) 723-6740 
Distributed Computing Operations   |    Stanford, CA 94305-3090
Stanford University                |    schemers@Slapshot.Stanford.EDU 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: load average from C
  1994-05-02 20:17 ` Roland Schemers
@ 1994-05-07 11:21   ` Anthony Baxter
  1994-05-09 14:35     ` Brian P. Minnebo
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Baxter @ 1994-05-07 11:21 UTC (permalink / raw)


schemers@leland.Stanford.EDU (Roland Schemers) writes:

>There really isn't a portable way to get the load average. Take a look 
>at the man page under "table" (man table). I'm not sure if you need
>any privs to get the load average using this call.

You need root
--
anthony baxter @ /\/\||   |= Sarah McLachlan mailing =|  australian artificial 
email: anthony@aaii.oz.au |= list: mail fte-request@ =| intelligence institute
phone: +613 663 7922      |= yoyo.cc.monash.edu.au.  =| level 6, 171 latrobe st
Practice random kindness and senseless acts of sarcasm|  melbourne aust. 3000


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: load average from C
  1994-05-07 11:21   ` Anthony Baxter
@ 1994-05-09 14:35     ` Brian P. Minnebo
  0 siblings, 0 replies; 5+ messages in thread
From: Brian P. Minnebo @ 1994-05-09 14:35 UTC (permalink / raw)


anthony@aaii.oz.au (Anthony Baxter) writes:
>schemers@leland.Stanford.EDU (Roland Schemers) writes:
>
>>There really isn't a portable way to get the load average. Take a look 
>>at the man page under "table" (man table). I'm not sure if you need
>>any privs to get the load average using this call.
>
>You need root

On axposf.pa.dec.com running OSF/1 2.0, you don't need root.

Brian
-- 
Brian Minnebo                       (313) 370-4323
Senior Systems Programmer           minnebo@vela.acs.oakland.edu (Ultrix)
Oakland University, Rochester MI.   minnebo@argo.acs.oakland.edu (VMS)
"Getting 1 inch of snow is like winning a dime in the lottery." - Calvin


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1994-05-09 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-05-02 15:36 load average from C Stefan Monnier
1994-05-02 20:13 ` Nick Doulas
1994-05-02 20:17 ` Roland Schemers
1994-05-07 11:21   ` Anthony Baxter
1994-05-09 14:35     ` Brian P. Minnebo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox