Changeset 204 for drbl-virt/sbin
- Timestamp:
- Aug 31, 2010, 4:14:38 PM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_client.sh
r202 r204 37 37 client_CPU_core=$(ssh -o StrictHostKeyChecking=no $client_IP "cat /proc/cpuinfo |grep processor | wc -l") 38 38 # check top information 39 ssh -o StrictHostKeyChecking=no $client_IP "top -b -n1" > $drbl_client_top_file 39 ssh -o StrictHostKeyChecking=no $client_IP "top -b -n2 -d1 | awk '/^top/{i++}i==2'" > $drbl_client_top_file 40 IP_VM_right_line="" 40 41 client_idle_CPU=$(cat $drbl_client_top_file | grep ^Cpu | sed 's/^.*ni,//' | sed 's/id,.*$//' | awk '{print $1}') 41 42 client_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/total.*$//' | sed 's/^Mem://' | awk '{print $1}') … … 45 46 46 47 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" 47 echo "[$client_hostname $client_IP] $IP_status $client_CPU_core $client_Ram $client_idle_CPU $client_unused_Ram" >> $drbl_client_file48 #echo "[$client_hostname $client_IP] $IP_status $client_CPU_core $client_Ram $client_idle_CPU $client_unused_Ram" >> $drbl_client_file 48 49 49 50 done -
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 -
drbl-virt/sbin/drbl_PXE_PV-VM_create.sh
r203 r204 127 127 #IP_MAC_files=$(ls $Work_Home/etc | grep 'macadr-VM-eth[0-9]*.txt') 128 128 129 IP_VM_files=$(ls $Work_Home/ IP_VM_eth[0-9]*)129 IP_VM_files=$(ls $Work_Home/etc | grep 'IP_VM_eth[0-9]*') 130 130 IP_VM_right_file="" 131 131 IP_VM_right_line="" -
drbl-virt/sbin/functions_drbl_virt
r203 r204 112 112 declare -i j=1 113 113 echo "" 114 echo " Choose Xen-enabled Kernel"114 echo "[Choose Xen-enabled Kernel]" 115 115 if [ $Kernels_nu -gt 1 ]; then 116 116 for Kernel in $Kernels … … 190 190 function get_VM_IP_range_and_prefix_name(){ 191 191 echo "" 192 echo "[Setup VM IP range]" 192 193 echo "DRBL client IP range -> $eth: [$Host_first_IP ~ $Host_last_IP]" 193 194
Note: See TracChangeset
for help on using the changeset viewer.