mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Compiler CPU watchdog: print message only when there's load
This commit is contained in:
parent
00203f1705
commit
bc99ac001f
@ -43,7 +43,7 @@ while (1) {
|
||||
if ($pids->{$ppid}->{fname} eq 'compiler_server') {
|
||||
my $pctcpu = `top -b -n 1 -p $p | tail -n 1 | awk '{print \$9}'`;
|
||||
$pctcpu =~ s/^\s+|\s+$//g;
|
||||
print scalar localtime, " :: Got compiler qemu pid: $p; using $pctcpu cpu\n";
|
||||
print scalar localtime, " :: Got compiler qemu pid: $p; using $pctcpu cpu\n" if $pctcpu > 0;
|
||||
|
||||
if ($pctcpu >= $last_pctcpu and $last_pctcpu >= $MAX_PCTCPU) {
|
||||
reset_vm;
|
||||
|
Loading…
Reference in New Issue
Block a user