Technical Documentation

Customizing Node System Status Log Checking

The system administrator can customize the system checking for a fabric node so that the necessary information is written to /var/log/SystemStatusLog. The administrator must modify the fabric node Perl script in /usr/nma/bin/writeLogCronJob.

To customize system status checking for an appliance, modify the writeSystemStatusLogFile sub-function in writeLogCronJob as shown:

sub writeSystemStatusLogFile{
 my $err = 0;
my $logfile = $_[0];
$err = system("date >> $logfile");
$err = system("df /var >> $logfile");
$err = system("top -n 1 -b | grep Cpu >> $logfile");
$err = system("top -n 1 -b | grep Mem: >> $logfile");
$err = system("top -n 1 -b | grep Swap: >> $logfile");

***<Add additional system command here that you want to print out in the SystemStatusLog file>***

 if ($err == 0 ) {                 print "write log to $logfile successfully\n";    
 } else {                 print "cannot write log to $logfile\n";    
 }      
return $err;
 }

Published: 2010-03-18