diff options
author | Elan Ruusamäe <glen@delfi.ee> | 2016-03-03 19:23:49 (GMT) |
---|---|---|
committer | Elan Ruusamäe <glen@delfi.ee> | 2016-03-03 19:23:49 (GMT) |
commit | 487d64a4e4122ca7b389b5e26b6cdf156c877c04 (patch) | |
tree | 03a71c4ade84a2c99d835cc0890b79ca5d4e0574 /plugins-scripts | |
parent | e16dc71d5c4bc78b5c7f786eb3f91999a0f9b284 (diff) | |
download | monitoring-plugins-487d64a4e4122ca7b389b5e26b6cdf156c877c04.tar.gz |
allow checking 0-sized resource (ex. IPC$)refs/pull/1411/head
patch by Marek Marczykowski <marmarek@staszic.waw.pl>
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-x | plugins-scripts/check_disk_smb.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index 9899226..4e46397 100755 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl | |||
@@ -212,7 +212,8 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) { | |||
212 | my ($total_bytes) = $1 * $2; | 212 | my ($total_bytes) = $1 * $2; |
213 | my ($occupied_bytes) = $1 * $2 - $avail_bytes; | 213 | my ($occupied_bytes) = $1 * $2 - $avail_bytes; |
214 | my ($avail) = $avail_bytes/1024; | 214 | my ($avail) = $avail_bytes/1024; |
215 | my ($capper) = int(($3/$1)*100); | 215 | my ($capper); |
216 | if ($1!=0) { $capper = int(($3/$1)*100) } else { $capper=100 }; | ||
216 | my ($mountpt) = "\\\\$host\\$share"; | 217 | my ($mountpt) = "\\\\$host\\$share"; |
217 | 218 | ||
218 | # TODO : why is the kB the standard unit for args ? | 219 | # TODO : why is the kB the standard unit for args ? |