-
Notifications
You must be signed in to change notification settings - Fork 152
[TRAFODION-3248]provide more dcscheck option #1761
base: master
Are you sure you want to change the base?
Conversation
Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3064/ |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/3064/ |
-m: memory status of dcsmaster -s: status of mxosrvrs -t: thread info of dcs ListenerWorker and ListenerService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
core/sqf/sql/scripts/dcscheck
Outdated
#| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect directory specified here. target folder does not exist when dcs is packaged and installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I made a mistake here. I will correct it in time. Thank you very much
core/sqf/sql/scripts/dcscheck
Outdated
case $OPT_VALUE in | ||
-m) | ||
if [ -e $SQ_PDSH ]; then | ||
STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will this work? Don't we need to specify the pid of dcsmaster to get the statistics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry . Yes I noticed that change and forgot to delete my comment
core/sqf/sql/scripts/dcscheck
Outdated
|
||
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is going to helpful while looking at issues then, It would be nice if the title is not abbreviated and the units are qualified
core/sqf/sql/scripts/dcscheck
Outdated
|
||
if [ -z "$OPT_VALUE" ]; then | ||
|
||
echo -e "Process\t\tConfigured\tActual\t\tDown" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section can be moved to the default section of the case statement rather than specifically checking blank OPT_VALUE
core/sqf/sql/scripts/dcscheck
Outdated
|
||
-t) | ||
if [ -e $SQ_PDSH ]; then | ||
STAT_CMD="$SQ_PDSH -w $activeMaster $jstackcmd " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how will this work? pid of the process need to be specified
status of mxosrvrs can be got using rest api |
yes,it can. But another developer told me that rest api will be delete sometimes so that I used zookeeper to get status of mxosrvrs directly. |
You can refer to REST and DCS documentation. I don't understand the need to support this additional option in dcscheck script |
Sometimes in production environment 24400 port will be forbidden,even http is inaccessible. Besides, operation engineers could find the status of mxosrvr and dcs master easily . |
To run dcscheck script you have to be on the node, so you should be able to run rest command from the node to get the status of mxosrvrs |
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3070/ |
yes,it can,but it‘s not easy for shell to parse json file(needs extra library like jq). Meanwhile, we have existing java library to visit zookeeper. And as above I said, another developer told me that rest api will be delete sometimes so that I used zookeeper to get status of mxosrvrs directly. |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/3070/ |
@hegdean, how does this change look to you now? |
Change is not complete as suggested improvements/corrections have not been done |
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3075/ |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/3075/ |
can anyone take a review? |
@hegdean, could you take another look? Thanks. |
core/sqf/sql/scripts/dcscheck
Outdated
-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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you. Thanks.
Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3081/ |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/3081/ |
|
||
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to expand the title headers as indicated before EC , OC and so on... Please delete the debug lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no need to expand the title headers because jdk command 'jstat' behaves as the same way.
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3102/ |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/3102/ |
@hegdean, how does it look now? |
-m: memory status of dcsmaster
-s: status of mxosrvrs
-t: thread info of dcs ListenerWorker and ListenerService