OpenVZ Forum


Home » General » Support » Fastest/most efficient method to get list of PIDs for VE
Fastest/most efficient method to get list of PIDs for VE [message #6824] Sun, 24 September 2006 13:45 Go to next message
HaroldB is currently offline  HaroldB
Messages: 61
Registered: June 2006
Member
Hello, From the HN, what is the most efficient way to list the PIDs running in a VE? For example, if you have 100 VEs with 100 processes each.

Thanks
H

[Updated on: Sun, 24 September 2006 16:35]

Report message to a moderator

Re: Fastest/most efficient method to get list of PIDs for VE [message #6829 is a reply to message #6824] Sun, 24 September 2006 19:05 Go to previous message
dlzinc
Messages: 34
Registered: March 2006
Member
List all processes and which VE they live in
ps -A | awk '{print $1}' | xargs vzpid


Or... list all processes in a VE (assuming they have a good, working "ps")
vzctl exec VEID ps -A


Or... (there's probably a better way?)
ps -A | awk '{print $1}' | xargs vzpid | egrep "[[:space:]]VEID[[:space:]]"
Previous Topic: FC5 needs rpm install
Next Topic: *SOLVED* VE networking not working properly- details included.
Goto Forum:
  


Current Time: Sat Nov 02 16:01:48 GMT 2024

Total time taken to generate the page: 0.03203 seconds