diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-21 16:19:22 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-10-29 22:21:42 +0100 |
commit | c91061c84bcce51934f05df7a7ee4d219f01bc71 (patch) | |
tree | 0d6374558ccb687a94b41297dd3baf388f7263ad /freebsd/Platform.c | |
parent | 88eec2dc00f951913a1992a064ccefc7cff95e96 (diff) |
FreeBSD: Platform update
Diffstat (limited to 'freebsd/Platform.c')
-rw-r--r-- | freebsd/Platform.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 0a27f7c4..b23a8624 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -6,34 +6,34 @@ in the source distribution for its full text. */ #include "Platform.h" -#include "Macros.h" -#include "Meter.h" + +#include <math.h> +#include <time.h> +#include <net/if.h> +#include <net/if_mib.h> +#include <sys/resource.h> +#include <sys/sysctl.h> +#include <sys/time.h> +#include <sys/types.h> +#include <vm/vm_param.h> + #include "CPUMeter.h" -#include "MemoryMeter.h" -#include "SwapMeter.h" -#include "TasksMeter.h" -#include "LoadAverageMeter.h" -#include "UptimeMeter.h" #include "ClockMeter.h" #include "DateMeter.h" #include "DateTimeMeter.h" +#include "FreeBSDProcess.h" +#include "FreeBSDProcessList.h" #include "HostnameMeter.h" +#include "LoadAverageMeter.h" +#include "Macros.h" +#include "MemoryMeter.h" +#include "Meter.h" #include "NetworkIOMeter.h" +#include "SwapMeter.h" +#include "TasksMeter.h" +#include "UptimeMeter.h" #include "zfs/ZfsArcMeter.h" #include "zfs/ZfsCompressedArcMeter.h" -#include "FreeBSDProcess.h" -#include "FreeBSDProcessList.h" - -#include <net/if.h> -#include <net/if_mib.h> -#include <sys/types.h> -#include <sys/sysctl.h> -#include <sys/time.h> -#include <sys/resource.h> -#include <vm/vm_param.h> -#include <time.h> -#include <limits.h> -#include <math.h> ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; @@ -185,7 +185,6 @@ double Platform_setCPUValues(Meter* this, int cpu) { } percent = CLAMP(percent, 0.0, 100.0); - if (isnan(percent)) percent = 0.0; v[CPU_METER_FREQUENCY] = NAN; |