OpenVZ Forum


Home » General » Support » process check
process check [message #25975] Sun, 13 January 2008 10:56 Go to next message
evrynet is currently offline  evrynet
Messages: 6
Registered: October 2007
Junior Member
Hi,

Is there any script around with it I can check If irssi or bitchx running on VPSes and If yes on which VPS?

Regards
Re: process check [message #25978 is a reply to message #25975] Sun, 13 January 2008 18:21 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

If they do not change process name, and you know some shell programming, it should be as simple as something like this:

for PROCNAME in bitchx irssi; do
   echo "Checking for ${PROCNAME}"
   PIDS=$(ps h -opid -C ${PROCNAME})
   for P in $PIDS; do
       grep envID: /proc/${P}/status
   done
   echo
done


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: process check [message #25988 is a reply to message #25978] Mon, 14 January 2008 05:50 Go to previous message
vaverin is currently offline  vaverin
Messages: 708
Registered: September 2005
Senior Member
Also you can use vzprocps (with -E option). You can found this package in the following directory:
http://download.openvz.org/contrib/utils/
Previous Topic: Routing Class C subnet to VE
Next Topic: vzsplit issue?
Goto Forum:
  


Current Time: Thu Oct 17 00:54:22 GMT 2024

Total time taken to generate the page: 0.05396 seconds