From owner-freebsd-emulation Thu Nov 2 11:36:59 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from sigbus.com (sigbus.com [207.211.10.110]) by hub.freebsd.org (Postfix) with ESMTP id 66F9B37B479 for ; Thu, 2 Nov 2000 11:36:57 -0800 (PST) Received: (from henrich@localhost) by sigbus.com (8.9.3/8.9.3) id LAA78422 for freebsd-emulation@freebsd.org; Thu, 2 Nov 2000 11:36:57 -0800 (PST) (envelope-from henrich) Date: Thu, 2 Nov 2000 11:36:57 -0800 From: Charles Henrich To: freebsd-emulation@freebsd.org Subject: linux sysinfo() Message-ID: <20001102113657.B78298@sigbus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i X-Operating-System: FreeBSD 3.3-RELEASE X-PGP-Fingerprint: 1024/F7 FD C7 3A F5 6A 23 BF 76 C4 B8 C9 6E 41 A4 4F Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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!) -Crh Charles Henrich Manex Visual Effects henrich@sigbus.com http://www.sigbus.com/~henrich To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message