42 lines
1.9 KiB
HTML
42 lines
1.9 KiB
HTML
<html><!-- This HTML file has been created by texi2html 1.29
|
|
from syscalls.texi on 4 June 1994 -->
|
|
|
|
<TITLE>Syscall specifications of Linux - sysinfo</TITLE>
|
|
<P>Go to the <A HREF="syscalls_106.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_106.html">previous</A>, <A HREF="syscalls_108.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_108.html">next</A> section.<P>
|
|
<H2><A NAME="SEC107" HREF="syscalls_toc.html#SEC107" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC107">sysinfo</A></H2>
|
|
<P>
|
|
<H3>SYNOPSIS</H3>
|
|
<P>
|
|
<CODE>int sysinfo(struct sysinfo *<VAR>info</VAR>);</CODE>
|
|
|
|
<H3>PARAMETERS</H3>
|
|
<P>
|
|
<VAR>info</VAR>: [out] buffer where to store the info.
|
|
<P>
|
|
<H3>DESCRIPTION</H3>
|
|
<P>
|
|
Returns system information and statistics. (What a surprise!!!) The
|
|
<CODE>sysinfo</CODE> structure has the following layout:
|
|
<P>
|
|
<PRE>
|
|
struct sysinfo }
|
|
long uptime; /* Seconds since boot */
|
|
unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
|
|
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 */
|
|
};
|
|
</PRE>
|
|
<P>
|
|
<H3>RETURN VALUE</H3>
|
|
<P>
|
|
On success zero is returned. On error -1 is returned and <CODE>errno</CODE> is
|
|
set to <CODE>EFAULT</CODE>.
|
|
<P>
|
|
<P>Go to the <A HREF="syscalls_106.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_106.html">previous</A>, <A HREF="syscalls_108.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_108.html">next</A> section.<P>
|