ULIMIT(3) BSD Library Functions Manual ULIMIT(3)NAME
ulimit -- get and set process limits
Standard C Library (libc, -lc)
ulimit(int cmd, ...);
The ulimit() function will get and set process limits. Currently this is limited to the maximum file size. The cmd argument is one of the
UL_GETFSIZE will return the maximum file size in units of 512 blocks of the current process.
UL_SETFSIZE will attempt to set the maximum file size of the current process and its children with the second argument expressed as a long.
Upon successful completion, ulimit() returns the value requested; otherwise the value -1 is returned and the global variable errno is set to
indicate the error.
The ulimit() function will fail if:
[EINVAL] The command specified was invalid.
[EPERM] The limit specified to ulimit() would have raised the maximum limit value, and the caller is not the super-user.
SEE ALSO getrlimit(2)STANDARDS
The ulimit() function conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
The ulimit() function first appeared in FreeBSD 5.0.
The ulimit() function provides limited precision for setting and retrieving process limits. If there is a need for greater precision than
the type long provides, the getrlimit(2) and setrlimit(2) functions should be considered.
BSD January 4, 2003 BSD
Check Out this Related Man Page
ULIMIT(3) Linux Programmer's Manual ULIMIT(3)NAME
ulimit - get and set user limits
long ulimit(int cmd, long newlimit);
Warning: This routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell command ulimit(), see bash(1).
The ulimit() call will get or set some limit for the calling process. The cmd argument can have one of the following values.
Return the limit on the size of a file, in units of 512 bytes.
Set the limit on the size of a file.
3 (Not implemented for Linux.) Return the maximum possible address of the data segment.
4 (Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open.
On success, ulimit() returns a nonnegative value. On error, -1 is returned, and errno is set appropriately.
EPERM A unprivileged process tried to increase a limit.
SVr4, POSIX.1-2001. POSIX.1-2008 marks ulimit() as obsolete.
SEE ALSO bash(1), getrlimit(2), setrlimit(2), sysconf(3)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-08-06 ULIMIT(3)
i've encountered the following problem with sco unixware7.
after using the "ulimit -f unlimited" command and then using "ulimit -a" it lists the filesize as unlimited.
BUT, when type the ulimit command without parameters, the output is given as 4194303
so i can't create a file bigger than... (4 Replies)
I want to know the interrupt passed to a process through 'ulimit'
I am running a process which gets killed when the 'ulimit -t' reaches.
But after killing the process I want to start another process which would
send a message or do some clean up or anything at all.
To do the same I am... (5 Replies)
I have a Sun machine 5.8 and would like to modify the ulimit parameter for numner of file descriptors.
the output of plimit <process name> is:
resource current maximum
time(seconds) unlimited unlimited
file(blocks) ... (8 Replies)
as we know, ulimit can be used to limit the stack and heap size of a process occupy. However, the space for 32-bits and 64 bits process are different.
for example, "ulimit -s xxxx" only limit the stack size of 32- bits process, am I right?
How to limit the size of 64-bits process?
thanks a... (5 Replies)
I am working on AIX and i dont have permission for /etc/security/limits file.
In the man page of ulimit it is mentioned that it will get the limitations for me from /etc/security/limits file.
the file permission for ulimit command is
-r-xr-xr-x 15 bin bin ... (6 Replies)
We have an AIX system on oslevel 5.2 and we have the current limits set for the user "XXX"
coredump(blocks) 2097151... (4 Replies)
I would like to set the maximum number or open files per process to be greater than 1024000 (for specific application scalability purpose). I am using RHEL 5.3/Ext4.
fs.file-max = 164766821
I also have added the folloing to /etc/security/limits.conf
* ... (7 Replies)
How can I setup the ulimit for memory permanent
ulimit -m unlimited
ulimit -a Output from the ulimit command should be similar to the following:time(seconds) unlimited
stack(kbytes) 32768... (4 Replies)
I need to increase the ulimit value permanently without changing /etc/system file. i.e nofiles descriptor.
For all NIS Users logging in.
I know the command to do this:
# ulimit -Sn 4096
This change is temporary.
So, I went on adding this command in the /etc/profile.
... (6 Replies)
I got a question on ulimit on HP-UX. I have a log file that gets more than 2 GB and the application crashes because it can not write to log. I browsed through the forum and found one very similar post on ulimit but that was not concluded. Did some analysis and below is some output.
>getconf... (6 Replies)
i'm a student in IT specially AIX.
I'm from france and i'm not very fluent in english.
My problem is about create an mksysb from a NIM MASTER
0512-005 mksysb: Backup Completed.urred for rootvg.
than thThe backup command completed with errors.
backup: The messages displayed on... (12 Replies)
what are the ideal/best/recommended ulimit settings for a root user in AIX?
I understand that it depends on our environment. But I would like to know...what are settings you guys use in your environment for best performance.
fsize = 2097151
core = 2097151
... (8 Replies)