标签:
man ulimit:看到的是库函数里的帮助<ulimit.h>
info ulimit 跟man ulimit一样,看到的是那个函数long ulimit(int cmd,long newLimit)
这个函数已经obsolete(废弃),或者叫deprecated(不鼓励使用).因为它有替代者:getrlimit(2), setrlimit(2), sysconf(3)
实际上,还有一个ulimit,它是shell的内置命令
type ulimit: ulimit is a shell builtin
help ulimit: 查看ulimit的参数信息所以在shell中有6种方式提供帮助:
两次tab键
help xxx :可以查看内置命令
info xxx :可以在控制台下直接看帮助
man xxx :可以像看书一样看帮助
echo $PATH :然后可以cd到全局变量下面,去看有哪些可执行的命令
一些小玩意:which,whereis,type查看命令的位置,类型等
===================================================
ulimit: ulimit [-SHabcdefilmnpqrstuvxT] [limit]
Modify shell resource limits.对shell资源加以限制
Provides control over the resources available to the shell and processes
it creates, on systems that allow such control.
Options:
-S use the `soft‘ resource limit 软限制
-H use the `hard‘ resource limit 硬限制
-a all current limits are reported 查看现在的全部限制
-b the socket buffer size 套接字缓冲区大小
-c the maximum size of core files created 内核文件大小
-d the maximum size of a process‘s data segment 进程数据段大小
-e the maximum scheduling priority (`nice‘) 最低的优先级
-f the maximum size of files written by the shell and its children 文件输出大小
-i the maximum number of pending signals
-l the maximum size a process may lock into memory
-m the maximum resident set size 常驻集大小
-n the maximum number of open file descriptors
-p the pipe buffer size 管道缓冲区大小
-q the maximum number of bytes in POSIX message queues
-r the maximum real-time scheduling priority
-s the maximum stack size 栈的最大值
-t the maximum amount of cpu time in seconds 运行时间
-u the maximum number of user processes 本进程及其子进程最大进程数
-v the size of virtual memory 虚存最大值
-x the maximum number of file locks 最大文件锁,也就是最多对多少文件加锁
-T the maximum number of threads 最大线程数
Not all options are available on all platforms. 不同的平台对ulimit有不同的支持,ulimit并非所有的选项都能扩平台.
If LIMIT is given, it is the new value of the specified resource; the
special LIMIT values `soft‘, `hard‘, and `unlimited‘ stand for the
current soft limit, the current hard limit, and no limit, respectively.
Otherwise, the current value of the specified resource is printed. If
no option is given, then -f is assumed.
如果在命令中给出了限制,那就是set;否则,那就是get.如果没有选项,那就默认-f选项,显示本进程树正在写的文件.
Values are in 1024-byte increments, except for -t, which is in seconds,
-p, which is in increments of 512 bytes, and -u, which is an unscaled
number of processes.
上面那些参数设值以1024byte递增(除了-t和-p选项,-t的单位是秒,-p的递增单位是512字节)
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.
如果运行成功,返回0.否则返回错误状态
标签:
原文地址:http://www.cnblogs.com/weidiao/p/5018738.html