summaryrefslogtreecommitdiffstats
path: root/pcp/Platform.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-03-05 16:35:32 +1100
committerNathan Scott <nathans@redhat.com>2021-06-09 17:09:29 +1000
commit956b2ae70ccd7bbb91f20176e9ad4a6a2175931c (patch)
tree959d9e852a2564f5082bc800a6d004342107b019 /pcp/Platform.h
parentc6f20fbcc684bc7dd6d2805f1072c651b733d259 (diff)
Update PCP platform to match latest API changes
Updates for recent NetworkIO Meter changes, adds support for the SysArch and HostName Meters. The SysArch change is based on work originally by Sohaib Mohamed.
Diffstat (limited to 'pcp/Platform.h')
-rw-r--r--pcp/Platform.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/pcp/Platform.h b/pcp/Platform.h
index eb6b3f10..4d66d888 100644
--- a/pcp/Platform.h
+++ b/pcp/Platform.h
@@ -24,9 +24,12 @@ in the source distribution for its full text.
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "Meter.h"
+#include "NetworkIOMeter.h"
#include "Process.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
+#include "SysArchMeter.h"
+
extern ProcessField Platform_defaultFields[];
@@ -76,13 +79,15 @@ void Platform_getPressureStall(const char *file, bool some, double* ten, double*
bool Platform_getDiskIO(DiskIOData* data);
-bool Platform_getNetworkIO(unsigned long int* bytesReceived,
- unsigned long int* packetsReceived,
- unsigned long int* bytesTransmitted,
- unsigned long int* packetsTransmitted);
+bool Platform_getNetworkIO(NetworkIOData* data);
void Platform_getBattery(double *percent, ACPresence *isOnAC);
+void Platform_getHostname(char* buffer, size_t size);
+
+void Platform_getRelease(char** string);
+
+
typedef enum Metric_ {
PCP_CONTROL_THREADS, /* proc.control.perclient.threads */
@@ -91,6 +96,7 @@ typedef enum Metric_ {
PCP_UNAME_SYSNAME, /* kernel.uname.sysname */
PCP_UNAME_RELEASE, /* kernel.uname.release */
PCP_UNAME_MACHINE, /* kernel.uname.machine */
+ PCP_UNAME_DISTRO, /* kernel.uname.distro */
PCP_LOAD_AVERAGE, /* kernel.all.load */
PCP_PID_MAX, /* kernel.all.pid_max */
PCP_UPTIME, /* kernel.all.uptime */

© 2014-2024 Faster IT GmbH | imprint | privacy policy