limits.c revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Copyright (c) 1982-2007 AT&T Knowledge Ventures *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* by AT&T Knowledge Ventures *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This is the list of resouce limits controlled by ulimit
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This command requires getrlimit(), vlimit(), or ulimit()
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinconst char* e_units[] = { 0, "block", "byte", "kbyte", "second" };
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"as", "address space limit", RLIMIT_AS, 0, 'M', LIM_KBYTE,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"core", "core file size", RLIMIT_CORE, 0, 'c', LIM_BLOCK,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"locks", "number of file locks", RLIMIT_LOCKS, 0, 'L', LIM_COUNT,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"memlock", "locked address space", RLIMIT_MEMLOCK, 0, 'l', LIM_KBYTE,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"nofile", "number of open files", RLIMIT_NOFILE, "OPEN_MAX", 'n', LIM_COUNT,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"nproc", "number of processes", RLIMIT_NPROC, "CHILD_MAX", 'u', LIM_COUNT,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"pipe", "pipe buffer size", RLIMIT_PIPE, "PIPE_BUF", 'p', LIM_BYTE,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"rss", "resident set size", RLIMIT_RSS, 0, 'm', LIM_KBYTE,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"sbsize", "socket buffer size", RLIMIT_SBSIZE, "PIPE_BUF", 'b', LIM_BYTE,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"threads", "number of threads", RLIMIT_PTHREAD, "THREADS_MAX", 'T', LIM_COUNT,