Rename VEID to CTID in OpenVZ systems

(thanks to Thorsten Schifferdecker)
This commit is contained in:
Hisham Muhammad 2009-03-11 13:05:19 +00:00
parent 10213f3ea1
commit b93e5c00b6
4 changed files with 13 additions and 11 deletions

View File

@ -2,6 +2,8 @@
What's new in version 0.8.2 What's new in version 0.8.2
* Option to display hostname in the meters area * 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 * Corrections to the desktop entry file
(thanks by Samuli Suominen) (thanks by Samuli Suominen)
* BUGFIX: Fix missing tree view when userland threads are hidden * BUGFIX: Fix missing tree view when userland threads are hidden

View File

@ -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, 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, USER, TIME, NLWP, TGID,
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
VEID, VPID, CTID, VPID,
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER
VXID, VXID,
@ -124,7 +124,7 @@ typedef struct Process_ {
float percent_mem; float percent_mem;
char* user; char* user;
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
unsigned int veid; unsigned int ctid;
unsigned int vpid; unsigned int vpid;
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER
@ -163,7 +163,7 @@ char *Process_fieldNames[] = {
"M_TRS", "M_DRS", "M_LRS", "M_DT", "ST_UID", "PERCENT_CPU", "PERCENT_MEM", "M_TRS", "M_DRS", "M_LRS", "M_DT", "ST_UID", "PERCENT_CPU", "PERCENT_MEM",
"USER", "TIME", "NLWP", "TGID", "USER", "TIME", "NLWP", "TGID",
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
"VEID", "VPID", "CTID", "VPID",
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER
"VXID", "VXID",
@ -185,7 +185,7 @@ char *Process_fieldTitles[] = {
" CODE ", " DATA ", " LIB ", " DIRTY ", " UID ", "CPU% ", "MEM% ", " CODE ", " DATA ", " LIB ", " DIRTY ", " UID ", "CPU% ", "MEM% ",
"USER ", " TIME+ ", "NLWP ", " TGID ", "USER ", " TIME+ ", "NLWP ", " TGID ",
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
" VEID ", " VPID ", " CTID ", " VPID ",
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER
" VXID ", " VXID ",
@ -397,7 +397,7 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
break; break;
} }
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
case VEID: snprintf(buffer, n, "%5u ", this->veid); break; case CTID: snprintf(buffer, n, "%5u ", this->ctid); break;
case VPID: snprintf(buffer, n, "%5u ", this->vpid); break; case VPID: snprintf(buffer, n, "%5u ", this->vpid); break;
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER
@ -566,8 +566,8 @@ int Process_compare(const void* v1, const void* v2) {
case NLWP: case NLWP:
return (p1->nlwp - p2->nlwp); return (p1->nlwp - p2->nlwp);
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
case VEID: case CTID:
return (p1->veid - p2->veid); return (p1->ctid - p2->ctid);
case VPID: case VPID:
return (p1->vpid - p2->vpid); return (p1->vpid - p2->vpid);
#endif #endif

View File

@ -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, 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, USER, TIME, NLWP, TGID,
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
VEID, VPID, CTID, VPID,
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER
VXID, VXID,
@ -126,7 +126,7 @@ typedef struct Process_ {
float percent_mem; float percent_mem;
char* user; char* user;
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
unsigned int veid; unsigned int ctid;
unsigned int vpid; unsigned int vpid;
#endif #endif
#ifdef HAVE_VSERVER #ifdef HAVE_VSERVER

View File

@ -621,7 +621,7 @@ static bool ProcessList_processEntries(ProcessList* this, char* dirname, Process
#ifdef HAVE_OPENVZ #ifdef HAVE_OPENVZ
if (access("/proc/vz", R_OK) != 0) { if (access("/proc/vz", R_OK) != 0) {
process->vpid = process->pid; process->vpid = process->pid;
process->veid = 0; process->ctid = 0;
} else { } else {
snprintf(statusfilename, MAX_NAME, "%s/%s/stat", dirname, name); snprintf(statusfilename, MAX_NAME, "%s/%s/stat", dirname, name);
status = ProcessList_fopen(this, statusfilename, "r"); 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 %*u %*u %*u %*u " "%*u %*u %*u %*u %*u %*u %*u "
"%*u %*u %u %u", "%*u %*u %u %u",
&process->vpid, &process->veid); &process->vpid, &process->ctid);
fclose(status); fclose(status);
} }
#endif #endif