From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8d8f2faf86e39c3f X-Google-Attributes: gid1164f8,public From: Usman Muzaffar Subject: Re: determining load average Date: 1999/07/15 Message-ID: <378E75EC.5493938@thynne.psych.nwux.edu>#1/1 X-Deja-AN: 501541794 Content-Transfer-Encoding: 7bit References: <378BE579.CB9E6404@swin.edu.au> Organization: Northwestern University, Evanston, IL, US Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.sys.dec Paul Bourke wrote: > > How does one getting the machine load? I'm about to do some parallel > animations on a Dec farm (UNIX) and would like to check the load from > my C source and not use that machine if the load is too high. Sure > I can system("uptime") and parse the result....yuk. Surely there's > a cleaner "standard" way? As I understand it, things about process information are more or less guaranteed to be *different* between different operating systems, which is why there is no POSIXish way to get at process information at the lower level. I'm no fan of system() in C programs either, but I'd guess in this case, uptime is the best way to go. But if anyone knows differently, please, let's hear it. -usman