#12681 added decimals in module windows
This commit is contained in:
parent
cf500b6843
commit
139b924410
|
@ -3132,7 +3132,7 @@ sub module_freepercentdisk ($) {
|
|||
|
||||
return () unless defined ($Parts{$module->{'params'}}) and defined ($Parts{$module->{'params'}}{'avail'});
|
||||
|
||||
my $availp = sprintf("%.2f", $Parts{$module->{'params'}}{'avail'} * 100 / $Parts{$module->{'params'}}{'total'});
|
||||
my $availp = sprintf("%d", $Parts{$module->{'params'}}{'avail'} * 100 / $Parts{$module->{'params'}}{'total'});
|
||||
return ($availp);
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ Pandora_Wmi::getDiskFreeSpace (string disk_id) {
|
|||
* @exception Pandora_Wmi_Exception Throwd if an error occured when reading
|
||||
* from WMI database.
|
||||
*/
|
||||
unsigned long
|
||||
double
|
||||
Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
|
||||
CDhInitialize init;
|
||||
CDispPtr wmi_svc, quickfixes;
|
||||
|
@ -213,7 +213,7 @@ Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
return (unsigned long) (free_space * 100 / size);
|
||||
return (free_space * 100 / size);
|
||||
} NEXT_THROW (quickfix);
|
||||
} catch (string errstr) {
|
||||
pandoraLog ("getDiskFreeSpace error. %s", errstr.c_str ());
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Pandora_Wmi {
|
|||
int isProcessRunning (string process_name);
|
||||
int isServiceRunning (string service_name);
|
||||
unsigned long getDiskFreeSpace (string disk_id);
|
||||
unsigned long getDiskFreeSpacePercent (string disk_id);
|
||||
double getDiskFreeSpacePercent (string disk_id);
|
||||
int getCpuUsagePercentage (int cpu_id);
|
||||
long getFreememory ();
|
||||
long getFreememoryPercent ();
|
||||
|
|
Loading…
Reference in New Issue