$head_lines .= <UPS Estimated Run-Time
System:$sysname
Location:$syslocation
MINUTES ; $target_name=$router_name.".sec"; $target_lines .= <UPS Actual Time on Battery
System:$sysname
Location:$syslocation
SECONDS ; my $i = 0; while ( ++$i le $ilines) { $target_name=$router_name.".volt"; my $phase = ''; $target_name=$router_name.".volt.".$i if $ilines > 1; $phase = "Phase # $i" if $ilines > 1; $target_lines .= <UPS Voltages $phase
System:$sysname
Location:$syslocation
VOLTAGE ; } ($volts) = snmpget($router_connect,'upsBatteryVoltage.0'); if ($volts) { $yellowvolts = int($volts/10.5) . ":" . int($volts/9.5); $redvolts = int($volts/11) . ":" . int($volts/9); $absvolts = int($volts/7); $volts = int($volts/10); } else { $volts=55; $yellowvolts = "52:57"; $redvolts = "48:60"; $absvolts= 80; } $target_name=$router_name.".batt"; $target_lines .= <UPS Battery Voltage
System:$sysname
Location:$syslocation
BATTERY ; $i = 0; while (++$i le $ilines) { my $addgraph; $target_name=$router_name.".current"; my $redcurrent = int($va/1.1); my $yelcurrent = int($va/1.6); my $multgraph = $target_name; my $phase = ''; $target_name=$router_name.".current.".$i if $ilines > 1; $phase = "Phase # $i" if $ilines > 1; $addgraph = "routers.cgi*Graph[$target_name]: $multgraph total" if $ilines > 1; my $custarget = < 1; my $noi =''; $noi = 'noi' if $ilines >1; $target_lines .= <UPS Current $phase
System:$sysname
Location:$syslocation
CURRENT ; } $target_name=$router_name.".freq"; $freq = $freq / 10; my $freqlow = $freq - .4; my $freqyel = $freq - .2; my $freqhigh = $freq + .4; my $freqyeh = $freq + .2; my $freqmax = int($freq /.9); $target_lines .= <UPS Output Frequency
System:$sysname
Location:$syslocation
FREQ ; $target_name=$router_name.".source"; $target_lines .= <UPS Output Source
1Other
2None
3Normal
4Bypass
5Battery
6Booster
7Reducer
SOURCE ;