|
|||||||
|
|
GETRLIMITSection: Linux Programmer's Manual (2)Updated: 4 May 2001 Index Return to Main Contents ̾Á°getrlimit, getrusage, setrlimit - »ñ¸»¤Î¸Â³¦¤ä»ÈÍÑÎ̤ò¼èÆÀ/ÀßÄꤹ¤ë½ñ¼°#include <sys/time.h>#include <sys/resource.h> #include <unistd.h>
int getrlimit (int resource, struct rlimit *rlim);
ÀâÌÀgetrlimit ¤È setrlimit ¤Ï¤½¤ì¤¾¤ì»ñ¸» (resource) ¤Î¸Â³¦ (limit) ¤ÎÀßÄê¤È¼èÆÀ¤ò¹Ô¤Ê¤¦¡£ resource ¤Ï°Ê²¼¤Î¤É¤ì¤«¤Ç¤¢¤ë:
RLIMIT_CPU /* CPU time in seconds */ ¸Â³¦¤ò RLIM_INFINITY ¤ËÀßÄꤷ¤¿¾ì¹ç¡¢»ñ¸»¤ò¸Â³¦Ìµ¤· (unlimited) ¤Ë¤Ç¤¤ë¡£ RLIMIT_OFILE ¤Ï RLIMIT_NOFILE ¤Î BSD ¤Ë¤ª¤±¤ë̾Á°¤Ç¤¢¤ë¡£ rlimit ¤Ï°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤ë¹½Â¤ÂΤǤ¢¤ë:
struct rlimit {
rlim_t rlim_cur;
rlim_t rlim_max;
};
getrusage ¤Ï¸½ºß¤Î»ñ¸»¤Î»ÈÍÑÎÌ (usage) ¤òÊÖ¤¹¡£ who ¤Ë¤Ï RUSAGE_SELF ¤« RUSAGE_CHILDREN ¤Î¤É¤Á¤é¤«¤ò»ØÄꤹ¤ë¡£
struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
long ru_maxrss; /* maximum resident set size */
long ru_ixrss; /* integral shared memory size */
long ru_idrss; /* integral unshared data size */
long ru_isrss; /* integral unshared stack size */
long ru_minflt; /* page reclaims */
long ru_majflt; /* page faults */
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary context switches */
};
ÊÖ¤êÃÍÀ®¸ù¤·¤¿¾ì¹ç¤Ï¥¼¥í¤¬ÊÖ¤µ¤ì¤ë¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï -1 ¤¬ÊÖ¤µ¤ì¡¢ errno ¤ËŬÀÚ¤ÊÃͤ¬ÀßÄꤵ¤ì¤ë¡£¥¨¥é¡¼
½àµòSVr4, BSD 4.3Ãí°Õ¾åµ¤Î¹½Â¤ÂÎ¤Ï BSD 4.3 Reno ¤Î¤â¤Î¤òºÎÍѤ·¤¿¡£ Linux ¤Ç¤ÏÁ´¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤¬°ÕÌ£¤ò»ý¤Ä¤È¤¤¤¦¤ï¤±¤Ç¤Ï¤Ê¤¤¡£ ¸½ºß¤Î¤È¤³¤í (Linux 2.4 ¤Ç¤Ï)¡¢¥Õ¥£¡¼¥ë¥É ru_utime, ru_stime, ru_minflt, ru_majflt, ru_nswap ¤Î¤ß¤¬´ÉÍý¤µ¤ì¤Æ¤¤¤ë¡£´ØÏ¢¹àÌÜquotactl(2), ulimit(3)
Index | ||||||
|
|
|
Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account Document on this page is part of "Linuxinfor Man Pages in HTML Format: man2". See Index Page for more info about Authorship and Copyright. 1999-2008 Linuxinfor.com. No rights reserved. |