Changeset 204 for drbl-virt/sbin/check_drbl_vm.sh
- Timestamp:
- Aug 31, 2010, 4:14:38 PM (15 years ago)
- File:
-
- 1 edited
-
drbl-virt/sbin/check_drbl_vm.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_vm.sh
r203 r204 36 36 37 37 if [ $IP_status == "online" ]; then 38 ssh -o StrictHostKeyChecking=no $client_IP "xentop - b -i1" > $drbl_vm_xentop_file38 ssh -o StrictHostKeyChecking=no $client_IP "xentop -d1 -b -i2 | awk '/^.*NAME/{i++}i==2'" > $drbl_vm_xentop_file 39 39 vm_hostnames="$(cat $drbl_vm_xentop_file | sed -n '3,$p' | awk '{print $1}')" 40 40 41 printf "[$client_hostname] " >> $drbl_vm_file41 # printf "[$client_hostname] " >> $drbl_vm_file 42 42 printf "[$client_hostname] " 43 43 declare -i i=1 … … 45 45 vm_numbers=$(echo $vm_hostnames | wc -w) 46 46 47 printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file47 # printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file 48 48 printf "[Running VM: $vm_numbers]\n" 49 49 … … 54 54 vm_CPU_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $4}')" 55 55 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_file56 # printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}K $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file 57 57 printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}K VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n" 58 58 i=i+1
Note: See TracChangeset
for help on using the changeset viewer.
