-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathulimits and nproc
35 lines (23 loc) · 1.19 KB
/
ulimits and nproc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
to increase ulimits for all users
for ulimits add the following line to /etc/security/limits.cof
* soft nofile 65536
* hard nofile 65536
for nproc values add the following line to /etc/security/limits.d/20-xxxx
* soft nproc 65536
if u wnat to change limits for a particular user use linux username instead of * and the value u want to put instead of 65536
echo ` hostname -f ` `pip3 list installed|grep six ` ` date `
echo $(hostname -f) $(pip3 list installed|grep six) $(date)
both giv same output - <hostanme> six (1.10.0) <date command output> - in one line
to change the max number of pids use command - sudo sysctl -w kernel.pid_max=4194304
u can chk this is in file /proc/sys/kernel/pid_max
script to change ulimits and process limits (nproc) -
for (( i=0; i<=0; i++))
do
ssh -i <pem file name>.pem user@<hostname> "sudo tee -a /etc/security/limits.conf << END
* hard nproc 65536
* soft nproc 65536
* hard nofile 65536
* soft nofile 65536
END
sudo sed -i 's|4096|65536|g' /etc/security/limits.d/20-nproc.conf"
done