Skip to content
GitLab
Menu
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
b93e5c00
Commit
b93e5c00
authored
Mar 11, 2009
by
Hisham Muhammad
Browse files
Rename VEID to CTID in OpenVZ systems
(thanks to Thorsten Schifferdecker)
parent
10213f3e
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
b93e5c00
...
...
@@ -2,6 +2,8 @@
What's new in version 0.8.2
* Option to display hostname in the meters area
* Rename VEID to CTID in OpenVZ systems
(thanks to Thorsten Schifferdecker)
* Corrections to the desktop entry file
(thanks by Samuli Suominen)
* BUGFIX: Fix missing tree view when userland threads are hidden
...
...
Process.c
View file @
b93e5c00
...
...
@@ -47,7 +47,7 @@ typedef enum ProcessField_ {
PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM,
USER, TIME, NLWP, TGID,
#ifdef HAVE_OPENVZ
VE
ID, VPID,
CT
ID, VPID,
#endif
#ifdef HAVE_VSERVER
VXID,
...
...
@@ -124,7 +124,7 @@ typedef struct Process_ {
float percent_mem;
char* user;
#ifdef HAVE_OPENVZ
unsigned int
ve
id;
unsigned int
ct
id;
unsigned int vpid;
#endif
#ifdef HAVE_VSERVER
...
...
@@ -163,7 +163,7 @@ char *Process_fieldNames[] = {
"M_TRS"
,
"M_DRS"
,
"M_LRS"
,
"M_DT"
,
"ST_UID"
,
"PERCENT_CPU"
,
"PERCENT_MEM"
,
"USER"
,
"TIME"
,
"NLWP"
,
"TGID"
,
#ifdef HAVE_OPENVZ
"
VE
ID"
,
"VPID"
,
"
CT
ID"
,
"VPID"
,
#endif
#ifdef HAVE_VSERVER
"VXID"
,
...
...
@@ -185,7 +185,7 @@ char *Process_fieldTitles[] = {
" CODE "
,
" DATA "
,
" LIB "
,
" DIRTY "
,
" UID "
,
"CPU% "
,
"MEM% "
,
"USER "
,
" TIME+ "
,
"NLWP "
,
" TGID "
,
#ifdef HAVE_OPENVZ
"
VE
ID "
,
" VPID "
,
"
CT
ID "
,
" VPID "
,
#endif
#ifdef HAVE_VSERVER
" VXID "
,
...
...
@@ -397,7 +397,7 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
break
;
}
#ifdef HAVE_OPENVZ
case
VE
ID
:
snprintf
(
buffer
,
n
,
"%5u "
,
this
->
ve
id
);
break
;
case
CT
ID
:
snprintf
(
buffer
,
n
,
"%5u "
,
this
->
ct
id
);
break
;
case
VPID
:
snprintf
(
buffer
,
n
,
"%5u "
,
this
->
vpid
);
break
;
#endif
#ifdef HAVE_VSERVER
...
...
@@ -566,8 +566,8 @@ int Process_compare(const void* v1, const void* v2) {
case
NLWP
:
return
(
p1
->
nlwp
-
p2
->
nlwp
);
#ifdef HAVE_OPENVZ
case
VE
ID
:
return
(
p1
->
ve
id
-
p2
->
ve
id
);
case
CT
ID
:
return
(
p1
->
ct
id
-
p2
->
ct
id
);
case
VPID
:
return
(
p1
->
vpid
-
p2
->
vpid
);
#endif
...
...
Process.h
View file @
b93e5c00
...
...
@@ -49,7 +49,7 @@ typedef enum ProcessField_ {
PROCESSOR
,
M_SIZE
,
M_RESIDENT
,
M_SHARE
,
M_TRS
,
M_DRS
,
M_LRS
,
M_DT
,
ST_UID
,
PERCENT_CPU
,
PERCENT_MEM
,
USER
,
TIME
,
NLWP
,
TGID
,
#ifdef HAVE_OPENVZ
VE
ID
,
VPID
,
CT
ID
,
VPID
,
#endif
#ifdef HAVE_VSERVER
VXID
,
...
...
@@ -126,7 +126,7 @@ typedef struct Process_ {
float
percent_mem
;
char
*
user
;
#ifdef HAVE_OPENVZ
unsigned
int
ve
id
;
unsigned
int
ct
id
;
unsigned
int
vpid
;
#endif
#ifdef HAVE_VSERVER
...
...
ProcessList.c
View file @
b93e5c00
...
...
@@ -621,7 +621,7 @@ static bool ProcessList_processEntries(ProcessList* this, char* dirname, Process
#ifdef HAVE_OPENVZ
if
(
access
(
"/proc/vz"
,
R_OK
)
!=
0
)
{
process
->
vpid
=
process
->
pid
;
process
->
ve
id
=
0
;
process
->
ct
id
=
0
;
}
else
{
snprintf
(
statusfilename
,
MAX_NAME
,
"%s/%s/stat"
,
dirname
,
name
);
status
=
ProcessList_fopen
(
this
,
statusfilename
,
"r"
);
...
...
@@ -635,7 +635,7 @@ static bool ProcessList_processEntries(ProcessList* this, char* dirname, Process
"%*u %*u %*u %*u %*u %*u %*u %*u "
"%*u %*u %*u %*u %*u %*u %*u "
"%*u %*u %u %u"
,
&
process
->
vpid
,
&
process
->
ve
id
);
&
process
->
vpid
,
&
process
->
ct
id
);
fclose
(
status
);
}
#endif
...
...
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