You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "rajeshbabu (JIRA)" <ji...@apache.org> on 2013/08/07 17:22:48 UTC

[jira] [Updated] (HBASE-9152) Not able to find HMaster and HRegionServer processes with grep by process name on ps result because of large classpath as argument.

     [ https://issues.apache.org/jira/browse/HBASE-9152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

rajeshbabu updated HBASE-9152:
------------------------------

    Attachment: HBASE-9152_94.patch
    
> Not able to find HMaster and HRegionServer processes with grep by process name on ps result because of large classpath as argument.
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-9152
>                 URL: https://issues.apache.org/jira/browse/HBASE-9152
>             Project: HBase
>          Issue Type: Bug
>          Components: scripts
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>             Fix For: 0.98.0, 0.95.2, 0.94.12
>
>         Attachments: HBASE-9152_94.patch
>
>
> Here no class name of HMaster because cmdline file holds 4kb(depends on os). So grep on ps output is not giving hbase process details.
> {code}
> HOST-10-18-91-14:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin # cat /proc/16885/cmdline
> /opt/jdk1.6.0_31/bin/java-Dproc_master-XX:OnOutOfMemoryError=kill -9 %p-Xmx1000m-XX:+UseConcMarkSweepGC-Dhbase.log.dir=/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../logs-Dhbase.log.file=hbase-root-master-HOST-10-18-91-14.log-Dhbase.home.dir=/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/..-Dhbase.id.str=root-Dhbase.root.logger=INFO,RFA-Dhbase.security.logger=INFO,RFAS-classpath/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../conf:/opt/jdk1.6.0_31/lib/tools.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/..:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/activation-1.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/asm-3.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-beanutils-1.7.0.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-beanutils-core-1.8.0.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-cli-1.2.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-codec-1.7.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-collections-3.2.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-configuration-1.6.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-digester-1.8.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-el-1.0.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-httpclient-3.0.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-io-2.4.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-lang-2.6.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-logging-1.1.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-math-2.2.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-net-1.4.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/core-3.1.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/findbugs-annotations-1.3.9-1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/guava-12.0.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hadoop-core-1.1.2.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-client-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-common-0.97.0-SNAPSHOT-tests.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-common-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-examples-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-hadoop-compat-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-hadoop1-compat-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-it-0.97.0-SNAPSHOT-tests.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-it-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-prefix-tree-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-protocol-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-server-0.97.0-SNAPSHOT-tests.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-server-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/high-scale-lib-1.1.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/htrace-1.50.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/httpclient-4.1.3.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/httpcore-4.1.3.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jackson-core-asl-1.8.8.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jackson-jaxrs-1.8.8.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jackson-mapper-asl-1.8.8.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jackson-xc-1.8.8.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jamon-runtime-2.3.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jasper-compiler-5.5.23.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jasper-runtime-5.5.23.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jaxb-api-2.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jaxb-impl-2.2.3-1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jersey-core-1.8.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jersey-json-1.8.jar
> {code}
> Output of grep on ps result :
> =============================
> {code}
> HOST-10-18-91-14:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin # ps ux | grep HMaster
> root     17342  0.0  0.0  10640   884 pts/1    R+   23:19   0:00 grep HMaster
> {code}
> We can export classpath before exec hbase process. 
> {code}
> export CLASSPATH=$CLASSPATH
> if [ "${HBASE_NOEXEC}" != "" ]; then
>   "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $JAVA_HEAP_MAX $HBASE_OPTS $CLASS "$@"
> else
>   exec "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $JAVA_HEAP_MAX $HBASE_OPTS $CLASS "$@"
> fi
> {code}
> Here is the output after exporting classpath.
> {code}
> HOST-10-18-91-14:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin # ps ux | grep HMaster
> root     20481 21.2  3.0 1443992 112268 pts/1  Sl   00:04   0:05 /opt/jdk1.6.0_31/bin/java -Dproc_master -XX:OnOutOfMemoryError=kill -9 %p -Xmx1000m -XX:+UseConcMarkSweepGC -Dhbase.log.dir=/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../logs -Dhbase.log.file=hbase-root-master-HOST-10-18-91-14.log -Dhbase.home.dir=/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/.. -Dhbase.id.str=root -Dhbase.root.logger=INFO,RFA -Dhbase.security.logger=INFO,RFAS org.apache.hadoop.hbase.master.HMaster start
> root     20814  0.0  0.0  10640   876 pts/1    S+   00:04   0:00 grep HMaster
> {code}
> This will help to find hbase processes dynamically by process name (HMaster,HRegionServer). Needed in our use case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira