Control Available Resources with ulimit

Besides you can check by using sysctl -p for kernel share maximum memory etc.
Use these params to setup your max open files, max locked memory, max user process etc. For an example :
~# ulimit -a
~# ulimit -n 1048576
~# ulimit -l unlimited
~# ulimit -u unlimited

Or defining them into /etc/security/limits.conf like these:
*               soft    memlock         unlimited
*               hard    memlock         unlimited
*               soft    nofile          1048576
*               hard    nofile          1048576
*               soft    nproc           unlimited
*               hard    nproc           unlimited

But you are required pam_limit.so on your /etc/pam.d/su
session         required        pam_limits.so
or /etc/pam.d/common-session (debian only):
session         required        pam_limits.so
or /etc/pam.d/su
session         required        pam_limits.so         readenv=1

NOTED :

<item>
core
limits the core file size (KB)
data
maximum data size (KB)
fsize
maximum filesize (KB)
memlock
maximum locked-in-memory address space (KB)
nofile
maximum number of open files
rss
maximum resident set size (KB)
stack
maximum stack size (KB)
cpu
maximum CPU time (minutes)
nproc
maximum number of processes as address space limit
maxlogins
maximum number of logins for this user
maxsyslogins
maximum number of logins on system
priority
the priority to run user process with (negative values boost process priority)
locks
maximum locked files (Linux 2.4 and higher)
sigpending
maximum number of pending signals (Linux 2.6 and higher)
msqqueue
maximum memory used by POSIX message queues (bytes) (Linux 2.6 and higher)
nice
maximum nice priority allowed to raise to (Linux 2.6.12 and higher)
rtprio
maximum realtime priority allowed for non-privileged processes (Linux 2.6.12 and higher)

Advertisements

Tinggalkan pesan atau komentar

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s