Fixed problem with 'top' by including full paths
authorAndy Bavier <acb@cs.princeton.edu>
Thu, 27 Jan 2005 15:27:53 +0000 (15:27 +0000)
committerAndy Bavier <acb@cs.princeton.edu>
Thu, 27 Jan 2005 15:27:53 +0000 (15:27 +0000)
pl_mom.pl

index 1e16c3c..946d555 100755 (executable)
--- a/pl_mom.pl
+++ b/pl_mom.pl
@@ -105,7 +105,7 @@ while (1) {
            } else {
                my $id = `id -u $hog`;
                chomp($id);
-               my $top = `chcontext --ctx $id top -b -n 1`;
+               my $top = `/usr/sbin/chcontext --ctx $id /usr/bin/top -b -n 1`;
                syslog ("warning", "pl_mom: Resetting slice $hog");
                if (! $debug) {
                    slice_reset($hog);
@@ -412,10 +412,10 @@ sub swap_used {
 
 sub get_slice_info {
     if (! $debug) {
-       #$content = get "http://127.0.0.1:3100/slicestat";
        $content = `curl -s http://127.0.0.1:3100/slicestat`;
     } else {
-       $content = `cat ../pl_mom-deploy/slicestat`
+       #$content = `cat ../pl_mom-deploy/slicestat`
+       $content = `curl -s http://127.0.0.1:3100/slicestat`;
     }
     my @lines = split(/\n/, $content);
     %Slice = ();