FreeBSD: Platform update

This commit is contained in:
Christian Göttsche 2020-10-21 16:19:22 +02:00 committed by cgzones
parent 88eec2dc00
commit c91061c84b
1 changed files with 22 additions and 23 deletions

View File

@ -6,34 +6,34 @@ in the source distribution for its full text.
*/ */
#include "Platform.h" #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 "CPUMeter.h"
#include "MemoryMeter.h"
#include "SwapMeter.h"
#include "TasksMeter.h"
#include "LoadAverageMeter.h"
#include "UptimeMeter.h"
#include "ClockMeter.h" #include "ClockMeter.h"
#include "DateMeter.h" #include "DateMeter.h"
#include "DateTimeMeter.h" #include "DateTimeMeter.h"
#include "HostnameMeter.h"
#include "NetworkIOMeter.h"
#include "zfs/ZfsArcMeter.h"
#include "zfs/ZfsCompressedArcMeter.h"
#include "FreeBSDProcess.h" #include "FreeBSDProcess.h"
#include "FreeBSDProcessList.h" #include "FreeBSDProcessList.h"
#include "HostnameMeter.h"
#include <net/if.h> #include "LoadAverageMeter.h"
#include <net/if_mib.h> #include "Macros.h"
#include <sys/types.h> #include "MemoryMeter.h"
#include <sys/sysctl.h> #include "Meter.h"
#include <sys/time.h> #include "NetworkIOMeter.h"
#include <sys/resource.h> #include "SwapMeter.h"
#include <vm/vm_param.h> #include "TasksMeter.h"
#include <time.h> #include "UptimeMeter.h"
#include <limits.h> #include "zfs/ZfsArcMeter.h"
#include <math.h> #include "zfs/ZfsCompressedArcMeter.h"
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; 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); percent = CLAMP(percent, 0.0, 100.0);
if (isnan(percent)) percent = 0.0;
v[CPU_METER_FREQUENCY] = NAN; v[CPU_METER_FREQUENCY] = NAN;