Sponsored Content
Full Discussion: AIX change ulimit for a user
Top Forums UNIX for Advanced & Expert Users AIX change ulimit for a user Post 303042604 by MadeInGermany on Wednesday 1st of January 2020 05:14:11 AM
Old 01-01-2020
The point is: set a real limit.
"Unlimted" means a process is allowed to consume all system resources. And a buggy/wild/looping process could do so.
This User Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

Handling User Id Change in AIX

Hi, I have a query that suppose the first or last name of the user changes and we need to change its userid for aix too. Then in that case how do we handle this scenario??I guess we can't change the user id so we should re-create the new id and associate all the data of the old id. But I donno... (1 Reply)
Discussion started by: tintin@10
1 Replies

2. UNIX for Dummies Questions & Answers

How to make ulimit change permanent

ulimit -a gives the following output:$ulimit -a time(seconds) unlimited file(blocks) 2097152 data(kbytes) 131072 stack(kbytes) 16384 memory(kbytes) unlimited coredump(blocks) 32768 nofiles(descriptors) 400 vmemory(kbytes) 147456 Abot output... (3 Replies)
Discussion started by: nervous
3 Replies

3. AIX

how to set the ulimit on AIX 5.2 version?

how to set the ulimit on AIX 5.2 version? (3 Replies)
Discussion started by: Shilpi
3 Replies

4. AIX

Increase the filesize ulimit for a user?

Hi Guys, How do I increase the filesize ulimit for user jf01474, using the same value as of user oracle? Ex: /etc/security/limits default: fsize = 4194302 core = 2097151 cpu = -1 data = 262144 rss = 65536 stack = 65536 ... (3 Replies)
Discussion started by: sky_lark02
3 Replies

5. HP-UX

change ulimit fsize permanantly

Hi, on HP-UX when I run command ulimit -a I get time(seconds) 4096 file(blocks) unlimited data(kbytes) 1048576 stack(kbytes) 8192 memory(kbytes) unlimited coredump(blocks) 4194303 nofiles(descriptors) 4096 Now I want to change file(blocks) ... (2 Replies)
Discussion started by: namita.mundada
2 Replies

6. UNIX for Dummies Questions & Answers

AIX user ID and group ID change

Hello AIX gurus, I have a requirement where I have to change user ID of user "myuser" from 100 to 200 and also the group ID of "mygroup" from 2 to 3. Please note that "myuser" has "mygroup" as it's primary group. What steps do I need to follow for this and in what order? Also can you please... (2 Replies)
Discussion started by: sacguy08
2 Replies

7. AIX

AIX 6.1 Kernal Parameters ulimit

Hello, 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 file(blocks) unlimited data(kbytes) 2097152 stack(kbytes) 32768... (4 Replies)
Discussion started by: filosophizer
4 Replies

8. UNIX for Dummies Questions & Answers

AIX User Change Log

Hello All, If a user in AIX is locked due to multiple failed login attempts. How do I find out the IP address from where failed attempts were made? regards, Roshni (0 Replies)
Discussion started by: RoshniMehta
0 Replies

9. Red Hat

setting ulimit for a user

The root user runs the following ulimit -a | grep open and gets a result of open files (-n) 8162 A user runs the same command and gets a result of open files (-n) 2500 How can you set the ulimit of the user to... (2 Replies)
Discussion started by: jsanders
2 Replies

10. AIX

What are the ideal ulimit settings for root user in AIX?

Hi, 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. default: fsize = 2097151 core = 2097151 ... (8 Replies)
Discussion started by: System Admin 77
8 Replies
GETRLIMIT(2)						      BSD System Calls Manual						      GETRLIMIT(2)

NAME
getrlimit, setrlimit -- control maximum system resource consumption LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/resource.h> int getrlimit(int resource, struct rlimit *rlp); int setrlimit(int resource, const struct rlimit *rlp); DESCRIPTION
Limits on the consumption of system resources by the current process and each process it creates may be obtained with the getrlimit() call, and set with the setrlimit() call. Resources of an arbitrary process can be obtained/changed using sysctl(3). The resource parameter is one of the following: RLIMIT_AS The maximum amount (in bytes) of virtual memory the process is allowed to map. RLIMIT_CORE The largest size (in bytes) core file that may be created. RLIMIT_CPU The maximum amount of CPU time (in seconds) to be used by each process. RLIMIT_DATA The maximum size (in bytes) of the data segment for a process; this defines how far a program may extend its break with the sbrk(2) system call. RLIMIT_FSIZE The largest size (in bytes) file that may be created. RLIMIT_MEMLOCK The maximum size (in bytes) which a process may lock into memory using the mlock(2) function. RLIMIT_NOFILE The maximum number of open files for this process. RLIMIT_NPROC The maximum number of simultaneous processes for this user id. RLIMIT_RSS The maximum size (in bytes) to which a process's resident set size may grow. This imposes a limit on the amount of physical memory to be given to a process; if memory is tight, the system will prefer to take memory from processes that are exceeding their declared resident set size. RLIMIT_SBSIZE The maximum size (in bytes) of the socket buffers set by the setsockopt(2) SO_RCVBUF and SO_SNDBUF options. RLIMIT_STACK The maximum size (in bytes) of the stack segment for a process; this defines how far a program's stack segment may be extended. Stack extension is performed automatically by the system. A resource limit is specified as a soft limit and a hard limit. When a soft limit is exceeded a process may receive a signal (for example, if the CPU time or file size is exceeded), but it will be allowed to continue execution until it reaches the hard limit (or modifies its resource limit). The rlimit structure is used to specify the hard and soft limits on a resource, struct rlimit { rlim_t rlim_cur; /* current (soft) limit */ rlim_t rlim_max; /* hard limit */ }; Only the super-user may raise the maximum limits. Other users may only alter rlim_cur within the range from 0 to rlim_max or (irreversibly) lower rlim_max. An ``infinite'' value for a limit is defined as RLIM_INFINITY. Because this information is stored in the per-process information, this system call must be executed directly by the shell if it is to affect all future processes created by the shell. Thus, shells provide built-in commands to change the limits (limit for csh(1), or ulimit for sh(1)). The system refuses to extend the data or stack space when the limits would be exceeded in the normal way: a brk(2) call fails if the data space limit is reached. When the stack limit is reached, the process receives a segmentation fault (SIGSEGV); if this signal is not caught by a handler using the signal stack, this signal will kill the process. A file I/O operation that would create a file larger that the process' soft limit will cause the write to fail and a signal SIGXFSZ to be generated; this normally terminates the process, but may be caught. When the soft CPU time limit is exceeded, a signal SIGXCPU is sent to the offending process. RETURN VALUES
A 0 return value indicates that the call succeeded, changing or returning the resource limit. Otherwise, -1 is returned and the global vari- able errno is set to indicate the error. ERRORS
The getrlimit() and setrlimit() will fail if: [EFAULT] The address specified for rlp is invalid. [EINVAL] Specified resource was invalid; or, in the setrlimit() call, the specified rlim_cur exceeds the specified rlim_max. [EPERM] The limit specified to setrlimit() would have raised the maximum limit value, and the caller is not the super-user. The setrlimit() function may fail if: [EINVAL] The limit specified to setrlimit() cannot be lowered, because current usage is already higher than the limit. SEE ALSO
csh(1), sh(1), mlock(2), setsockopt(2), sigaction(2), sigaltstack(2), libquota(3), sysctl(3) HISTORY
The getrlimit() function call appeared in 4.2BSD. BUGS
The resource limit RLIMIT_RSS is not implemented in uvm(9) which means that process memory size limits are not enforced. BSD
November 15, 2011 BSD
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy