Changeset 200 for drbl-virt/sbin
- Timestamp:
- Aug 30, 2010, 11:11:57 AM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_client.sh
r199 r200 40 40 client_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/total.*$//' | sed 's/^Mem://' | awk '{print $1}') 41 41 client_unused_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/^.*used,//' | sed 's/free.*$//' | awk '{print $1}') 42 42 43 fi 43 44 -
drbl-virt/sbin/check_drbl_vm.sh
r199 r200 19 19 20 20 # [Main] 21 check_root 21 22 for client_IP in $client_IPs 22 23 do … … 42 43 declare -i i=1 43 44 44 vm_numbers=$(echo vm_hostnames | wc -w)45 45 vm_numbers=$(echo $vm_hostnames | wc -w) 46 46 47 printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file 47 48 printf "[Running VM: $vm_numbers]\n" … … 53 54 vm_CPU_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $4}')" 54 55 vm_Ram_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $6}')" 55 printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram} M$vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file56 printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram} MVCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"56 printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}K $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file 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" 57 58 i=i+1 58 59 done 59 60 61 else 62 echo "[Error] $client_hostname $client_IP is offline !" && exit 2 63 60 64 fi 65 61 66 done 62 67 -
drbl-virt/sbin/drbl_PXE_PV-VM_create.sh
r199 r200 107 107 # check null value 108 108 [ -z $vm_name ] && echo "[Error] no VM name" && Usage && exit 2 109 # check vm_name exist 110 vm_IP_files=$(ls $Work_Home/etc/IP_VM_eth*) 111 vm_exist_jude="no" 112 for vm_IP_file in $vm_IP_files 113 do 114 if [ -n "$(grep "$vm_name" $vm_IP_file)" ]; then 115 vm_exist_jude="yes" 116 fi 117 118 done 119 120 if [ $vm_exist_jude == "no" ]; then 121 echo "[Error] This VM name isn't DRBL PXE VM" 122 exit 2 123 fi 124 109 125 110 126 # = 2. Get VM MAC address = … … 149 165 echo "kernel = '/home/domains/vmlinuz-pxe'" > $vm_cfg 150 166 echo "ramdisk = '/home/domains/initrd-pxe.img'" >> $vm_cfg 151 echo "memory = ' 512'" >> $vm_cfg167 echo "memory = '$vm_ram'" >> $vm_cfg 152 168 echo "name = '$vm_name'" >> $vm_cfg 153 169 echo "vcpus = '$vm_cpu'" >> $vm_cfg -
drbl-virt/sbin/drbl_xen_repush.sh
r195 r200 35 35 cp /etc/drbl/IP_HOST_TABLE /opt/drbl-virt/etc/IP_HOST_TABLE 36 36 fi 37 38 # back mac address file 39 cp /etc/drbl/macadr*eth*[0-9].txt /opt/drbl-virt/etc/ 37 40 38 41 for eth in $eths
Note: See TracChangeset
for help on using the changeset viewer.