Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Nov 2000 07:54:46 +1000
From:      D.Thomas@imb.uq.edu.au (Danny Thomas)
To:        freebsd-emulation@freebsd.org
Subject:   Re: linux sysinfo()
Message-ID:  <v02140b07b62791d7671d@[130.102.4.80]>

next in thread | raw e-mail | index | archive | help
>I've just found a man page on it, its a pretty simple function:
>
>       sysinfo returns information in the following structure:
>
>              struct sysinfo {
>                   long uptime;              /* Seconds since boot */
>                   unsigned long loads[3];   /* 1, 5, and 15 minute load
>average
>s */
>                   unsigned long totalram;   /* Total usable main memory size
>*/
>                   unsigned long freeram;    /* Available memory size */
>                   unsigned long sharedram;  /* Amount of shared memory */
>                   unsigned long bufferram;  /* Memory used by buffers */
>                   unsigned long totalswap;  /* Total swap space size */
>                   unsigned long freeswap;   /* swap space still available */
>                   unsigned short procs;     /* Number of current processes */
>                   char _f[22];              /* Pads structure to 64 bytes */
>              };
>
>
>Which FreeBSD has no equivilances for.  All I can see if the poking about in
>kernel memory.  Does anyone have any pointers on how to do such a thing from
>kernel space?  Thanks!  (This function looks like it would be a useful FreeBSD
>function as well!)
rather than add system calls and ;ater find you didn't quite export enough
values, you're better off making this info available through sysctl, which
is an extensible interface specifically for grokking kernel info. The same
info can be exported through a filesystem for those who prefer that.

cheers,
Danny Thomas




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v02140b07b62791d7671d>