Skip to content

Commit

Permalink
Update sunos iostat to cast values to integer
Browse files Browse the repository at this point in the history
Avoids errors like `Error updating /var/lib/munin/…-iostat-diskr-d.rrd: /var/lib/munin/…-iostat-diskr-d.rrd: not a simple signed integer: '5769245279641.6'`
  • Loading branch information
smokris authored Nov 22, 2023
1 parent 16eff1e commit 5df9c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/node.d.sunos/iostat
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ while(<IOSTAT>){
}
$nri{$dev} += $nri;
$nwi{$dev} += $nwi;
$bri{$dev} += ($bri*1024); # The header says kr/i, and we want bytes
$bwi{$dev} += ($bwi*1024); # Ditto.
$bri{$dev} += int($bri*1024); # The header says kr/i, and we want bytes
$bwi{$dev} += int($bwi*1024); # Ditto.
}

close(IOSTAT);
Expand Down

0 comments on commit 5df9c67

Please sign in to comment.