Ignore:
Timestamp:
Aug 31, 2010, 4:14:38 PM (15 years ago)
Author:
rock
Message:

Bugfix: correct path & delete unused sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/check_drbl_vm.sh

    r203 r204  
    3636   
    3737    if [ $IP_status == "online" ]; then
    38         ssh -o StrictHostKeyChecking=no $client_IP "xentop -b -i1" > $drbl_vm_xentop_file
     38        ssh -o StrictHostKeyChecking=no $client_IP "xentop -d1 -b -i2 | awk '/^.*NAME/{i++}i==2'" > $drbl_vm_xentop_file
    3939        vm_hostnames="$(cat $drbl_vm_xentop_file | sed -n '3,$p' | awk '{print $1}')"
    4040   
    41         printf "[$client_hostname] " >> $drbl_vm_file
     41#        printf "[$client_hostname] " >> $drbl_vm_file
    4242        printf "[$client_hostname] "
    4343        declare -i i=1
     
    4545        vm_numbers=$(echo $vm_hostnames | wc -w)
    4646
    47         printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file
     47#        printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file
    4848        printf "[Running VM: $vm_numbers]\n"
    4949
     
    5454            vm_CPU_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $4}')"
    5555            vm_Ram_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $6}')"
    56             printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}K $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
     56#            printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}K $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
    5757            printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}K VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"
    5858            i=i+1
Note: See TracChangeset for help on using the changeset viewer.