Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-3248]provide more dcscheck option #1761

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

CoderSong2015
Copy link
Contributor

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

@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3064/

@Traf-Jenkins
Copy link

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

@mashengchen mashengchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

#| 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
Copy link
Contributor

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

Copy link
Contributor Author

@CoderSong2015 CoderSong2015 Dec 18, 2018

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

case $OPT_VALUE in
-m)
if [ -e $SQ_PDSH ]; then
STAT_CMD="$SQ_PDSH -w $activeMaster $jstatcmd -gc "
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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


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"
Copy link
Contributor

@hegdean hegdean Dec 17, 2018

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


if [ -z "$OPT_VALUE" ]; then

echo -e "Process\t\tConfigured\tActual\t\tDown"
Copy link
Contributor

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


-t)
if [ -e $SQ_PDSH ]; then
STAT_CMD="$SQ_PDSH -w $activeMaster $jstackcmd "
Copy link
Contributor

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

@hegdean
Copy link
Contributor

hegdean commented Dec 17, 2018

status of mxosrvrs can be got using rest api

@CoderSong2015
Copy link
Contributor Author

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.

@hegdean
Copy link
Contributor

hegdean commented Dec 18, 2018

You can refer to REST and DCS documentation. I don't understand the need to support this additional option in dcscheck script

@CoderSong2015
Copy link
Contributor Author

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 .

@hegdean
Copy link
Contributor

hegdean commented Dec 19, 2018

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

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3070/

@CoderSong2015
Copy link
Contributor Author

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

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.

@Traf-Jenkins
Copy link

@DaveBirdsall
Copy link
Contributor

@hegdean, how does this change look to you now?

@hegdean
Copy link
Contributor

hegdean commented Dec 21, 2018

Change is not complete as suggested improvements/corrections have not been done

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3075/

@Traf-Jenkins
Copy link

@CoderSong2015
Copy link
Contributor Author

can anyone take a review?

@DaveBirdsall
Copy link
Contributor

@hegdean, could you take another look? Thanks.

-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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3081/

@Traf-Jenkins
Copy link


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"
Copy link
Contributor

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

Copy link
Contributor Author

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.

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3102/

@Traf-Jenkins
Copy link

@DaveBirdsall
Copy link
Contributor

@hegdean, how does it look now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants