1846713 Members
3271 Online
110256 Solutions
New Discussion

Re: ulimit

 
Anil Raj_1
New Member

ulimit

Hi All,

Can I know more about 'ulimit'

Thanks

Anil
7 REPLIES 7
Deoncia Grayson_1
Honored Contributor

Re: ulimit

ulimit command is used to limit user resources. If you used the -a opton is lists current resource limits. Its very useful if you want to specify a limit for resources,
ex: if you don't want the shell to create a core file larger than 1024 blocks , you can use the following command:

ulimit -c 1024
ulimit -a
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
John Poff
Honored Contributor

Re: ulimit

Hi,

The 'ulimit' command lets you set or display resource limits.

One place to find out about it is in the man page for the POSIX shell. Do a 'man sh-posix' and search for 'ulimit'.

JP
A. Clay Stephenson
Acclaimed Contributor

Re: ulimit

Not unless you define it a bit better. Are you referring to the file size ulimit? (most common); core dump limit? number of file descriptors? limit of stack or data areas?

Ulimit can apply to all of these and it epends upon which shell you are running as to how many of these can be changed. There are also "hard" limits (set in the kernel) which cannot be exceeded and "soft" limits which can be increased up to the "hard" value. Man sh-posix (search for ulimit) and man 2 ulimit for details. These man pages should tell you everything you need to know -- or at least get you to the point of better asking your question.
If it ain't broke, I can fix that.
RAC_1
Honored Contributor

Re: ulimit

man sh-posix for details.
ulimit -Sa -- to know soft limits
ulimit -Ha -- Hard limits

ulimit -c xx (core file size)
ulimit -n xx (no. of file descriptors)
ulimit -s xx (stack size)
ulimit -d xx (data size)
ulimit -f xx (file blocks)
ulimit -t xx (time in secs)

Anil
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor

Re: ulimit

You sure can:

ulimit - get and set user limits


You can also use it to limit the size of core dumps:

To completely suppress core dumps:

Bourne-style shells: "ulimit -c 0"
C-style shells: "limit coredumpsize 0"

If you want to limit dumps to a specific size, specify a number instead of 0, in blocks for Bourne-style shells, or kilobytes for C-style shells.


Rgds...Geoff

BTW : a google for ulimit unix returns 29,800 pages.
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Anil Raj_1
New Member

Re: ulimit

hi all,

thanks for the info.

regards
Anil