Jei forume lankaisi pirmą kartą, kviečiame registruotis ir prisijungti prie diskusijų.
PrisijungtiRegistruotisJei forume lankaisi pirmą kartą, kviečiame registruotis ir prisijungti prie diskusijų.
sudo apt-get install cpulimit
sudo yum install epel-release
sudo yum install cpulimit
arba
sudo dnf install cpulimit
nano highcpu.sh
#!/bin/bash
while :; do :; done;
chmod +x highcpu.sh
./highcpu.sh &
[1] 1887
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1887 root 20 0 9508 1200 1012 R 99.7 0.0 0:21.46 highcpu.sh
237 root 20 0 47564 1604 1108 S 0.7 0.0 11:51.14 rpcbind
379 root 20 0 71532 3108 1912 S 0.3 0.0 0:29.04 apache2
1 root 20 0 37396 3644 2108 S 0.0 0.0 0:09.13 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd/1+
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper/15+
72 root 20 0 133368 70296 70000 S 0.0 0.4 1:38.00 systemd-jo+
75 root 20 0 41628 1452 1004 S 0.0 0.0 0:00.38 systemd-ud+
239 message+ 20 0 42828 2044 1492 S 0.0 0.0 0:00.29 dbus-daemon
246 root 20 0 28484 1596 1292 S 0.0 0.0 0:00.51 systemd-lo+
248 root 20 0 26008 1128 892 S 0.0 0.0 0:00.60 cron
250 syslog 20 0 184624 2580 1184 S 0.0 0.0 0:31.92 rsyslogd
289 root 20 0 65448 2080 1364 S 0.0 0.0 0:17.71 sshd
318 root 20 0 89652 1280 336 S 0.0 0.0 0:00.00 saslauthd
320 root 20 0 89652 964 20 S 0.0 0.0 0:00.00 saslauthd
347 root 20 0 14996 832 640 S 0.0 0.0 0:00.00 xinetd
349 root 20 0 12780 844 708 S 0.0 0.0 0:00.00 agetty
cpulimit -l 30 -p 1887 &
top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1887 root 20 0 9508 1200 1012 R 30.7 0.0 0:21.46 highcpu.sh
237 root 20 0 47564 1604 1108 S 0.7 0.0 11:51.14 rpcbind
379 root 20 0 71532 3108 1912 S 0.3 0.0 0:29.04 apache2
1 root 20 0 37396 3644 2108 S 0.0 0.0 0:09.13 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd/1+
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper/15+
72 root 20 0 133368 70296 70000 S 0.0 0.4 1:38.00 systemd-jo+
75 root 20 0 41628 1452 1004 S 0.0 0.0 0:00.38 systemd-ud+
239 message+ 20 0 42828 2044 1492 S 0.0 0.0 0:00.29 dbus-daemon
246 root 20 0 28484 1596 1292 S 0.0 0.0 0:00.51 systemd-lo+
248 root 20 0 26008 1128 892 S 0.0 0.0 0:00.60 cron
250 syslog 20 0 184624 2580 1184 S 0.0 0.0 0:31.92 rsyslogd
289 root 20 0 65448 2080 1364 S 0.0 0.0 0:17.71 sshd
318 root 20 0 89652 1280 336 S 0.0 0.0 0:00.00 saslauthd
320 root 20 0 89652 964 20 S 0.0 0.0 0:00.00 saslauthd
347 root 20 0 14996 832 640 S 0.0 0.0 0:00.00 xinetd
349 root 20 0 12780 844 708 S 0.0 0.0 0:00.00 agetty
cpulimit -l 30 ./highcpu.sh &
fg