Top Patch exists? [message #7665] |
Thu, 19 October 2006 18:39 |
mckayfer
Messages: 3 Registered: October 2006 Location: Germany
|
Junior Member |
|
|
Hello,
I want to know, if there already exists a patch for top, so that if I use the top command in a virtual System only the tasks which runs on the virtual system and not all tasks are shown?
If yes, do anybody also know, where I can find it?
Thanks so far
|
|
|
|
|
|
Re: Top Patch exists? [message #7692 is a reply to message #7687] |
Fri, 20 October 2006 15:22 |
|
curx
Messages: 739 Registered: February 2006 Location: Nürnberg, Germany
|
Senior Member |
|
|
Hi,
> find ve_status function and remove one of them.
You point me in the right direction
> I suppose you need vzlist.h from kernel, not vzctl one.
Sorry, i found no vzlist.h in kernel-source, and inspecting some files - i found out it's from vzctl!
the fix:
comment out the ve_status
/* char *ve_status[]= {
* "running",
* "stopped",
* "mounted"
* };
*/
and build it again.
then you can use the 2 builed tools: ps and top
# ps -E <VEID>
VEID PID TTY STAT TIME COMMAND
<VEID> 13107 ? S 0:00 init [2]
<VEID> 14404 ? S 0:00 /sbin/syslogd
<VEID> 14532 ? S 0:00 /usr/sbin/exim4 -bd -q30m
<VEID> 14539 ? S 0:00 /usr/sbin/cron
# top -e -n1, gives me a N/A, nor VEID is printed :-/
PID USER PRI NI SIZE RSS SHARE VEID STAT %CPU %MEM TIME CPU COMMAN
1 root 16 0 2656 536 456 N/A S 0.0 0.0 0:00 0 init
[...]
Thanks!
|
|
|
|
Re: Top Patch exists? [message #7704 is a reply to message #7694] |
Sat, 21 October 2006 13:38 |
|
curx
Messages: 739 Registered: February 2006 Location: Nürnberg, Germany
|
Senior Member |
|
|
Hi,
pre:
To prevent a compile error, copy the vzlist.h out of the source tree of vzctl (in the dircetory ./include/) and copy to /usr/include/linux/vzlist.h
Modify the /usr/include/linux/vzlist.h:
from
char *ve_status[]= {
"running",
"stopped",
"mounted"
};
to:
/*
* char *ve_status[]= {
* "running",
* "stopped",
* "mounted"
* };
*/
and build the tools:
# rpm -iv --rebuild vzprocps-2.0.11-6.12.swsoft.src.rpm
[Updated on: Sat, 21 October 2006 13:45] Report message to a moderator
|
|
|
|
|
|
|
|
|