sysinfo

Name

sysinfo -- return system information

Synopsis

#include <sys/sysinfo.h>

int sysinfo(struct sysinfo *info);

Description

sysinfo() provides a way to obtain certain system statistics. Statistics are written into a sysinfo structure pointed to by info. Elements which take a size are sized in units indicated by the value of the mem_unit member of info. The other members have traditional meanings as indicated in Data Definitions, but are not formally part of this specification.

Return Value

Returns zero on success. On error, -1 is returned and errno is set to indicate the error.

Errors

EFAULT 

The info parameter does not point to a valid sysinfo structure.