[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2019-01-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16739692#comment-16739692
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r246885130
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,60 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
 fi
+
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
+else
+STAT_CMD=" $jstatcmd -gc "
+fi
+J_STATUS=`$STAT_CMD $activeDcsPid `
+EC=`echo $J_STATUS | sed -n 1p | awk '{ print $20 }'`
+EU=`echo $J_STATUS | sed -n 1p | awk '{ print $21 }'`
+OC=`echo $J_STATUS | sed -n 1p | awk '{ print $22 }'`
+OU=`echo $J_STATUS | sed -n 1p | awk '{ print $23 }'`
+PERCENT_EU=$(echo "scale=2;$EU/$EC "| bc)
+PERCENT_OU=$(echo "scale=2;$OU/$OC "| bc)
+
+echo -e "Active DCSMaster VM status:"
+echo -e "EC\tEU\tOC\tOU\tPERCENT_EU\tPERCENT_OU\t"
+echo -e "$EC\t|$EU\t|$OC\t|$OU\t|$PERCENT_EU\t\t|$PERCENT_OU\t"
--- End diff --

Would be good to expand the title headers as indicated before  EC , OC and 
so on...  Please delete the debug lines 


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2019-01-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16739206#comment-16739206
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user CoderSong2015 commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r246674279
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
 fi
+
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
+else
+STAT_CMD=" $jstatcmd -gc "
+fi
+J_STATUS=`$STAT_CMD $activeDcsPid `
+EC=`echo $J_STATUS | sed -n 1p | awk '{ print $20 }'`
+EU=`echo $J_STATUS | sed -n 1p | awk '{ print $21 }'`
+OC=`echo $J_STATUS | sed -n 1p | awk '{ print $22 }'`
+OU=`echo $J_STATUS | sed -n 1p | awk '{ print $23 }'`
+PERCENT_EU=$(echo "scale=2;$EU/$EC "| bc)
+PERCENT_OU=$(echo "scale=2;$OU/$OC "| bc)
+
+echo -e "Active DCSMaster VM status:"
+echo -e "EC\tEU\tOC\tOU\tPERCENT_EU\tPERCENT_OU\t"
+echo -e "$EC\t|$EU\t|$OC\t|$OU\t|$PERCENT_EU\t\t|$PERCENT_OU\t"
+#$STAT_CMD $activeDcsPid
+;;
+
+-t)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstackcmd "
+else
+STAT_CMD=" $jstackcmd "
+fi
+echo `$STAT_CMD $activeDcsPid \
+| sed -n '/Thread-6/, /ListenerWorker.java/p'`
+
+echo `$STAT_CMD $activeDcsPid \
+| sed -n '/Thread-5/, /ListenerService.java/p'`
+#| awk '/java.lang.Thread.State/{print $2}' `
+;;
+-s)
+if [ -e $SQ_PDSH ]; then
+"$JAVA" -XX:OnOutOfMemoryError="kill -9 %p"  -classpath 
${CLASSPATH}:${DCS_INSTALL_DIR}/"dcs-"$TRAFODION_VER".jar" 
org.trafodion.dcs.zookeeper.ZKShellTool 2>/dev/null
+else
--- End diff --

I agree with you. Thanks.


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2019-01-09 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16738493#comment-16738493
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r246483867
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
 fi
+
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
+else
+STAT_CMD=" $jstatcmd -gc "
+fi
+J_STATUS=`$STAT_CMD $activeDcsPid `
+EC=`echo $J_STATUS | sed -n 1p | awk '{ print $20 }'`
+EU=`echo $J_STATUS | sed -n 1p | awk '{ print $21 }'`
+OC=`echo $J_STATUS | sed -n 1p | awk '{ print $22 }'`
+OU=`echo $J_STATUS | sed -n 1p | awk '{ print $23 }'`
+PERCENT_EU=$(echo "scale=2;$EU/$EC "| bc)
+PERCENT_OU=$(echo "scale=2;$OU/$OC "| bc)
+
+echo -e "Active DCSMaster VM status:"
+echo -e "EC\tEU\tOC\tOU\tPERCENT_EU\tPERCENT_OU\t"
+echo -e "$EC\t|$EU\t|$OC\t|$OU\t|$PERCENT_EU\t\t|$PERCENT_OU\t"
+#$STAT_CMD $activeDcsPid
+;;
+
+-t)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstackcmd "
+else
+STAT_CMD=" $jstackcmd "
+fi
+echo `$STAT_CMD $activeDcsPid \
+| sed -n '/Thread-6/, /ListenerWorker.java/p'`
+
+echo `$STAT_CMD $activeDcsPid \
+| sed -n '/Thread-5/, /ListenerService.java/p'`
+#| awk '/java.lang.Thread.State/{print $2}' `
+;;
+-s)
+if [ -e $SQ_PDSH ]; then
+"$JAVA" -XX:OnOutOfMemoryError="kill -9 %p"  -classpath 
${CLASSPATH}:${DCS_INSTALL_DIR}/"dcs-"$TRAFODION_VER".jar" 
org.trafodion.dcs.zookeeper.ZKShellTool 2>/dev/null
+else
--- End diff --

The else part of the code  is not required for development environment.  
When setting development environment  you will be using install_traf_components 
and that takes care of setting up the classpath correctly.


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16724277#comment-16724277
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242629005
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
+echo -e "-\t--\t--\t\t"
+echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
+echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
+echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
+exit 0
+else
+ echo
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
--- End diff --

Sorry . Yes I noticed that change and forgot to delete my comment


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723625#comment-16723625
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user CoderSong2015 commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242396347
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
+echo -e "-\t--\t--\t\t"
+echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
+echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
+echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
+exit 0
+else
+ echo
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
--- End diff --

> How will this work? Don't we need to specify the pid of dcsmaster to get 
the statistics?

yes.  At the line 204 there is related code to form a complete command 
which has pid of dcsmaster.


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723258#comment-16723258
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242264193
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
--- End diff --

this section can be moved to the default section of the case statement 
rather than specifically checking blank OPT_VALUE


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723262#comment-16723262
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242265112
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
+echo -e "-\t--\t--\t\t"
+echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
+echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
+echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
+exit 0
+else
+ echo
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
+else
+STAT_CMD=" $jstatcmd -gc "
+fi
+J_STATUS=`$STAT_CMD $activeDcsPid `
+EC=`echo $J_STATUS | sed -n 1p | awk '{ print $20 }'`
+EU=`echo $J_STATUS | sed -n 1p | awk '{ print $21 }'`
+OC=`echo $J_STATUS | sed -n 1p | awk '{ print $22 }'`
+OU=`echo $J_STATUS | sed -n 1p | awk '{ print $23 }'`
+PERCENT_EU=$(echo "scale=2;$EU/$EC "| bc)
+PERCENT_OU=$(echo "scale=2;$OU/$OC "| bc)
+
+echo -e "Active DCSMaster VM status:"
+echo -e "EC\tEU\tOC\tOU\tPERCENT_EU\tPERCENT_OU\t"
+echo -e "$EC\t$EU\t$OC\t$OU\t$PERCENT_EU\t\t$PERCENT_OU\t"
+#$STAT_CMD $activeDcsPid
+;;
+
+-t)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstackcmd "
--- End diff --

how will this work? pid of the process need to be specified


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723255#comment-16723255
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242262460
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
+echo -e "-\t--\t--\t\t"
+echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
+echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
+echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
+exit 0
+else
+ echo
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
+else
+STAT_CMD=" $jstatcmd -gc "
+fi
+J_STATUS=`$STAT_CMD $activeDcsPid `
+EC=`echo $J_STATUS | sed -n 1p | awk '{ print $20 }'`
+EU=`echo $J_STATUS | sed -n 1p | awk '{ print $21 }'`
+OC=`echo $J_STATUS | sed -n 1p | awk '{ print $22 }'`
+OU=`echo $J_STATUS | sed -n 1p | awk '{ print $23 }'`
+PERCENT_EU=$(echo "scale=2;$EU/$EC "| bc)
+PERCENT_OU=$(echo "scale=2;$OU/$OC "| bc)
+
+echo -e "Active DCSMaster VM status:"
+echo -e "EC\tEU\tOC\tOU\tPERCENT_EU\tPERCENT_OU\t"
+echo -e "$EC\t$EU\t$OC\t$OU\t$PERCENT_EU\t\t$PERCENT_OU\t"
--- End diff --

It would be nice if the title is not abbreviated and the units are qualified


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723252#comment-16723252
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242261464
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
+echo -e "-\t--\t--\t\t"
+echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
+echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
+echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
+exit 0
+else
+ echo
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
--- End diff --

How will this work? Don't we need to specify the pid of dcsmaster to get 
the statistics?


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723223#comment-16723223
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

Github user hegdean commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1761#discussion_r242252294
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -171,17 +174,65 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
fi
echo
   fi
-  echo -e "Process\t\tConfigured\tActual\t\tDown"
-  echo -e "-\t--\t--\t\t"
-  echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
-  echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
-  echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
  else
echo "DCS is not installed. Please install and configure DCS..."
exit 1
  fi
 else
  echo "Trafodion is not started or is not operational..."
  echo
+ exit 1
+fi
+
+if [ -z "$OPT_VALUE" ]; then
+
+echo -e "Process\t\tConfigured\tActual\t\tDown"
+echo -e "-\t--\t--\t\t"
+echo -e 
"DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t\t$down_dcsmaster_cnt"
+echo -e 
"DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t\t$down_dcsserver_cnt"
+echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t\t$down_mxo_cnt\n"
+exit 0
+else
+ echo
+case $OPT_VALUE in
+-m)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
+else
+STAT_CMD=" $jstatcmd -gc "
+fi
+J_STATUS=`$STAT_CMD $activeDcsPid `
+EC=`echo $J_STATUS | sed -n 1p | awk '{ print $20 }'`
+EU=`echo $J_STATUS | sed -n 1p | awk '{ print $21 }'`
+OC=`echo $J_STATUS | sed -n 1p | awk '{ print $22 }'`
+OU=`echo $J_STATUS | sed -n 1p | awk '{ print $23 }'`
+PERCENT_EU=$(echo "scale=2;$EU/$EC "| bc)
+PERCENT_OU=$(echo "scale=2;$OU/$OC "| bc)
+
+echo -e "Active DCSMaster VM status:"
+echo -e "EC\tEU\tOC\tOU\tPERCENT_EU\tPERCENT_OU\t"
+echo -e "$EC\t$EU\t$OC\t$OU\t$PERCENT_EU\t\t$PERCENT_OU\t"
+#$STAT_CMD $activeDcsPid
+;;
+
+-t)
+if [ -e $SQ_PDSH ]; then
+STAT_CMD="$SQ_PDSH -w $activeMaster $jstackcmd "
+else
+STAT_CMD=" $jstackcmd "
+fi
+echo `$STAT_CMD $activeDcsPid \
+| sed -n '/Thread-6/, /ListenerWorker.java/p'`
+
+echo `$STAT_CMD $activeDcsPid \
+| sed -n '/Thread-5/, /ListenerService.java/p'`
+#| awk '/java.lang.Thread.State/{print $2}' `
+;;
+-s)
+   "$JAVA" -XX:OnOutOfMemoryError="kill -9 %p"  -classpath 
${CLASSPATH}:${DCS_INSTALL_DIR}/target/classes 
org.trafodion.dcs.zookeeper.ZKShellTool 2>/dev/null
--- End diff --

This is incorrect directory specified here. target folder does not exist 
when dcs is packaged and installed


> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TRAFODION-3248) provide more dcscheck option

2018-12-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TRAFODION-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16718654#comment-16718654
 ] 

ASF GitHub Bot commented on TRAFODION-3248:
---

GitHub user CoderSong2015 opened a pull request:

https://github.com/apache/trafodion/pull/1761

[TRAFODION-3248]provide more dcscheck option

-m: memory status of dcsmaster
-s: status of mxosrvrs
-t: thread info of dcs ListenerWorker and ListenerService

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/CoderSong2015/Apache-Trafodion forDcsStatus2

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1761.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1761


commit b20451c2bf8f204a0ec28ef337b78a1629130247
Author: haolin.song 
Date:   2018-12-12T16:37:11Z

[TRAFODION-3248]provide more dcscheck option
-m: memory status of dcsmaster
-s: status of mxosrvrs
-t: thread info of dcs ListenerWorker and ListenerService




> provide more dcscheck option
> 
>
> Key: TRAFODION-3248
> URL: https://issues.apache.org/jira/browse/TRAFODION-3248
> Project: Apache Trafodion
>  Issue Type: New Feature
>  Components: connectivity-dcs
>Affects Versions: 2.4
>Reporter: haolin.song
>Assignee: haolin.song
>Priority: Major
>
> Providing more dcscheck option to get more information about dcs/mxosrvr 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)