Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8929E101EF for ; Wed, 7 Aug 2013 13:02:53 +0000 (UTC) Received: (qmail 82161 invoked by uid 500); 7 Aug 2013 13:02:52 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 82050 invoked by uid 500); 7 Aug 2013 13:02:51 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 81722 invoked by uid 99); 7 Aug 2013 13:02:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Aug 2013 13:02:49 +0000 Date: Wed, 7 Aug 2013 13:02:49 +0000 (UTC) From: "rajeshbabu (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-9152) Not able to find HMaster and HRegionServer processes with grep by process name on ps result because of large classpath as argument. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 rajeshbabu created HBASE-9152: --------------------------------- Summary: Not able to find HMaster and HRegionServer processes = with grep by process name on ps result because of large classpath as argume= nt. 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 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/168= 85/cmdline /opt/jdk1.6.0_31/bin/java-Dproc_master-XX:OnOutOfMemoryError=3Dkill -9 %p-X= mx1000m-XX:+UseConcMarkSweepGC-Dhbase.log.dir=3D/home/rajeshbabu/hbase-0.97= .0-SNAPSHOT/bin/../logs-Dhbase.log.file=3Dhbase-root-master-HOST-10-18-91-1= 4.log-Dhbase.home.dir=3D/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/..-Dhbas= e.id.str=3Droot-Dhbase.root.logger=3DINFO,RFA-Dhbase.security.logger=3DINFO= ,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/r= ajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/activation-1.1.jar:/home/rajeshb= abu/hbase-0.97.0-SNAPSHOT/bin/../lib/asm-3.1.jar:/home/rajeshbabu/hbase-0.9= 7.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/rajeshbab= u/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-cli-1.2.jar:/home/rajeshbabu/hba= se-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/h= base-0.97.0-SNAPSHOT/bin/../lib/commons-configuration-1.6.jar:/home/rajeshb= abu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-digester-1.8.jar:/home/rajeshb= abu/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-el-1.0.jar:/home/rajeshbabu/hb= ase-0.97.0-SNAPSHOT/bin/../lib/commons-httpclient-3.0.1.jar:/home/rajeshbab= u/hbase-0.97.0-SNAPSHOT/bin/../lib/commons-io-2.4.jar:/home/rajeshbabu/hbas= e-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-S= NAPSHOT/bin/../lib/core-3.1.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bi= n/../lib/findbugs-annotations-1.3.9-1.jar:/home/rajeshbabu/hbase-0.97.0-SNA= PSHOT/bin/../lib/guava-12.0.1.jar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bi= n/../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-SNAPSH= OT/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/rajeshba= bu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-examples-0.97.0-SNAPSHOT.jar:/hom= e/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-hadoop-compat-0.97.0-SN= APSHOT.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/../li= b/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-SNAP= SHOT/bin/../lib/hbase-prefix-tree-0.97.0-SNAPSHOT.jar:/home/rajeshbabu/hbas= e-0.97.0-SNAPSHOT/bin/../lib/hbase-protocol-0.97.0-SNAPSHOT.jar:/home/rajes= hbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-server-0.97.0-SNAPSHOT-tests.j= ar:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/hbase-server-0.97.0-SN= APSHOT.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.ja= r:/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/httpclient-4.1.3.jar:/h= ome/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/httpcore-4.1.3.jar:/home/ra= jeshbabu/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/r= ajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jackson-mapper-asl-1.8.8.jar:/ho= me/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jackson-xc-1.8.8.jar:/home/r= ajeshbabu/hbase-0.97.0-SNAPSHOT/bin/../lib/jamon-runtime-2.3.1.jar:/home/ra= jeshbabu/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/rajeshb= abu/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/hbas= e-0.97.0-SNAPSHOT/bin/../lib/jersey-json-1.8.jar {code} Output of grep on ps result : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D {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 HMast= er {code} We can export classpath before exec hbase process.=20 {code} export CLASSPATH=3D$CLASSPATH if [ "${HBASE_NOEXEC}" !=3D "" ]; then "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError=3D"kill -9 %p" $JAVA_HEAP_= MAX $HBASE_OPTS $CLASS "$@" else exec "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError=3D"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=3Dkill -9 %p -Xmx1000m= -XX:+UseConcMarkSweepGC -Dhbase.log.dir=3D/home/rajeshbabu/hbase-0.97.0-SN= APSHOT/bin/../logs -Dhbase.log.file=3Dhbase-root-master-HOST-10-18-91-14.lo= g -Dhbase.home.dir=3D/home/rajeshbabu/hbase-0.97.0-SNAPSHOT/bin/.. -Dhbase.= id.str=3Droot -Dhbase.root.logger=3DINFO,RFA -Dhbase.security.logger=3DINFO= ,RFAS org.apache.hadoop.hbase.master.HMaster start root 20814 0.0 0.0 10640 876 pts/1 S+ 00:04 0:00 grep HMast= er {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 administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira