summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.h
diff options
context:
space:
mode:
authorAndré Carvalho <asantostc@gmail.com>2017-12-04 00:15:29 -0200
committerHisham Muhammad <hisham@gobolinux.org>2017-12-04 00:15:29 -0200
commitb7b66b76a5f01ac570d537d27a7e156af248d6f4 (patch)
tree66f8094a5fc284eb135538020b78b6287dc0df52 /linux/LinuxProcessList.h
parent52831955c759ecfa5d5f527bdf54f20545fdbcff (diff)
Adds support for linux delay accounting (#667)
Adds support for showing columns with linux delay accounting. This information can be read from the netlink interface, and thus we set up a socket to read from that when initializing the LinuxProcessList (LinuxProcessList_initNetlinkSocket). After that, for each process we call LinuxProcessList_readDelayAcctData, which sends a message thru the socket after setting up a callback to get the answer from the Kernel. That callback sets the process total delay time attribute. We then set the delay percent as the percentage of time process cpu time since last scan.
Diffstat (limited to 'linux/LinuxProcessList.h')
-rw-r--r--linux/LinuxProcessList.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index ce39f805..5005220a 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -9,6 +9,9 @@ Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
+#ifdef HAVE_DELAYACCT
+#endif
+
#include "ProcessList.h"
@@ -53,6 +56,10 @@ typedef struct LinuxProcessList_ {
CPUData* cpus;
TtyDriver* ttyDrivers;
+ #ifdef HAVE_DELAYACCT
+ struct nl_sock *netlink_socket;
+ int netlink_family;
+ #endif
} LinuxProcessList;
#ifndef PROCDIR
@@ -80,6 +87,10 @@ typedef struct LinuxProcessList_ {
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
#endif
+#ifdef HAVE_DELAYACCT
+
+#endif
+
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
void ProcessList_delete(ProcessList* pl);
@@ -101,6 +112,10 @@ void ProcessList_delete(ProcessList* pl);
#endif
+#ifdef HAVE_DELAYACCT
+
+#endif
+
void ProcessList_goThroughEntries(ProcessList* super);
#endif

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