在busybox里使用ulimit命令

刚才想使用ulimit修改用户进程的用户栈的大小,发现busybox里没有这个命令,上google搜索得到如下解释:

"ulimit" is a shell builtin, meaning it's a reserved word interpreted by the shell, not a busybox applet. 
It will not appear
in the list of busybox applets, but as long as you have sh, your shell scripts will
understand ulimit commands

发现ulimit是shell的内置命令,需要使用下面的方式使用:

busybox sh -c 'ulimit -a'

然后发现,执行完这条命令后,ulimit就可以直接使用了:

[root@vexpress ]# ulimit -a
-f: file size (blocks) unlimited
-t: cpu time (seconds) unlimited
-d: data seg size (kb) unlimited
-s: stack size (kb)
-c: core file size (blocks)
-m: resident set size (kb) unlimited
-l: locked memory (kb)
-p: processes
-n: file descriptors
-v: address space (kb) unlimited
-w: locks unlimited
-e: scheduling priority
-r: real-time priority

==

上一篇:mysql查询今日、本周、本月记录


下一篇:hadoop日志数据分析开发步骤及代码