Linux Troubleshooting Make Easy.

Linux Learning & Troubleshooting Make Easy.

Set ULimit for A USER

The ulimit programs allow to limit system-wide resource use. This can help a lot in system administration, when a user starts too many processes and therefore makes the system unresponsive for other users. By applying uLimit for the user we can limit the resouces use.




ULimit Options:
#  ulimit -a


core file size                   (blocks, -c) 0
data seg size                   (kbytes, -d) unlimited
scheduling priority           (-e) 0
file size                            (blocks, -f) unlimited
pending signals                (-i) 1056767
max locked memory        (kbytes, -l) 32
max memory size             (kbytes, -m) unlimited
open files                         (-n) 1024
pipe size                           (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size                        (kbytes, -s) 10240
cpu time                          (seconds, -t) unlimited
max user processes         (-u) unlimited
virtual memory                (kbytes, -v) unlimited
file locks                         (-x) unlimited


To Set ULimit for a user permanently:

Add the line to /etc/pam.d/login:
#  vi /etc/pam.d/login

         session  required  pam_limits.so                   

Edit the ulimit configuration file or .bash_profile for the user:
You can add below parameters in any one place.
#  vi /etc/security/limits.conf      or       #  vi
.bash_profile

   Add following parameters.
   #<domain>      <type>  <item>         <value>

   username    soft    nofile        1024
   username    hard    nofile        65536
   ......

Where:

<domain> can be:
        - an user name
        - a group name, with @group syntax
        - the wildcard *, for default entry
        - the wildcard %, can be also used with %group syntax,

<type> can have the two values:
        - "soft" for enforcing the soft limits
        - "hard" for enforcing hard limits

<item> can be one of the following:
        - core - limits the core file size (KB)
        - data - max data size (KB)
        - fsize - maximum filesize (KB)
        - memlock - max locked-in-memory address space (KB)
        - nofile - max number of open files
        - rss - max resident set size (KB)
        - stack - max stack size (KB)
        - cpu - max CPU time (MIN)
        - nproc - max number of processes
        - as - address space limit
        - maxlogins - max number of logins for this user
        - maxsyslogins - max number of logins on the system
        - priority - the priority to run user process with
        - locks - max number of file locks the user can hold
        - sigpending - max number of pending signals
        - msgqueue - max memory used by POSIX message queues (bytes)
        - nice - max nice priority allowed to raise to
        - rtprio - max realtime priority



Reboot the server and verify the changes:
#  ulimit -a

11 comments:

Coach Factory said...

canada goose, instyler ionic styler, ugg boots, moncler, nfl jerseys, moncler, abercrombie and fitch, birkin bag, juicy couture outlet, marc jacobs, reebok outlet, moncler outlet, mac cosmetics, mcm handbags, juicy couture outlet, canada goose pas cher, celine handbags, babyliss pro, wedding dresses, north face outlet, canada goose outlet, soccer shoes, giuseppe zanotti, beats by dre, canada goose outlet, bottega veneta, chi flat iron, uggs on sale, asics shoes, north face jackets, moncler, canada goose outlet, herve leger, canada goose uk, soccer jerseys, moncler, ghd, new balance shoes, p90x3, jimmy choo shoes, mont blanc, ugg outlet, lululemon outlet, valentino shoes, ferragamo shoes, ugg, supra shoes, insanity, ugg boots, rolex watches

Coach Factory said...

hermes pas cher, lululemon, tn pas cher, hogan sito ufficiale, nike air max, longchamp, nike blazer, converse pas cher, michael kors, karen millen, roshe run, hollister, nike free, oakley pas cher, nike free pas cher, sac louis vuitton, ray ban pas cher, air force, nike roshe run, ray ban uk, air jordan, vanessa bruno, abercrombie and fitch, nike roshe, timberland, louboutin, longchamp soldes, michael kors, vans outlet, north face, nike huarache, ralph lauren pas cher, montre femme, longchamp, nike trainers, air max, burberry, louis vuitton uk, barbour, lacoste, louis vuitton, sac guess, ralph lauren, vans pas cher, sac louis vuitton, michael kors, mulberry, new balance pas cher, hollister, hollister

Coach Factory said...

michael kors outlet online, michael kors outlet store, air max, coach purses, oakley sunglasses cheap, louboutin, louis vuitton outlet online, oakley vault, louis vuitton outlet, prada outlet, louis vuitton outlet, kate spade handbags, coach outlet, michael kors outlet online, prada handbags, ray ban sunglasses, nike air max, polo ralph lauren outlet, louis vuitton handbags, michael kors outlet, burberry outlet online, longchamp handbags, gucci outlet, jordan shoes, nike shoes, longchamp handbags, nike free, coach outlet store online, ray ban outlet, louboutin outlet, polo ralph lauren outlet online, oakley sunglasses, coach outlet, kate spade outlet, coach factory outlet, chanel handbags, louis vuitton, michael kors outlet, tiffany and co, michael kors outlet online, burberry outlet online, louboutin shoes, tory burch outlet, longchamp outlet, christian louboutin shoes

ninest123 Ninest said...

ninest123 11.26
michael kors handbags, burberry factory outlet, longchamp bags, replica watches, louboutin uk, michael kors outlet, uggs outlet, prada handbags, louis vuitton outlet online, cheap oakley sunglasses, ralph lauren outlet, louis vuitton outlet, cheap jordans, louboutin shoes, louis vuitton, gucci handbags, ralph lauren polo, oakley sunglasses, oakley sunglasses, oakley sunglasses, longchamp outlet, ray ban sunglasses, longchamp outlet, nike outlet, ray ban sunglasses, christian louboutin, uggs outlet, prada outlet, nike free, michael kors outlet online, nike air max, ray ban sunglasses, uggs on sale, christian louboutin, nike air max, replica watches, michael kors outlet online, burberry outlet, uggs on sale, tiffany jewelry, louis vuitton handbags, oakley sunglasses, tiffany jewelry, uggs on sale, tory burch outlet, michael kors, louis vuitton outlet, michael kors outlet online

ninest123 Ninest said...

longchamp pas cher, timberland pas cher, polo ralph lauren uk, nike trainers uk, true religion outlet, hermes pas cher, nike roshe run pas cher, nike tn pas cher, michael kors, nike air max pas cher, michael kors uk, abercrombie and fitch UK, north face uk, north face pas cher, mulberry uk, vanessa bruno pas cher, michael kors, lunette ray ban pas cher, sac guess pas cher, longchamp soldes, nike air max uk, coach purses, louboutin pas cher, coach outlet store online, abercrombie and fitch, ralph lauren pas cher, true religion outlet, vans pas cher, hollister uk, nike free pas cher, true religion outlet, nike free, nike air max uk, ray ban uk, jordan pas cher, polo lacoste pas cher, nike blazer pas cher, hogan sito ufficiale, true religion jeans, lunette oakley pas cher, lululemon outlet, nike roshe uk, nike air max, new balance, converse, burberry pas cher, coach outlet, michael kors outlet online, nike air force

ninest123 Ninest said...

iphone 6s cases, mac cosmetics, north face outlet, oakley, vans scarpe, nike air max, hermes handbags, softball bats, ipad cases, s6 cases, louboutin, nike roshe run, gucci, vans outlet, abercrombie and fitch, celine handbags, mont blanc, valentino shoes, iphone 5s cases, ray ban, giuseppe zanotti, lululemon outlet, beats by dre, nfl jerseys, mcm handbags, bottega veneta, nike air max, iphone 6 cases, chi flat iron, insanity workout, iphone cases, converse, asics running shoes, instyler ionic styler, reebok outlet, babyliss pro, hollister clothing, north face outlet, polo ralph lauren, soccer shoes, wedding dresses, salvatore ferragamo, iphone 6 plus cases, new balance shoes, herve leger, iphone 6s plus cases, p90x workout, ghd hair, hollister, timberland boots, jimmy choo outlet, soccer jerseys

ninest123 Ninest said...

louis vuitton, pandora jewelry, moncler, pandora uk, canada goose, canada goose pas cher, barbour jackets uk, moncler, canada goose outlet, hollister, louis vuitton, moncler jackets, replica watches, toms shoes, uggs outlet, moncler, canada goose outlet, ugg pas cher, canada goose uk, lancel, ugg uk, juicy couture outlet, bottes ugg pas cher, converse shoes outlet, thomas sabo uk, karen millen uk, wedding dresses uk, sac louis vuitton, pandora charms, supra shoes, pandora jewelry, barbour, moncler pas cher, coach outlet, moncler outlet, marc jacobs, louis vuitton uk, ugg,uggs,uggs canada, swarovski jewelry, canada goose jackets, canada goose, sac louis vuitton, doke & gabbana, moncler, ugg,ugg australia,ugg italia, montre pas cher, canada goose jackets, swarovski uk, juicy couture outlet, links of london uk, moncler uk
ninest123 11.26

chenlina said...

chenlina20151219
louis vuitton outlet
michael kors bag
canada goose outlet
ugg boots
ugg boots outlet
michael kors outlet
ugg boots
canada goose jackets
michaek kors outlet
cheap ugg boots
canada goose outlet
polo ralph lauren
uggs on sale
michael kors outlet online
the north face outlet
louis vuitton outlet
cheap air max
abercrombie and fitch
canada goose outlet
ray ban sunglasses
tory burch outlet
jordan 11
uggs boots for women
oakley sunglasses
coach outlet
louis vuitton handbags
timberland outlet
ray ban sunglasses outlet
ray ban sunglasses outlet
abercrombie kids
canada goose outlet online
coach outlet store online
coach outlet
michael kors outlet
ugg boots
uggs outlet
canada goose jackets
hollister co
abercrombie & fitch
ugg boots
as

艾丰 said...

jianbin0324
nike air max
swarovski outlet
ray-ban sunglasses
michael kors outlet online
jordan shoes
michael kors canada
michael kors handbags
lebron shoes
mbt shoes
air jordan 4
mlb jerseys
links of london
mcm backpack
pandora outlet
louis vuitton handbags
prada handbags
cheap nfl jersey
ralph lauren,polo ralph lauren,ralph lauren outlet,ralph lauren italia,ralph lauren sito ufficiale
abercrombie and fitch
hermes birkin bag
cheap nike shoes
louis vuitton outlet store
michael kors outlet
michael kors handbags
louis vuitton outlet
michael kors factory outlet
hermes belt for sale
true religion jeans
mulberry outlet store
adidas outlet store
michael kors handbags
coach outlet store
air jordan shoes for sale
mac cosmetics
hermes outlet
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
nike foamposite
nfl jerseys wholesale
lebron shoes

艾丰 said...

jianbin0325
nike air max
swarovski outlet
ray-ban sunglasses
michael kors outlet online
jordan shoes
michael kors canada
michael kors handbags
lebron shoes
mbt shoes
air jordan 4
mlb jerseys
links of london
mcm backpack
pandora outlet
louis vuitton handbags
prada handbags
cheap nfl jersey
ralph lauren,polo ralph lauren,ralph lauren outlet,ralph lauren italia,ralph lauren sito ufficiale
abercrombie and fitch
hermes birkin bag
cheap nike shoes
louis vuitton outlet store
michael kors outlet
michael kors handbags
louis vuitton outlet
michael kors factory outlet
hermes belt for sale
true religion jeans
mulberry outlet store
adidas outlet store
michael kors handbags
coach outlet store
air jordan shoes for sale
mac cosmetics
hermes outlet
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
nike foamposite
nfl jerseys wholesale
lebron shoes

Xiaozhengm 520 said...

2016-4-7 xiaozhengm
nike basketball shoes
oakley sunglasses
michael kors outlet clearance
louis vuitton bags
replica watches
michael kors outlet
pandora jewelry
kate spade outlet
louis vuitton outlet
louis vuitton outlet
ray ban sunglasses
ray ban sunglasses
ray ban uk
coach factory outlet
oakley sunglasses
tiffany outlet
oakley sunglasses wholesale
replica watches
fitflops
nike uk
christian louboutin sale
nike sb
michael kors outlet clearance
michael kors outlet
michael kors outlet
ralph lauren
replica watches for sale
ray ban sunglasses
gucci outlet
coach outlet
michael kors outlet
tiffany and co
polo ralph shirts
cheap oakley sunglasses
michael kors handbags
nike air max 90
nike running shoes
coach outlet store online
mont blanc pens
insanity workout