aboutsummaryrefslogtreecommitdiffstats
path: root/pcp/PCPMachine.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2024-01-10 12:40:37 +0100
committerDaniel Lange <DLange@git.local>2024-01-10 12:40:37 +0100
commit7271b076b82785ffca73ee9e4ae84cabb77018ee (patch)
treee8270dd60ec096bee8157dbadf029e15ed584592 /pcp/PCPMachine.h
parentf288666edc9180a2e81e6655951878124f321df6 (diff)
downloaddebian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.tar.gz
debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.tar.bz2
debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.zip
New upstream version 3.3.0upstream/3.3.0upstream
Diffstat (limited to 'pcp/PCPMachine.h')
-rw-r--r--pcp/PCPMachine.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/pcp/PCPMachine.h b/pcp/PCPMachine.h
new file mode 100644
index 0000000..6518bd4
--- /dev/null
+++ b/pcp/PCPMachine.h
@@ -0,0 +1,71 @@
+#ifndef HEADER_PCPMachine
+#define HEADER_PCPMachine
+/*
+htop - PCPMachine.h
+(C) 2014 Hisham H. Muhammad
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#include <stdbool.h>
+#include <sys/types.h>
+
+#include "Hashtable.h"
+#include "Machine.h"
+#include "UsersTable.h"
+
+#include "pcp/Platform.h"
+#include "linux/ZswapStats.h"
+#include "zfs/ZfsArcStats.h"
+
+
+typedef enum CPUMetric_ {
+ CPU_TOTAL_TIME,
+ CPU_USER_TIME,
+ CPU_SYSTEM_TIME,
+ CPU_SYSTEM_ALL_TIME,
+ CPU_IDLE_ALL_TIME,
+ CPU_IDLE_TIME,
+ CPU_NICE_TIME,
+ CPU_IOWAIT_TIME,
+ CPU_IRQ_TIME,
+ CPU_SOFTIRQ_TIME,
+ CPU_STEAL_TIME,
+ CPU_GUEST_TIME,
+ CPU_GUESTNICE_TIME,
+
+ CPU_TOTAL_PERIOD,
+ CPU_USER_PERIOD,
+ CPU_SYSTEM_PERIOD,
+ CPU_SYSTEM_ALL_PERIOD,
+ CPU_IDLE_ALL_PERIOD,
+ CPU_IDLE_PERIOD,
+ CPU_NICE_PERIOD,
+ CPU_IOWAIT_PERIOD,
+ CPU_IRQ_PERIOD,
+ CPU_SOFTIRQ_PERIOD,
+ CPU_STEAL_PERIOD,
+ CPU_GUEST_PERIOD,
+ CPU_GUESTNICE_PERIOD,
+
+ CPU_FREQUENCY,
+
+ CPU_METRIC_COUNT
+} CPUMetric;
+
+typedef struct PCPMachine_ {
+ Machine super;
+ int smaps_flag;
+ double period;
+ double timestamp; /* previous sample timestamp */
+
+ pmAtomValue* cpu; /* aggregate values for each metric */
+ pmAtomValue** percpu; /* per-processor values for each metric */
+ pmAtomValue* values; /* per-processor buffer for just one metric */
+
+ ZfsArcStats zfs;
+ /*ZramStats zram; -- not needed, calculated in-line in Platform.c */
+ ZswapStats zswap;
+} PCPMachine;
+
+#endif

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