grep matching pattern from the line

$ps -ef | grep myadm
myadm 10016 1 0 May04 ? 00:17:43 /opt/atseintl/3rdParty/jdk1.6.0_22/bin/java -Dcontainer=smx-4.2 -Dser
vice=[TKT/WS01] -Ddomain=TKT -Dinstance=WS01 -Daction=start -Dsystemname=CertHybrid -Xms1G -Xmx2G -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+DisableExplicitGC -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:ParallelGCThreads=8 -Xloggc:/apps/safire/smx-4.2/domains/TKT/WS01/logs/gc_050412_012458.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc -classpath :/apps/safire.safire.2012.04.00/smx-4.2/domains/TKT/WS01/etc:/apps/safire.safire.2012.04.00/smx-4.2/domains/TKT/WS01/conf:/apps/safire.safire.2012.04.00/smx-4.2/domains/TKT/WS01/lib/karaf-client.jar:/apps/safire.safire.2012.04.00/smx-4.2/domains/TKT/WS01/lib/karaf-jaas-boot.jar:/apps/safire.safire.2012.04.00/smx-4.2/domains/TKT/WS01/lib/karaf.jar:/apps/safire.safire.2012.04.00/smx-4.2/domains/TKT/WS01/lib/servicemix-version.jar org.apache.felix.karaf.main.Main

$ps -ef | grep myadm | grep -oh "\-Xms\w*"
-Xms1G

$ps -ef | grep myadm | grep -oh "\-XX:\w*=\w*"
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:ParallelGCThreads=8

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s