From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,4ee4c9de428d260e X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,4ee4c9de428d260e X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-05-02 14:29:58 PST Path: bga.com!news.sprintlink.net!sundog.tiac.net!usenet.elf.com!rpi!gatech!howland.reston.ans.net!math.ohio-state.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!ccad.uiowa.edu!usenet From: ndoulas@ccad.uiowa.edu (Nick Doulas) Newsgroups: comp.unix.osf.osf1,comp.unix.programmer Subject: Re: load average from C Date: 2 May 1994 20:13:17 GMT Organization: CAD-Research, University of Iowa, Iowa City, Iowa Distribution: world Message-ID: <2q3mst$81a@monet.ccad.uiowa.edu> References: <2q36mf$cia@info.epfl.ch> Reply-To: ndoulas@ccad.uiowa.edu (Nick Doulas) NNTP-Posting-Host: picasso.ccad.uiowa.edu X-Newsreader: mxrn 6.18-4 Xref: bga.com comp.unix.osf.osf1:1438 comp.unix.programmer:3603 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