2013-12-09 Mario Pulido <mario.pulido@artica.es>
* bin/util/df_percent.vbs: Bug fixes wrong values. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9195 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0032039a22
commit
7021d8b1e0
|
@ -1,3 +1,7 @@
|
|||
2013-12-09 Mario Pulido <mario.pulido@artica.es>
|
||||
|
||||
* bin/util/df_percent.vbs: Bug fixes wrong values.
|
||||
|
||||
2013-11-14 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* main.cc: Quote the path to the service binary to avoid exploits.
|
||||
|
|
|
@ -26,13 +26,19 @@ For Each objItem in colItems
|
|||
' Include only harddrivers (type 3)
|
||||
If (objItem.FreeSpace <> "") AND (objItem.DriveType =3) Then
|
||||
Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2)
|
||||
|
||||
Wscript.StdOut.WriteLine "<module>"
|
||||
Wscript.StdOut.WriteLine " <name><![CDATA[DiskFree%_" & objItem.Name & "]]></name>"
|
||||
Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " % free space ]]></description>"
|
||||
Wscript.StdOut.WriteLine " <data><![CDATA[" & Percent & "]]></data>"
|
||||
Wscript.StdOut.WriteLine "</module>"
|
||||
Wscript.StdOut.flush
|
||||
if (Percent > 99.99) then
|
||||
Wscript.StdOut.WriteLine " <data><![CDATA[" & 100 & "]]></data>"
|
||||
elseif (Percent < 0.01) then
|
||||
Wscript.StdOut.WriteLine " <data><![CDATA[" & 0 & "]]></data>"
|
||||
else
|
||||
Wscript.StdOut.WriteLine " <data><![CDATA[" & Percent & "]]></data>"
|
||||
Wscript.StdOut.WriteLine "</module>"
|
||||
Wscript.StdOut.flush
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
|
Loading…
Reference in New Issue