1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
.\" -*- nroff -*-
.\"
.\" (C)opyright 1993 by Dan Miner (dminer@nyx.cs.du.edu)
.\"
.\" Permission is granted to freely distribute or modify this file
.\" for the purpose of improving Linux or its documentation efforts.
.\" If you modify this file, please put a date stamp and HOW you
.\" changed this file. Thanks. -DM
.\"
.\" Modified Sat Jul 24 12:35:12 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Tue Oct 22 22:29:51 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Mon Aug 25 16:06:11 1997 by Nicols Lichtmaier <nick@debian.org>
.\" Translated into Spanish Fri Feb 6 1998 by Gerardo Aburruzaga
.\" Garca <gerardo.aburruzaga@uca.es>
.\" Translation revised Mon Aug 17 1998 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH SYSINFO 2 "25 Agostro 1997" "Linux 2.0" "Manual del Programador de Linux"
.SH NOMBRE
sysinfo \- devuelve informacin sobre estadsticas globales del sistema
.SH SINOPSIS
.B #include <sys/sysinfo.h>
.sp
.BI "int sysinfo(struct sysinfo *" info );
.SH DESCRIPCIN
.B sysinfo
devuelve informacin en la siguiente estructura:
.RS
.nf
struct sysinfo {
long uptime; /* Segundos desde el arranque */
unsigned long loads[3]; /* cargas medias en 1, 5, y 15 min */
unsigned long totalram; /* Mem. pral. total til */
unsigned long freeram; /* Tamao de memoria disponible */
unsigned long sharedram; /* Cantidad de memoria compartida */
unsigned long bufferram; /* Memoria empleaada por bferes */
unsigned long totalswap; /* Tamao del espacio total de swap */
unsigned long freeswap; /* Espacio de swap an disponible */
unsigned short procs; /* N de procesos actualmente */
char _f[22]; /* Rellena la struct a 64 bytes */
};
.fi
.RE
.B sysinfo
proporciona una forma simple de obtener estadsticas globales del
sistema. Eso es ms transportable que leer \fI/dev/kmem\fP.
.SH "VALOR DEVUELTO"
En caso de xito se devuelve cero. En caso de error, se devuelve \-1 y
se pone en
.I errno
un valor apropiado.
.SH ERRORES
.TP 0.8i
.B EFAULT
el puntero a la \fIstruct\ sysinfo\fP es invlido.
.SH "CONFORME A"
Esta funcin es especfica de Linux, y no debera emplearse en
programas supuestamente transportables.
.sp
El ncleo de Linux tiene una llamada al sistema sysinfo desde la versin
0.98.pl16. La libc de Linux contiene una rutina sysinfo() desde la versin
5.2.5 y glibc tiene una desde la versin 1.90.
.SH "VASE TAMBIN"
.BR proc (5)
|