aboutsummaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/LinuxProcess.h')
-rw-r--r--linux/LinuxProcess.h82
1 files changed, 32 insertions, 50 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 2e9a9d1..20399d9 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -11,8 +11,9 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
+#include <sys/types.h>
-#include "IOPriority.h"
+#include "linux/IOPriority.h"
#include "Object.h"
#include "Process.h"
#include "Settings.h"
@@ -27,45 +28,11 @@ in the source distribution for its full text.
#define PROCESS_FLAG_LINUX_CTXT 0x00004000
#define PROCESS_FLAG_LINUX_SECATTR 0x00008000
#define PROCESS_FLAG_LINUX_LRS_FIX 0x00010000
-#define PROCESS_FLAG_LINUX_CWD 0x00020000
#define PROCESS_FLAG_LINUX_DELAYACCT 0x00040000
-
-
-/* LinuxProcessMergedCommand is populated by LinuxProcess_makeCommandStr: It
- * contains the merged Command string, and the information needed by
- * LinuxProcess_writeCommand to color the string. str will be NULL for kernel
- * threads and zombies */
-typedef struct LinuxProcessMergedCommand_ {
- char *str; /* merged Command string */
- int maxLen; /* maximum expected length of Command string */
- int baseStart; /* basename's start offset */
- int baseEnd; /* basename's end offset */
- int commStart; /* comm's start offset */
- int commEnd; /* comm's end offset */
- int sep1; /* first field separator, used if non-zero */
- int sep2; /* second field separator, used if non-zero */
- bool separateComm; /* whether comm is a separate field */
- bool unmatchedExe; /* whether exe matched with cmdline */
- bool cmdlineChanged; /* whether cmdline changed */
- bool exeChanged; /* whether exe changed */
- bool commChanged; /* whether comm changed */
- bool prevMergeSet; /* whether showMergedCommand was set */
- bool prevPathSet; /* whether showProgramPath was set */
- bool prevCommSet; /* whether findCommInCmdline was set */
- bool prevCmdlineSet; /* whether findCommInCmdline was set */
-} LinuxProcessMergedCommand;
+#define PROCESS_FLAG_LINUX_AUTOGROUP 0x00080000
typedef struct LinuxProcess_ {
Process super;
- char *procComm;
- char *procExe;
- int procExeLen;
- int procExeBasenameOffset;
- bool procExeDeleted;
- int procCmdlineBasenameOffset;
- int procCmdlineBasenameEnd;
- LinuxProcessMergedCommand mergedCommand;
- bool isKernelThread;
IOPriority ioPriority;
unsigned long int cminflt;
unsigned long int cmajflt;
@@ -80,18 +47,37 @@ typedef struct LinuxProcess_ {
long m_trs;
long m_drs;
long m_lrs;
- long m_dt;
+
+ /* Data read (in bytes) */
unsigned long long io_rchar;
+
+ /* Data written (in bytes) */
unsigned long long io_wchar;
+
+ /* Number of read(2) syscalls */
unsigned long long io_syscr;
+
+ /* Number of write(2) syscalls */
unsigned long long io_syscw;
+
+ /* Storage data read (in bytes) */
unsigned long long io_read_bytes;
+
+ /* Storage data written (in bytes) */
unsigned long long io_write_bytes;
+
+ /* Storage data cancelled (in bytes) */
unsigned long long io_cancelled_write_bytes;
- unsigned long long io_rate_read_time;
- unsigned long long io_rate_write_time;
+
+ /* Point in time of last io scan (in milliseconds elapsed since the Epoch) */
+ unsigned long long io_last_scan_time_ms;
+
+ /* Storage data read (in bytes per second) */
double io_rate_read_bps;
+
+ /* Storage data written (in bytes per second) */
double io_rate_write_bps;
+
#ifdef HAVE_OPENVZ
char* ctid;
pid_t vpid;
@@ -101,7 +87,6 @@ typedef struct LinuxProcess_ {
#endif
char* cgroup;
unsigned int oom;
- char* ttyDevice;
#ifdef HAVE_DELAYACCT
unsigned long long int delay_read_time;
unsigned long long cpu_delay_total;
@@ -115,14 +100,11 @@ typedef struct LinuxProcess_ {
unsigned long ctxt_diff;
char* secattr;
unsigned long long int last_mlrs_calctime;
- char* cwd;
-} LinuxProcess;
-
-#define Process_isKernelThread(_process) (((const LinuxProcess*)(_process))->isKernelThread)
-static inline bool Process_isUserlandThread(const Process* this) {
- return this->pid != this->tgid;
-}
+ /* Autogroup scheduling (CFS) information */
+ long int autogroup_id;
+ int autogroup_nice;
+} LinuxProcess;
extern int pageSize;
@@ -140,9 +122,9 @@ IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this);
bool LinuxProcess_setIOPriority(Process* this, Arg ioprio);
-/* This function constructs the string that is displayed by
- * LinuxProcess_writeCommand and also returned by LinuxProcess_getCommandStr */
-void LinuxProcess_makeCommandStr(Process *this);
+bool LinuxProcess_isAutogroupEnabled(void);
+
+bool LinuxProcess_changeAutogroupPriorityBy(Process* this, Arg delta);
bool Process_isThread(const Process* this);

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