OpenVZ Forum


Home » General » Support » *SOLVED* vpsid shows no pid
Re: vpsid shows no pid [message #7682 is a reply to message #7681] Fri, 20 October 2006 09:14 Go to previous messageGo to previous 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

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VENET, VETH + SNAT
Next Topic: restrict netfilter to HN only
Goto Forum:
  


Current Time: Wed Jul 31 00:26:43 GMT 2024

Total time taken to generate the page: 0.02695 seconds