#12681 added decimals in module module_freepercentdisk
This commit is contained in:
parent
7b98866468
commit
cf500b6843
|
@ -3132,7 +3132,7 @@ sub module_freepercentdisk ($) {
|
|||
|
||||
return () unless defined ($Parts{$module->{'params'}}) and defined ($Parts{$module->{'params'}}{'avail'});
|
||||
|
||||
my $availp = sprintf("%d", $Parts{$module->{'params'}}{'avail'} * 100 / $Parts{$module->{'params'}}{'total'});
|
||||
my $availp = sprintf("%.2f", $Parts{$module->{'params'}}{'avail'} * 100 / $Parts{$module->{'params'}}{'total'});
|
||||
return ($availp);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ For Each objItem in colItems
|
|||
If argc = 0 Or argv.Exists(objItem.Name) Then
|
||||
' Include only harddrivers (type 3)
|
||||
If (objItem.FreeSpace <> "") AND (objItem.DriveType =3) Then
|
||||
Percent = round (100 - (objItem.FreeSpace / objItem.Size) * 100, 0)
|
||||
Percent = round (100 - (objItem.FreeSpace / objItem.Size) * 100, 2)
|
||||
Wscript.StdOut.WriteLine "<module>"
|
||||
Wscript.StdOut.WriteLine " <name><![CDATA[DiskUsed_" & objItem.Name & "]]></name>"
|
||||
Wscript.StdOut.WriteLine " <description><![CDATA[% used space. Filesystem unit: " & objItem.Name & "]]></description>"
|
||||
|
|
Loading…
Reference in New Issue