Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
b4a8f048
Commit
b4a8f048
authored
7 years ago
by
Hisham Muhammad
Browse files
Options
Download
Email Patches
Plain Diff
Use screen's flags when reading process data
parent
2df1f61d
next
3.0.0beta5
3.0.0beta4
3.0.0beta3
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Settings.c
+0
-1
Settings.c
Settings.h
+0
-1
Settings.h
linux/LinuxProcess.c
+0
-1
linux/LinuxProcess.c
linux/LinuxProcess.h
+0
-1
linux/LinuxProcess.h
linux/LinuxProcessList.c
+7
-6
linux/LinuxProcessList.c
with
7 additions
and
10 deletions
+7
-10
Settings.c
View file @
b4a8f048
...
...
@@ -48,7 +48,6 @@ typedef struct Settings_ {
unsigned int ssIndex;
ScreenSettings* ss;
int flags;
int colorScheme;
int delay;
...
...
This diff is collapsed.
Click to expand it.
Settings.h
View file @
b4a8f048
...
...
@@ -39,7 +39,6 @@ typedef struct Settings_ {
unsigned
int
ssIndex
;
ScreenSettings
*
ss
;
int
flags
;
int
colorScheme
;
int
delay
;
...
...
This diff is collapsed.
Click to expand it.
linux/LinuxProcess.c
View file @
b4a8f048
...
...
@@ -475,4 +475,3 @@ long LinuxProcess_compare(const void* v1, const void* v2) {
bool
Process_isThread
(
Process
*
this
)
{
return
(
Process_isUserlandThread
(
this
)
||
Process_isKernelThread
(
this
));
}
This diff is collapsed.
Click to expand it.
linux/LinuxProcess.h
View file @
b4a8f048
...
...
@@ -176,5 +176,4 @@ long LinuxProcess_compare(const void* v1, const void* v2);
bool
Process_isThread
(
Process
*
this
);
#endif
This diff is collapsed.
Click to expand it.
linux/LinuxProcessList.c
View file @
b4a8f048
...
...
@@ -761,6 +761,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
DIR
*
dir
;
struct
dirent
*
entry
;
Settings
*
settings
=
pl
->
settings
;
ScreenSettings
*
ss
=
settings
->
ss
;
time_t
curTime
=
tv
.
tv_sec
;
#ifdef HAVE_TASKSTATS
...
...
@@ -806,7 +807,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
LinuxProcessList_recurseProcTree
(
this
,
subdirname
,
proc
,
period
,
tv
);
#ifdef HAVE_TASKSTATS
if
(
s
etting
s
->
flags
&
PROCESS_FLAG_IO
)
if
(
ss
->
flags
&
PROCESS_FLAG_IO
)
LinuxProcessList_readIoFile
(
lp
,
dirname
,
name
,
now
);
#endif
...
...
@@ -825,7 +826,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
free
(
lp
->
ttyDevice
);
lp
->
ttyDevice
=
LinuxProcessList_updateTtyDevice
(
this
->
ttyDrivers
,
proc
->
tty_nr
);
}
if
(
s
etting
s
->
flags
&
PROCESS_FLAG_LINUX_IOPRIO
)
if
(
ss
->
flags
&
PROCESS_FLAG_LINUX_IOPRIO
)
LinuxProcess_updateIOPriority
(
lp
);
float
percent_cpu
=
(
lp
->
utime
+
lp
->
stime
-
lasttimes
)
/
period
*
100
.
0
;
proc
->
percent_cpu
=
CLAMP
(
percent_cpu
,
0
.
0
,
cpus
*
100
.
0
);
...
...
@@ -840,13 +841,13 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
proc
->
user
=
UsersTable_getRef
(
pl
->
usersTable
,
proc
->
st_uid
);
#ifdef HAVE_OPENVZ
if
(
s
etting
s
->
flags
&
PROCESS_FLAG_LINUX_OPENVZ
)
{
if
(
ss
->
flags
&
PROCESS_FLAG_LINUX_OPENVZ
)
{
LinuxProcessList_readOpenVZData
(
lp
,
dirname
,
name
);
}
#endif
#ifdef HAVE_VSERVER
if
(
s
etting
s
->
flags
&
PROCESS_FLAG_LINUX_VSERVER
)
{
if
(
ss
->
flags
&
PROCESS_FLAG_LINUX_VSERVER
)
{
LinuxProcessList_readVServerData
(
lp
,
dirname
,
name
);
}
#endif
...
...
@@ -869,11 +870,11 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
#endif
#ifdef HAVE_CGROUP
if
(
s
etting
s
->
flags
&
PROCESS_FLAG_LINUX_CGROUP
)
if
(
ss
->
flags
&
PROCESS_FLAG_LINUX_CGROUP
)
LinuxProcessList_readCGroupFile
(
lp
,
dirname
,
name
);
#endif
if
(
s
etting
s
->
flags
&
PROCESS_FLAG_LINUX_OOM
)
if
(
ss
->
flags
&
PROCESS_FLAG_LINUX_OOM
)
LinuxProcessList_readOomData
(
lp
,
dirname
,
name
);
if
(
proc
->
state
==
'Z'
&&
(
proc
->
basenameOffset
==
0
))
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help