Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
Workspaces User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Customizing Node System Status Log Checking

date_range 03-Jun-21

You customize the system status checking for a fabric node to ensure that all necessary information is written to the /var/log/SystemStatusLog log file. You must have the privileges of a System Administrator to customize the system status checking. You customize the system status checking by modifying the fabric node Perl script in /usr/nma/bin/writeLogCronJob.

To customize system status checking for a fabric node, modify the writeSystemStatusLogFile sub-function in writeLogCronJob as shown:

content_copy zoom_out_map
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;
 }
external-footer-nav