aboutsummaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.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/LinuxProcess.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/LinuxProcess.h')
-rw-r--r--linux/LinuxProcess.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index d75fe89..7c0a11f 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -5,6 +5,7 @@
/*
htop - LinuxProcess.h
(C) 2014 Hisham H. Muhammad
+(C) 2020 Red Hat, Inc. All Rights Reserved.
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
@@ -15,6 +16,7 @@ in the source distribution for its full text.
#define PROCESS_FLAG_LINUX_VSERVER 0x0400
#define PROCESS_FLAG_LINUX_CGROUP 0x0800
#define PROCESS_FLAG_LINUX_OOM 0x1000
+#define PROCESS_FLAG_LINUX_SMAPS 0x2000
typedef enum UnsupportedProcessFields {
FLAGS = 9,
@@ -78,7 +80,10 @@ typedef enum LinuxProcessFields {
PERCENT_IO_DELAY = 117,
PERCENT_SWAP_DELAY = 118,
#endif
- LAST_PROCESSFIELD = 119,
+ M_PSS = 119,
+ M_SWAP = 120,
+ M_PSSWP = 121,
+ LAST_PROCESSFIELD = 122,
} LinuxProcessField;
#include "IOPriority.h"
@@ -94,10 +99,14 @@ typedef struct LinuxProcess_ {
unsigned long long int cutime;
unsigned long long int cstime;
long m_share;
+ long m_pss;
+ long m_swap;
+ long m_psswp;
long m_trs;
long m_drs;
long m_lrs;
long m_dt;
+ unsigned long long starttime;
#ifdef HAVE_TASKSTATS
unsigned long long io_rchar;
unsigned long long io_wchar;
@@ -107,7 +116,7 @@ typedef struct LinuxProcess_ {
unsigned long long io_write_bytes;
unsigned long long io_cancelled_write_bytes;
unsigned long long io_rate_read_time;
- unsigned long long io_rate_write_time;
+ unsigned long long io_rate_write_time;
double io_rate_read_bps;
double io_rate_write_bps;
#endif
@@ -143,15 +152,18 @@ typedef struct LinuxProcess_ {
#endif
+/* semi-global */
+extern long long btime;
+
extern ProcessFieldData Process_fields[];
extern ProcessPidColumn Process_pidColumns[];
extern ProcessClass LinuxProcess_class;
-LinuxProcess* LinuxProcess_new(Settings* settings);
+extern LinuxProcess* LinuxProcess_new(Settings* settings);
-void Process_delete(Object* cast);
+extern void Process_delete(Object* cast);
/*
[1] Note that before kernel 2.6.26 a process that has not asked for
@@ -163,19 +175,18 @@ extern io_priority;
*/
#define LinuxProcess_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->super.nice + 20) / 5) : p_->ioPriority)
-IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this);
+extern IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this);
-bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio);
+extern bool LinuxProcess_setIOPriority(LinuxProcess* this, Arg ioprio);
#ifdef HAVE_DELAYACCT
-void LinuxProcess_printDelay(float delay_percent, char* buffer, int n);
+extern void LinuxProcess_printDelay(float delay_percent, char* buffer, int n);
#endif
-void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field);
-
-long LinuxProcess_compare(const void* v1, const void* v2);
+extern void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field);
-bool Process_isThread(Process* this);
+extern long LinuxProcess_compare(const void* v1, const void* v2);
+extern bool Process_isThread(Process* this);
#endif

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