#!/usr/local/bin/bash # jail-ps # # usage: jail-ps [hostname] # # Simple process viewer for a jail master machine # # Zoidial, Inc. # Eric Thern, June, 2001 hostname=$1 if [ $# != 0 ] then case "$1" in *) cat /proc/*/status | awk '{ if ( $15 != "-" ) print $2, "\t" $11, "\t" $15, "\t" $1 }' | sort -t ' ' +2 | grep $hostname ;; esac else cat /proc/*/status | awk '{ if ( $15 != "-" ) print $2, "\t" $11, "\t" $15, "\t" $1 }' | sort -t ' ' +2 fi