From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,92658dd14a253e50 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-06-29 12:06:07 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!headwall.stanford.edu!news-out.nibble.net!news-in.nibble.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Chris" Newsgroups: comp.unix.tru64 Subject: Re: average load Date: Fri, 29 Jun 2001 21:04:55 +0200 Organization: T-Online Message-ID: <9hijh9$4oi$06$1@news.t-online.com> References: <9hg6g0$u6$07$1@news.t-online.com> <3B3BA94A.8C1AB2C1@zk3.dec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 993841514 06 4882 dA8cSB6SSJA6Dh 010629 19:05:14 X-Complaints-To: abuse@t-online.com X-Sender: 340021385741-0001@t-dialin.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.unix.tru64:2832 Do you think that TBL_LOADAVG is more accurate than TBL_RUNQ? It seems that maybe TBL_LOADAVG samples the run queue more frequently than the 1 sec TBL_RUNQ uses. Therefore, it may take into account short jobs (< 1sec) that TBL_RUNQ misses when it checks the ready jobs queue. I get consistently lower load-average numbers than those from w and top, for the same time interval. "Tony Verhulst" wrote in message news:3B3BA94A.8C1AB2C1@zk3.dec.com... > Chris wrote: > > > > How can I get the system load programmatically? > > > > I get the number of ready processes in the run queue > > through table() but that does not seem to agree > > with the numbers displayed by top and w. > > > I see you already know about table() but maybe you missed TBL_LOADAVG in > the man page for table(2) and /usr/include/table.h. It may not help, > that's what w(1) uses. > > Tony V.