/[sysadmin-cookbook]/recepies/lxc/lxc-watchdog.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/lxc/lxc-watchdog.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 270 by root, Sun Jun 26 15:00:40 2011 UTC revision 271 by dpavlin, Fri Sep 9 18:21:14 2011 UTC
# Line 54  lxc_ip() { Line 54  lxc_ip() {
54  }  }
55    
56  lxc_status() {  lxc_status() {
57          ( find /var/lib/lxc/ -name "config" | cut -d/ -f5 | sort -u | xargs -i lxc-info -n {} | sed "s/'//g" | while read name is status ; do          ( find /var/lib/lxc/ -name "config" | cut -d/ -f5 | sort -u | while read name ; do
58                    status=`lxc-info -n $name 2>/dev/null | grep state: | cut -d: -f2`
59                  boot="-"                  boot="-"
60                  test -s /var/lib/lxc/$name/on_boot && boot="boot"                  test -s /var/lib/lxc/$name/on_boot && boot="boot"
61                  echo "$name $status $boot $(lxc_rootfs $name) $(lxc_ip $name) $(lxc_hostname $name)"                  echo "$name $status $boot $(lxc_rootfs $name) $(lxc_ip $name) $(lxc_hostname $name)"

Legend:
Removed from v.270  
changed lines
  Added in v.271

  ViewVC Help
Powered by ViewVC 1.1.26