Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- there're 2 fixs needed when using this script:
- - in check_mem(): calculate swapused must check for totalswap > 0 because by default on VPS there is no swap so we get the "division by zero"
- my $swapused = 0;
- if ($mem->{swaptotal} > 0) {
- $swapused = sprintf("%.2f", ($mem->{swapused}/$mem->{swaptotal})*100);
- }
- - in check_net(): all the units is B (bytes) not KB (kilobytes), and the error number has no unit:
- $return_str .= $device.":".$ttbyt."B ";
- $perfdata .= " ".$device."_txbyt=".$txbyt."B ".$device."_txerrs=".$txerrs." ".$device."_rxbyt=".$rxbyt."B ".$device."_rxerrs=".$rxerrs;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement