How To Change UNIX Process Resource Limits

zhanglei_itput發表於2009-08-06


$ ulimit -a

[root@rac1 ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

[root@rac1 ~]# ulimit -u 16383
[root@rac1 ~]# ulimit -u
16383
 $ ulimit -s unlimited

 
HP-UX:
=====================================================================
1. On HP you cannot increase a soft limit above a kernel imposed hard limit.
2. To raise a kernel imposed hard limit use SAM or kmupdate.
3. Changing a kernel imposed hard limit requires a reboot.
4. HP-UX has some different process resource limits for 64bit executables that cannot be modified via 'limit' or 'ulimit'.  These parameters, recognizable by their '_64bit' suffix, can only be changed by an OS kernel update.

To display hard limit values from the HP-UX kernel:
   % sam
   -or-
   % /usr/sbin/sysdef|grep max    ('sysdef' desupported in HP-UX 11i)
   -or-  
   % /usr/sbin/kmtune|grep max
   maxdsiz              512*1024*1024
   maxdsiz_64bit        (256*1024*1024)
   maxfiles             60
   maxfiles_lim         1024
   maxssiz              0x00800000
   maxssiz_64bit        0x00800000
   maxtsiz              0x04000000
   maxtsiz_64bit        0x0000000040000000


參考文獻:
          Subject:  How to Display and Change UNIX Process Resource Limits
          Doc ID:  188149.1 Type:  BULLETIN
          Modified Date :  29-JAN-2007 Status:  PUBLISHED

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9252210/viewspace-611522/,如需轉載,請註明出處,否則將追究法律責任。

相關文章