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:31:21 PST Path: bga.com!news.sprintlink.net!sundog.tiac.net!usenet.elf.com!rpi!gatech!swrinde!sdd.hp.com!hplabs!unix.sri.com!headwall.Stanford.EDU!schemers From: schemers@leland.Stanford.EDU (Roland Schemers) Newsgroups: comp.unix.osf.osf1,comp.unix.programmer Subject: Re: load average from C Date: 2 May 1994 20:17:55 GMT Organization: Distributed Computing Group, Stanford University Message-ID: <2q3n5j$r5o@nntp2.Stanford.EDU> References: <2q36mf$cia@info.epfl.ch> NNTP-Posting-Host: slapshot.stanford.edu Xref: bga.com comp.unix.osf.osf1:1439 comp.unix.programmer:3604 In article <2q36mf$cia@info.epfl.ch>, Stefan Monnier 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