first
This commit is contained in:
12
cgenforce.sh
Executable file
12
cgenforce.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
USERS=$(ps | grep -v root | grep -v PID | awk '{print $2}' | uniq)
|
||||
|
||||
for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
|
||||
for user in $USERS; do
|
||||
for pid in $(pgrep -u "$user"); do
|
||||
echo "$pid" > "/sys/fs/cgroup/users/$user/cgroup.procs"
|
||||
done
|
||||
done
|
||||
sleep 5
|
||||
done
|
||||
Reference in New Issue
Block a user