User Tools

Site Tools


la_checker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
la_checker [2011/05/23 12:58]
kyxap создано
la_checker [2013/12/15 17:10]
kyxap
Line 1: Line 1:
-==== Скрипт проверки уровня LA ====+{{tag>​perl load_average watchdog}}====== Скрипт проверки уровня LA ======
  
 <code perl> <code perl>
Line 6: Line 6:
 use strict; use strict;
  
-my $email = '​support@hqhost.net';+my $email = '​support@support.com';
  
 open my $PROC, "/​proc/​loadavg"​ or die $!; open my $PROC, "/​proc/​loadavg"​ or die $!;
Line 14: Line 14:
     my $la = $1;     my $la = $1;
     if($la gt 10) {     if($la gt 10) {
-        system("​top -b -n 2 | /​usr/​sbin/​sendmail -svasechkin_LA ​$email"​);​+        system("​top -b -n 2 | /​usr/​sbin/​sendmail -sVPS_LA ​$email"​);​
     }     }
 } }
la_checker.txt · Last modified: 2015/03/18 14:07 by kyxap