OpenVZ Forum


Home » General » Support » *SOLVED* vpsid shows no pid
icon5.gif  *SOLVED* vpsid shows no pid [message #7681] Fri, 20 October 2006 08:39 Go to next message
fransonline is currently offline  fransonline
Messages: 22
Registered: May 2006
Junior Member
Hi,

When I use the command vspid, I don't get info about the runnig VE and PID.
This is all:
# vzpid 102
Pid VEID Name

How can I trace the PID that belongs to 102?

Frans

[Updated on: Mon, 23 October 2006 05:40] by Moderator

Report message to a moderator

Re: vpsid shows no pid [message #7682 is a reply to message #7681] Fri, 20 October 2006 09:14 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

vzpid - display the VE ID given the process ID (PID)

# vzpid <pid_of_process> -> shows the VEID running !

example :

# ps -C cron
Shows me all pids of crons

PID TTY TIME CMD
2613 ? 00:00:00 cron
4132 ? 00:00:00 cron
4511 ? 00:00:00 cron
31090 ? 00:00:00 cron
18493 ? 00:00:00 cron
29251 ? 00:00:00 cron
14539 ? 00:00:00 cron

which VE has the cron daemon with pid 18493

# vzpid 18493
Pid VEID Name
18493 <VEID> cron

But if you need all pids of a VE:
Scan all "status" files in /proc/<pid>/ the entry:
(its the same what vzpid do!)

example (with settings above!)

grep 'envID:' /proc/18493/status
envID: <VEID>

Or you can use the vzproc-tools (top), but you need to compile it yourself ( http://download.openvz.org/contrib/utils/vzprocps-2.0.11-6.1 2.swsoft.src.rpm)

[Updated on: Fri, 20 October 2006 09:54]

Report message to a moderator

Re: vpsid shows no pid [message #7690 is a reply to message #7682] Fri, 20 October 2006 14:29 Go to previous messageGo to next message
fransonline is currently offline  fransonline
Messages: 22
Registered: May 2006
Junior Member
Thanks a lot for the fast and clear information!
The extra hints are usefull for the future.

However, my probem is, that I don't get PID information when I use: vzpid 102

This is the output after this command:
Pid VEID Name

So empty under the heading as you can see and therefore I can't investigate further because vzpid gives no information about the PID that a VE uses.

The problem is in my case vzpid that seems not working as it should be.

Frans
Re: vpsid shows no pid [message #7691 is a reply to message #7690] Fri, 20 October 2006 14:58 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

> However, my probem is, that I don't get PID information when I use: vzpid 102

Sorry, if i misunderstand:
vzpid 102 102 is this a PID of a given program, or the VEID?
Re: vpsid shows no pid [message #7701 is a reply to message #7691] Sat, 21 October 2006 11:41 Go to previous messageGo to next message
fransonline is currently offline  fransonline
Messages: 22
Registered: May 2006
Junior Member
Sorry of my being may be not clear.

vzpid 102
102 is the VE (VPS)

Frans
Re: vpsid shows no pid [message #7702 is a reply to message #7701] Sat, 21 October 2006 12:22 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi Frans,

> vzpid 102
> 102 is the VE (VPS)

vzpid shows *only* the VEID of a given PID !!!!
The argument must be a PID not a VEID !!!

If you want to list all PID of the VE you can use :
Poor man's vzps in bash . (wiki) -> http://wiki.openvz.org/Processes_scope_and_visibility
or compile the vzprocs package (-> http://download.openvz.org/contrib/utils/vzprocps-2.0.11-6.1 2.swsoft.src.rpm) , with hold's a modified ps and top!

Re: vpsid shows no pid (**SOLVED**) [message #7709 is a reply to message #7702] Sun, 22 October 2006 08:12 Go to previous message
fransonline is currently offline  fransonline
Messages: 22
Registered: May 2006
Junior Member
Thanks! I understand it now and you helped solve my problem!
Previous Topic: VENET, VETH + SNAT
Next Topic: restrict netfilter to HN only
Goto Forum:
  


Current Time: Wed Jul 31 02:14:30 GMT 2024

Total time taken to generate the page: 0.02791 seconds