Index: nutchez-0.2/src/test/add_hosts
===================================================================
--- nutchez-0.2/src/test/add_hosts	(revision 173)
+++ nutchez-0.2/src/test/add_hosts	(revision 174)
@@ -2,5 +2,5 @@
 # Program:
 #   Add nutch_nodes to /etc/hosts (for nutchez management interface).
-#   $1=/home/nutchuser/nutch_nodes
+#   $1=/home/nutchuser/nutchez/system/nutch_nodes
 #   $2=/etc/hosts
 # Author: 
@@ -38,5 +38,10 @@
 done
 
-# 附加 nutch_nodes 到 /etc/hosts 
-cp -f /etc/hosts /etc/hosts.bak
-cat $1 | grep -v '#' >> $2
+# Backup /etc/hosts
+cp -f "$2" "$2.bak"
+
+# attache nutch_nodes to hosts
+sed -i '/# NutchEz add/d' $2
+echo "# NutchEz add" >>$2
+cat $1 | grep -v '#' >>$2
+
Index: nutchez-0.2/src/test/duplicate_del
===================================================================
--- nutchez-0.2/src/test/duplicate_del	(revision 173)
+++ nutchez-0.2/src/test/duplicate_del	(revision 174)
@@ -13,5 +13,5 @@
 
 # 刪掉空白行
-sed -i '/^$/d' $1
+#sed -i '/^$/d' "$1"
 
 cp -f "$1" "${1}.old"
Index: nutchez-0.2/src/test/nutchez
===================================================================
--- nutchez-0.2/src/test/nutchez	(revision 173)
+++ nutchez-0.2/src/test/nutchez	(revision 174)
@@ -64,5 +64,6 @@
 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" \
     --title "[Management Options]" \
-        --menu "Plz choose: " 15 55 5 \
+        --menu "Plz choose: " 15 55 6 \
+        "cluster_status" "Check cluster status" \
         "cluster_setup" "Setup your datanode & tasktracker" \
         "tomcat_switch" "Start/Stop/Restart Tomcat" \
@@ -70,4 +71,41 @@
         "lang_switch" "Change language" \
         "exit" "Exit" 2>$main_choice
+}
+
+## [Cluster Status (datanode & tasktracker)] ##
+function cluster_status(){
+IP_list=$(cat $NutchEZ_HOME/system/nutch_nodes | grep -v '^$' | grep -v '#'  | awk '{print $1}')
+clusterStatus="/tmp/clusterStatus"
+rm $clusterStatus 2> /dev/null
+#printf '%16s\t %11s\t %10s\t %25s\n' "[IP] [Hostanme] [Network] [Dtatnode & Tasktracker]" >>$clusterStatus
+echo -e "[IP] \t\t [Hostanme] \t [Network] \t [Dtatnode & Tasktracker]" >>$clusterStatus
+echo -e "------------------------------------------------------------------------" >>$clusterStatus
+echo -e "\nStart to check cluster..."
+for ip in $IP_list
+do
+    # Check Network status
+    ip_status="online"
+    ping -c1 -w1 $ip 2>&1 > /dev/null || ip_status="offline"
+    # Check Hadoop/Nutch service through ssh
+    Task_Data_status="stop"
+    if [ $ip_status == "online" ]; then
+    Task_Data=$(ssh -o StrictHostKeyChecking=no $ip "jps |grep TaskTracker ; jps | grep  DataNode")
+    fi
+
+#   if [ $? == "255" ]; then 
+#   echo -e "$ip Network is down"
+#   elif [ $? == "1" ]; then
+#   echo -e "Can't ssh to $ip"
+#   fi
+
+    [ -z $Task_Data ] || Task_Data_status="running"
+    host_name=$(cat $NutchEZ_HOME/system/nutch_nodes | grep $ip | awk '{print $2}')
+    echo  -e "$ip  $host_name \t\t $ip_status \t $Task_Data_status" >>$clusterStatus
+#    printf '%16s\t %11s\t %10s\t %25s\n' "$ip $host_name $ip_status $Task_Data_status" >>$clusterStatus
+done
+
+read -p "Plz input anykey to continue..."
+$DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" \
+     --title "[Cluster Status]" --textbox $clusterStatus 20 90
 }
 
@@ -216,4 +254,6 @@
 main_menu
 case $(cat $main_choice) in
+    "cluster_status")
+        cluster_status;;
     "cluster_setup")
         cluster_setup;;
