int getrlimit (int resource, struct rlimit *rlim);
int getrusage (int who, struct rusage *usage);
int setrlimit (int resource, const struct rlimit *rlim);
RLIMIT_CPU /* ÃÊ ´ÜÀ§ÀÇ CPU ½Ã°£ */
RLIMIT_FSIZE /* ÃÖ´ë ÆÄÀÏ Å©±â */
RLIMIT_DATA /* ÃÖ´ë µ¥ÀÌŸ Å©±â */
RLIMIT_STACK /* ÃÖ´ë ½ºÅà ũ±â */
RLIMIT_CORE /* ÃÖ´ë ÄÚ¾î ÆÄÀÏ Å©±â */
RLIMIT_RSS /* ÃÖ´ë °ÅÁÖ ÁýÇÕ Å©±â */
RLIMIT_NPROC /* ÃÖ´ë ÇÁ·Î¼¼½º ¼ö */
RLIMIT_NOFILE /* ÃÖ´ë ¿ ¼ö ÀÖ´Â ÆÄÀÏÀÇ ¼ö */
RLIMIT_MEMLOCK /* ÃÖ´ë Àá±ä ±â¾ï Àå¼Ò ÁÖ¼Ò °ø°£ */
RLIMIT_AS /* ÁÖ¼Ò °ø°£(°¡»ó ¸Þ¸ð¸®) Á¦ÇÑ°ª */
¸¸ÀÏ RLIM_INFINITY·Î ¼³Á¤µÇ¾ú´Ù¸é ÀÚ¿øÀº ¹«Á¦ÇÑÀÌ´Ù. RLIMIT_OFILE´Â RLIMIT_NOFILE¿¡ ´ëÇÑ BSD À̸§ÀÌ´Ù.
rlimit ±¸Á¶Ã¼´Â ´ÙÀ½°ú °°´Ù:
struct rlimit { rlim_t rlim_cur; rlim_t rlim_max; };
getrusage´Â ÇöÀç ÀÚ¿øÀÇ »ç¿ë°ªÀ» ¹ÝȯÇÑ´Ù. who´Â RUSAGE_SELF³ª RUSAGE_CHILDREN Áß ÇϳªÀÌ´Ù.
struct rusage { struct timeval ru_utime; /* »ç¿ëµÈ »ç¿ëÀÚ ½Ã°£ */ struct timeval ru_stime; /* »ç¿ëµÈ ½Ã½ºÅÛ ½Ã°£ */ long ru_maxrss; /* ÃÖ´ë °ÅÁÖ ÁýÇÕ Å©±â */ long ru_ixrss; /* ÃÑ °øÀ¯ ¸Þ¸ð¸® Å©±â */ long ru_idrss; /* °øÀ¯µÇÁö ¾ÊÀº ÃÑ µ¥ÀÌŸ Å©±â */ long ru_isrss; /* °øÀ¯µÇÁö ¾ÊÀº ÃÑ ½ºÅà ũ±â */ long ru_minflt; /* ÆäÀÌÁö ¹Ýȯ(reclaims) */ long ru_majflt; /* ÆäÀÌÁö ÆúÆ® */ long ru_nswap; /* ½º¿Ò */ long ru_inblock; /* ºí·° ÀÔ·Â ¿¬»ê */ long ru_oublock; /* ºí·° Ãâ·Â ¿¬»ê */ long ru_msgsnd; /* º¸³½ ¸Þ¼¼Áö */ long ru_msgrcv; /* ¹ÞÀº ¸Þ¼¼Áö */ long ru_nsignals; /* ¹ÞÀº ½Ã±×³Î */ long ru_nvcsw; /* ÀÚ¹ßÀûÀÎ ¹®¸Æ ±³È¯ */ long ru_nivcsw; /* ºñÀÚ¹ßÀûÀÎ ¹®¸Æ ±³È¯ */ };