Rechercher une page de manuel
sysinfo
Langue: ja
Version: 25 August 1997 (openSuse - 09/10/07)
Section: 2 (Appels système)
̾Á°
sysinfo - ¥·¥¹¥Æ¥àÁ´ÂΤÎÅý·×¾ðÊó¤òÊÖ¤¹¡£½ñ¼°
#include <sys/sysinfo.h>int sysinfo(struct sysinfo *info);
ÀâÌÀ
Linux 2.3.16 ¤Þ¤Ç¤Ï sysinfo() ¤Ï°Ê²¼¤Î¹½Â¤ÂΤ˾ðÊó¤òÆþ¤ì¤ÆÊÖ¤¹¡£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 */ };
¤³¤³¤Ç¥Ð¥¤¥Èñ°Ì¤ÇÍ¿¤¨¤é¤ì¤ë¡£
Linux 2.3.23 (i386)¡¢2.3.48 (Á´¤Æ¤Î¥¢¡¼¥¥Æ¥¯¥Á¥ã) ¤«¤é¤Ï¹½Â¤ÂΤÏ
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 */ unsigned long totalhigh; /* Total high memory size */ unsigned long freehigh; /* Available high memory size */ unsigned int mem_unit; /* Memory unit size in bytes */ char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding for libc5 */ };
¤È¤Ê¤ê¡¢Â礤µ¤Ï mem_unit ¥Ð¥¤¥È¤ÎÇÜ¿ô¤ÇÍ¿¤¨¤é¤ì¤ë¡£
sysinfo() ¤Ï¥·¥¹¥Æ¥àÁ´ÂΤÎÅý·×¤ò¼èÆÀ¤¹¤ë´Êñ¤ÊÊýË¡¤òÄ󶡤¹¤ë¡£ ¤³¤ì¤Ï /dev/kmem ¤òÆɤà¤è¤ê¤â°Ü¿¢À¤Î¹â¤¤ÊýË¡¤Ç¤¢¤ë¡£ »ÈÍÑÎã¤Ï intro(2) ¤ò»²¾È¤¹¤ë¤³¤È¡£
ÊÖ¤êÃÍ
À®¸ù¤·¤¿¾ì¹ç¤Ï¥¼¥í¤¬ÊÖ¤µ¤ì¤ë¡£¥¨¥é¡¼¤Ê¤é¤Ð -1 ¤¬ÊÖ¤µ¤ì¡¢ errno ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£¥¨¥é¡¼
- EFAULT
- sysinfo ¹½Â¤ÂÎ ¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
½àµò
¤³¤Î´Ø¿ô¤Ï Linux ÆÃͤǤ¢¤ê¡¢°Ü¿¢¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï »ÈÍѤ·¤Æ¤Ï¤¤¤±¤Ê¤¤¡£Linux ¥«¡¼¥Í¥ë¤Ï 0.98.pl6 ¤«¤é sysinfo() ¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»ý¤Ã¤Æ¤¤¤ë¡£ Linux ¤Î libc ¤Ï 5.3.5 ¤è¤ê¡¢glibc ¤Ç¤Ï 1.90 ¤è¤ê sysinfo() ¥ë¡¼¥Á¥ó¤ò´Þ¤ó¤Ç¤¤¤ë¡£
´ØÏ¢¹àÌÜ
proc(5)Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre