aboutsummaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-08-27 07:48:10 +0200
committerDaniel Lange <DLange@git.local>2020-08-27 07:48:10 +0200
commitf3147ea2d1598914c2db53e8cfb34c8ff81e2ff4 (patch)
tree3ee82b2af2ab3d38b6e4b07f3994516aac72f742 /linux/LinuxProcessList.h
parentdf568a576f7b44ac5a2b9b7222c7f39d9932f626 (diff)
downloaddebian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.gz
debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.bz2
debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.zip
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'linux/LinuxProcessList.h')
-rw-r--r--linux/LinuxProcessList.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index 0851a10..86e9d3f 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -10,8 +10,7 @@ in the source distribution for its full text.
*/
#ifdef MAJOR_IN_MKDEV
-#elif defined(MAJOR_IN_SYSMACROS) || \
- (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
+#elif defined(MAJOR_IN_SYSMACROS)
#endif
#ifdef HAVE_DELAYACCT
@@ -19,6 +18,9 @@ in the source distribution for its full text.
#include "ProcessList.h"
+#include "zfs/ZfsArcStats.h"
+
+extern long long btime;
typedef struct CPUData_ {
unsigned long long int totalTime;
@@ -33,7 +35,7 @@ typedef struct CPUData_ {
unsigned long long int softIrqTime;
unsigned long long int stealTime;
unsigned long long int guestTime;
-
+
unsigned long long int totalPeriod;
unsigned long long int userPeriod;
unsigned long long int systemPeriod;
@@ -46,6 +48,8 @@ typedef struct CPUData_ {
unsigned long long int softIrqPeriod;
unsigned long long int stealPeriod;
unsigned long long int guestPeriod;
+
+ double frequency;
} CPUData;
typedef struct TtyDriver_ {
@@ -57,20 +61,27 @@ typedef struct TtyDriver_ {
typedef struct LinuxProcessList_ {
ProcessList super;
-
+
CPUData* cpus;
TtyDriver* ttyDrivers;
-
+ bool haveSmapsRollup;
+
#ifdef HAVE_DELAYACCT
struct nl_sock *netlink_socket;
int netlink_family;
#endif
+
+ ZfsArcStats zfs;
} LinuxProcessList;
#ifndef PROCDIR
#define PROCDIR "/proc"
#endif
+#ifndef PROCCPUINFOFILE
+#define PROCCPUINFOFILE PROCDIR "/cpuinfo"
+#endif
+
#ifndef PROCSTATFILE
#define PROCSTATFILE PROCDIR "/stat"
#endif
@@ -79,12 +90,16 @@ typedef struct LinuxProcessList_ {
#define PROCMEMINFOFILE PROCDIR "/meminfo"
#endif
+#ifndef PROCARCSTATSFILE
+#define PROCARCSTATSFILE PROCDIR "/spl/kstat/zfs/arcstats"
+#endif
+
#ifndef PROCTTYDRIVERSFILE
#define PROCTTYDRIVERSFILE PROCDIR "/tty/drivers"
#endif
#ifndef PROC_LINE_LENGTH
-#define PROC_LINE_LENGTH 512
+#define PROC_LINE_LENGTH 4096
#endif
@@ -96,9 +111,9 @@ typedef struct LinuxProcessList_ {
#endif
-ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
+extern ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
-void ProcessList_delete(ProcessList* pl);
+extern void ProcessList_delete(ProcessList* pl);
#ifdef HAVE_TASKSTATS
@@ -121,6 +136,6 @@ void ProcessList_delete(ProcessList* pl);
#endif
-void ProcessList_goThroughEntries(ProcessList* super);
+extern void ProcessList_goThroughEntries(ProcessList* super);
#endif

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