Changeset 204 for drbl-virt/sbin


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

Bugfix: correct path & delete unused sh

Location:
drbl-virt/sbin
Files:
2 deleted
4 edited

Legend:

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

    r202 r204  
    3737        client_CPU_core=$(ssh -o StrictHostKeyChecking=no $client_IP "cat /proc/cpuinfo |grep processor | wc -l")
    3838        # 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
     40IP_VM_right_line=""
    4041        client_idle_CPU=$(cat $drbl_client_top_file | grep ^Cpu | sed 's/^.*ni,//' | sed 's/id,.*$//'  | awk '{print $1}')
    4142        client_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/total.*$//' | sed 's/^Mem://' | awk '{print $1}')
     
    4546
    4647echo "[$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_file
     48#echo "[$client_hostname $client_IP] $IP_status $client_CPU_core $client_Ram $client_idle_CPU $client_unused_Ram" >> $drbl_client_file
    4849
    4950done
  • 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
  • drbl-virt/sbin/drbl_PXE_PV-VM_create.sh

    r203 r204  
    127127#IP_MAC_files=$(ls $Work_Home/etc | grep 'macadr-VM-eth[0-9]*.txt')
    128128
    129 IP_VM_files=$(ls $Work_Home/IP_VM_eth[0-9]*)
     129IP_VM_files=$(ls $Work_Home/etc | grep 'IP_VM_eth[0-9]*')
    130130IP_VM_right_file=""
    131131IP_VM_right_line=""
  • drbl-virt/sbin/functions_drbl_virt

    r203 r204  
    112112    declare -i j=1
    113113    echo ""
    114     echo "Choose Xen-enabled Kernel"
     114    echo "[Choose Xen-enabled Kernel]"
    115115    if [ $Kernels_nu -gt 1  ]; then
    116116        for Kernel in $Kernels
     
    190190function get_VM_IP_range_and_prefix_name(){
    191191echo ""
     192echo "[Setup VM IP range]"
    192193echo "DRBL client IP range -> $eth: [$Host_first_IP ~ $Host_last_IP]"
    193194
Note: See TracChangeset for help on using the changeset viewer.