OpenVZ Forum


Home » General » Support » *SOLVED* see processes belonging to the Host system
Re: see processes belonging to the Host system [message #4544 is a reply to message #4513] Fri, 14 July 2006 08:10 Go to previous messageGo to previous message
msokolov is currently offline  msokolov
Messages: 8
Registered: July 2006
Junior Member
you can use something like:

#!/usr/bin/perl

use strict;

my @pss=`ps ax`;
foreach my $elem (@pss){

        my $ps0=$elem;
        $elem=~s/^[\s]*([0-9]+)[\s]+.*$//;
        my $pidn=($1);

        my $pid0=`vzpid $pidn|tail -1`;
        $pid0=~s/\s+(\d+)//;
        my $pid1=($1);

                if ($pid1==0) {
                        print "$ps0";

                }
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *HARDWARE* Node crashed with Machine Check Exception error
Next Topic: Gentoo Kernel Problems (2.6.8-openvz-022.077) Panics Immediately - "kernel too old"
Goto Forum:
  


Current Time: Sun Oct 20 20:45:45 GMT 2024

Total time taken to generate the page: 0.05627 seconds