Search This Blog

Loading...

Friday, January 16, 2009

Purpose Of ulimit Linux Command

Linux command ulimit used to control how system resources shared by login users processes
The ulimit is a Linux built-in shell command, which provides control over the resources available to the shell and to processes started by it, on systems that allow such control.

That is to say, each user login session may have different limit of access to system resources. For example, an ordinary user login may not allow to create core dump file while a program crash, except for developer user account.

Why? This "user limit" control avoid system resources shared evenly among login users and overhang others VIP users who are running critical processes that rely on certain system resource.

Related information:
  • Type ulimit -a to print the soft limit of all system resources that are controlled by ulimit in the current login session.
  • Type ulimit -Hc unlimited to set hard limit of core dump file size to unlimited in the current login session, provided Linux system has not set such hard limit during system boot up.
  • Type ulimit -Sc 1000000 to set soft limit of core dump file size limited to 1G in the current login session.
  • Type ulimit -c 1000000 to set both hard and soft limit of core dump file size limited to 1G in the current login session, provided Linux system has not set such hard limit during system boot up.
  • Type ulimit -Hc to check the maximum hard limit of core dump file size
  • Type ulimit -Sc to check the maximum soft limit of core dump file size
  • A hard limit cannot be increased once it is set unless rebooting the Linux
  • A soft limit may be increased up to the value of the hard limit.
  • Type ulimit -f 100000 to set both hard and soft limit of maximum file size limited to 100MB.
  • Refer to the diagram above for the ulimit option switches of other system resources, such as -l for maximum locked memory and its respective quantity scale.
  • Global ulimit setting file /etc/security/limits.conf used by Linux during system boot up, to preset hard and/or soft limit of system resources for respective user account.

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails