Changeset 204 for drbl-virt/sbin/check_drbl_client.sh
- Timestamp:
- Aug 31, 2010, 4:14:38 PM (15 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.