Changeset 197


Ignore:
Timestamp:
Aug 29, 2010, 4:26:10 PM (14 years ago)
Author:
rock
Message:

Modify: printf format

Location:
drbl-virt/sbin
Files:
2 edited

Legend:

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

    r195 r197  
    4242    fi
    4343
    44 echo "$client_hostname $client_IP $IP_status CPU_Core=$client_CPU_core Ram=$client_Ram idle_CPU=$client_idle_CPU unused_Ram=$client_unused_Ram"
    45 echo "$client_hostname $client_IP $IP_status $client_CPU_core $client_Ram $client_idle_CPU $client_unused_Ram" >> $drbl_client_file
     44echo "[$client_hostname $client_IP] $IP_status CPU_Core=$client_CPU_core Ram=$client_Ram idle_CPU=$client_idle_CPU unused_Ram=$client_unused_Ram"
     45echo "[$client_hostname $client_IP] $IP_status $client_CPU_core $client_Ram $client_idle_CPU $client_unused_Ram" >> $drbl_client_file
    4646
    4747done
  • drbl-virt/sbin/check_drbl_vm.sh

    r196 r197  
    3838        vm_hostnames="$(cat $drbl_vm_xentop_file | sed -n '3,$p' | awk '{print $1}')"
    3939   
    40         printf "[$client_hostname]  " >> $drbl_vm_file
    41         printf "[$client_hostname]  "
     40        printf "[$client_hostname]\n" >> $drbl_vm_file
     41        printf "[$client_hostname]\n"
    4242        declare -i i=1
    4343
     
    4848            vm_CPU_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $4}')"
    4949            vm_Ram_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $6}')"
    50             printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}M $vm_CPU_loading $vm_Ram_loading " >> $drbl_vm_file
    51             printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}M $vm_CPU_loading $vm_Ram_loading "
     50            printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}M $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
     51            printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}M VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"
    5252            i=i+1
    5353        done
    5454   
    5555    fi
    56     printf "\n" >> $drbl_vm_file
    57     printf "\n"
    5856done
    5957
Note: See TracChangeset for help on using the changeset viewer.