*BSD News Article 78373


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!solace!eru.mt.luth.se!www.nntp.primenet.com!nntp.primenet.com!news1.best.com!nntp1.best.com!flash.noc.best.net!not-for-mail
From: dillon@best.com (Matthew Dillon)
Newsgroups: comp.unix.programmer,comp.os.linux.development.apps,comp.unix.bsd.freebsd.misc
Subject: Re: System call for querying system load?
Date: 15 Sep 1996 09:15:41 -0700
Organization: Best Internet Communications, Inc. (info@best.com)
Lines: 22
Distribution: world
Message-ID: <51ha3d$3to@flash.noc.best.net>
References: <51cjj1$1k7@news.cyberenet.net> <DxrMGE.59t@pe1chl.ampr.org>
NNTP-Posting-Host: flash.noc.best.net
Xref: euryale.cc.adfa.oz.au comp.unix.programmer:43260 comp.os.linux.development.apps:21861 comp.unix.bsd.freebsd.misc:27330

:In article <DxrMGE.59t@pe1chl.ampr.org>, Rob Janssen <pe1chl@amsat.org> wrote:
:>In <51cjj1$1k7@news.cyberenet.net> harry@cyberenet.net (Harry Hochheiser) writes:
:>
:>
:>>I'm looking for a system call/subroutine that will let me query the system 
:>>load.  This call would return information similar to that found in uptime(1), 
:>>and should be roughly portable across BSD-like Unixes (i.e, Linux's sysinfo() 
:>>won't work, even though that's my primary environment.
:>
:>There isn't any.  Retrieving the load average is a very non-portable
:>operation, apparently nobody in the standards committees thought about
:...

    Actually, there is a call now:  getloadavg(double loadavg[], int nelem),
    but who knows whether it is compatible with anyone else's.

					-Matt

-- 
    Matthew Dillon   Engineering, BEST Internet Communications, Inc.
		     <dillon@best.net>
    [always include a portion of the original email in any response!]