日期:2014-05-16  浏览次数:20636 次

Linux ulimit的用途

????? Linux? ulimit命令设置运行在shell上的显示限制。它有几个常用的参数。

????? -a? 显示当前的限制

???? -c? 限制内存垃圾大小

???? -f? 限制运行进程创建的输出文件的大小

???? 例如我的机器是redhat5.4 ,在我的机器上输入ulimit -a后显示:

?

[chenwu@localhost unit24-testShell]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 16237
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16237
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

?