标题: solaris 修改ulimit的方式是什么? [打印本页] 作者: tomasfly88 时间: 2011-01-18 14:05 标题: solaris 修改ulimit的方式是什么? 1.想问一下.为什么直接执行就报错?
ulimit -c 2048
[oracle@boss ~]$ ulimit -c 2048
-bash: ulimit: core file size: cannot modify limit: Operation not permitted
2.想问一下solaris下改某一用户的limit 标准方法是什么?作者: yqx1986 时间: 2011-01-20 14:32
权限不对吧作者: michael1983 时间: 2011-01-20 20:44
只能root?作者: liuhao75926 时间: 2011-01-20 22:26
Step1: check current status(stack,nofiles) using “ulimit –a” command
login as: admin
Using keyboard-interactive authentication.
Password:
Last login: Sat Jul 19 23:28:17 2008 from 192.168.1.9
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8480
coredump(blocks) unlimited
nofiles(descriptors) 1024
memory(kbytes) unlimited
Step 2:modify file /etc/system(login as root) .Then reboot pc, that’s absolutely necessary.
$ su -
Password:
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
##### We append /etc/system ######
#vi /etc/system
*set Hard limit on file descriptors
set rlim_fd_max=8192
*set soft limit on file descriptors
set rlim_fd_cur=4096
"/etc/system" 81 lines, 1996 characters
#reboot
Step 3: check current status again login as both root and common user
############wait for starting OS ###############
login as: admin
Using keyboard-interactive authentication.
Password:
Last login: Sat Jul 19 23:28:17 2008 from 192.168.1.9
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ su -
Password:
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8480
coredump(blocks) unlimited
nofiles(descriptors) 4096
memory(kbytes) unlimited
# su - admin
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8480
coredump(blocks) unlimited
nofiles(descriptors) 4096
memory(kbytes) unlimited