X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=factory%2Fpl-ps;fp=factory%2Fpl-ps;h=0000000000000000000000000000000000000000;hb=b81d4faa0fd65a42ae4a9a0191b4684d3aa7ff62;hp=eafdf5bd4c567ee60171f03591fe5a066efdbd52;hpb=8d38d04aebf97cd4f5a9bc8d1c6586b3daef4685;p=vsys.git diff --git a/factory/pl-ps b/factory/pl-ps deleted file mode 100755 index eafdf5b..0000000 --- a/factory/pl-ps +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/perl -use strict; - -############################################### -# pl-ps for slicestat by KyoungSoo Park -############################################### - -my %slice_id; -my %slice; - -open THIS_PIPE, "/bin/awk -F: \'{print \$1, \$3}\' /etc/passwd |"; -while() { - if (/(.+)\s+(\d+)/) { - $slice_id{$1} = $2; - $slice{$2} = $1; - } -} -close THIS_PIPE; - -open THIS_PIPE, "/usr/sbin/vps -eo pid,user | sed 1d | awk \'{print \$1, \$2}\' | sort -k 2 |"; -while() { - if (/(\d+)\s+(.+)$/) { - my $pid = $1; - my ($id, $sl); - - if (defined($slice_id{$2})) { - $id = $slice_id{$2}; - $sl = $2; - } else { - $id = $2; - $sl = $slice{$2}; - } - print sprintf("%s %s %s\n", $id, $sl, $pid); - } -} -close THIS_PIPE;