DX Application Performance Management

Expand all | Collapse all

EPAgeng script for Zlinux

Jump to Best Answer

Anon Anon08-13-2013 09:46 AM

Anon Anon08-13-2013 02:46 PM

Haruhiko Davis08-13-2013 05:11 PMBest Answer

Anon Anon08-14-2013 02:25 PM

Haruhiko Davis08-14-2013 04:24 PM

Haruhiko Davis08-14-2013 07:48 PM

Haruhiko Davis08-15-2013 12:10 AM

Haruhiko Davis08-15-2013 12:48 PM

Haruhiko Davis08-15-2013 12:55 PM

Haruhiko Davis08-15-2013 02:47 PM

Haruhiko Davis08-15-2013 05:42 PM

Haruhiko Davis08-16-2013 12:05 AM

Haruhiko Davis08-16-2013 12:52 AM

Haruhiko Davis08-27-2013 04:29 PM

Anon Anon08-28-2013 10:52 AM

Haruhiko Davis08-28-2013 04:33 PM

Anon Anon08-30-2013 11:06 AM

Haruhiko Davis08-30-2013 04:43 PM

Haruhiko Davis08-30-2013 05:20 PM

Anon Anon09-04-2013 10:20 AM

Haruhiko Davis09-04-2013 06:22 PM

Haruhiko Davis09-11-2013 11:54 AM

Anon Anon09-11-2013 12:59 PM

Haruhiko Davis09-11-2013 01:19 PM

Haruhiko Davis09-11-2013 01:23 PM

Haruhiko Davis09-18-2013 12:00 AM

  • 1.  EPAgeng script for Zlinux

    Posted 07-24-2013 10:27 AM
    Is there anyone can share the scirpts for monitoring CPU and Memory on Zlinux please? Thanks

    Zhang


  • 2.  RE: EPAgeng script for Zlinux

    Posted 07-24-2013 10:32 AM
    I don't have a VM to test one, but if you could attach a file with the output from the commands you use to normally monitor them from the commandline (such as "vmstat", "netstat", "iostat"), I can write an updated plug-in for you.

    I will write them in Perl so ensure you have at least Perl 5.6 or higher installed.

    -Hiko


  • 3.  RE: EPAgeng script for Zlinux

    Posted 07-24-2013 10:42 AM
      |   view attached
    Hi Hiko,
    Thanks for your quick response. Attached is the output. Meanwhile I'd like to monitor CPU usage per each of process. I was using Remote Agent, but that agent has "negative value" issue. When the JVM's recycled the remote agent is not able to kill the old process instead it creates multiple nodes for one JVMs with the CPU usage value -1... So Can you share what command was usded for remote agent to monitor CPU usage or please share the plug-in for monitor CPU usage.. Basically what I want to monitor by EPAgent is CPU and Memory usage. Thanks.








    hdavis wrote:

    I don't have a VM to test one, but if you could attach a file with the output from the commands you use to normally monitor them from the commandline (such as "vmstat", "netstat", "iostat"), I can write an updated plug-in for you.

    I will write them in Perl so ensure you have at least Perl 5.6 or higher installed.

    -Hiko

    Attachment(s)

    txt
    output.txt   9K 1 version


  • 4.  RE: EPAgeng script for Zlinux

    Posted 07-29-2013 04:51 PM
    Please show me in the text file the exact command you ran for each group of metrics, such as "vmstat 2 1".

    I also need to know which bits of data you want, or all of it.


  • 5.  RE: EPAgeng script for Zlinux

    Posted 08-05-2013 11:12 PM
    When you get a chance, please respond back to my question about the commands you want to have executed.


  • 6.  RE: EPAgeng script for Zlinux

    Posted 08-07-2013 09:57 AM

    hdavis wrote:

    When you get a chance, please respond back to my question about the commands you want to have executed.
    Hi Davis,
    Sorry for my late response. The command I was using is ps -auxw, the output is as below:
    [root@e41l902m ~]# ps -auxw
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    root 1 0.0 0.0 2392 704 ? Ss May05 1:11 init [3]
    root 2 0.0 0.0 0 0 ? S< May05 0:00 [migration/0]
    root 3 0.0 0.0 0 0 ? SN May05 0:13 [ksoftirqd/0]
    root 4 0.0 0.0 0 0 ? S< May05 0:00 [migration/1]

    The metrics we are interested in are %CPU and %MEM for a specific process. Thanks. Please share your script if possible if possible. Appreciate it. THank you.
    Zhang


  • 7.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 12:49 AM
    Please run the following and post the output:
    ps -eaf
    Post only the lines with the JVM metrics.

    Thanks,
    Hiko


  • 8.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:01 AM
    We should be able to adapt my existing WebSphere process monitoring script.

    I just need to adjust the "ps" command to grab your processes and then we're ready for you to test.


  • 9.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 11:04 AM
    [tivadm@e48l002v ~]$ ps -eaf
    UID PID PPID C STIME TTY TIME CMD
    root 1 0 0 May05 ? 00:00:59 init [3]
    pecaqv51 3260 1 1 Aug07 ? 00:16:38 /opt/IBM/WebSphere/EntAppServer7-64/java/bin/java -server -Dwas.status.socket=40531 -Declipse.security -Dosgi.install.area=/opt/IBM/WebSphere/EntAppS
    pecaqv51 3752 1 1 Aug07 ? 00:16:14 /opt/IBM/WebSphere/EntAppServer7-64/java/bin/java -server -Dwas.status.socket=49699 -Declipse.security -Dosgi.install.area=/opt/IBM/WebSphere/EntAppS
    pecaqv51 4132 1 1 Aug07 ? 00:17:36 /opt/IBM/WebSphere/EntAppServer7-64/java/bin/java -server -Dwas.status.socket=44241 -Declipse.security -Dosgi.install.area=/opt/IBM/WebSphere/EntAppS

    As the snapshot above, it didn't show full path, but these are the JVM instances...


  • 10.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:02 PM
    I'm sorry it took so long to get to this point.

    Please use this script I've already written for WebSphere JVM processes: https://communities.ca.com/documents/2301951/7b71afcc-170c-4f00-813f-6b1db008f839


  • 11.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:05 PM
    Hi Davis,
    Thank you. I saw the name of this script is AIX-JVM-Stats.. This is also compatible with zlinux? And it could provide CPU and Memory info per each of JVM instances?
    Zhang


  • 12.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:07 PM
    The Perl code is certainly compatible. Any issues will be related to the actual "ps" command that is executed.

    Please run the script as detailed in the script or let me know if you have any difficulties.

    We could also do a G+ Hangout to do a screen sharing session.

    -Hiko


  • 13.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:09 PM
    I would just run it manually first without EPA and see if you get results or errors.

    If you get errors, please post them here.


  • 14.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:18 PM
    Hi Davis,
    Here is the output:

    [root@e41l902m epaplugins]# perl psweb.pl
    <metric type="StringEvent" name="JVM Stats|--noclear:CPU (%)" value="console" />
    <metric type="IntCounter" name="JVM Stats|--noclear:RSS" value="1916" />
    <metric type="StringEvent" name="JVM Stats|-:CPU (%)" value="su" />
    <metric type="IntCounter" name="JVM Stats|-:RSS" value="67168" />
    <metric type="StringEvent" name="JVM Stats|-:CPU (%)" value="-" />
    <metric type="IntCounter" name="JVM Stats|-:RSS" value="62055" />
    printMetric called with incorrect arguments ('type', 'name', and 'value' are mandatory) at psweb.pl line 52


    Seems have to do some modification of this script.


  • 15.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:23 PM
    Run the "ps" command as it appears in the script.

    Look at the resulting output and match it to where the program fails. There appears to be some sort of mismatch in the metric type.


  • 16.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:27 PM
    You'll want to edit this command at line 19:
    my $psCommand='ps -eaf|awk \'/(websphere[0-9]\/java)/&&!/grep/{print $2}\'|xargs -n1 ps vww|awk \'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$7,$11,$NF;t+=$7;c+=$11}\'';
    make sure your output looks like the output I've shown in the program. If it doesn't we'll need to adjust the command.


  • 17.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 01:31 PM
    make sure your output looks like the output I've shown in the program. If it doesn't we'll need to adjust the command.



    Where is your output? I didn't see it.


  • 18.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 02:31 PM
    run the entire "ps" command from line 19 in the program or use the code block in my previous post.


  • 19.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 02:36 PM
    Try this:
    ps -eaf|awk '/([wW]eb[sS]phere\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$7,$11,$NF;t+=$7;c+=$11}'


  • 20.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 02:45 PM
    Tried, got this


    -rwxr-xr-x 1 root root 2380 Aug 8 14:44 psweb.pl
    [root@e41l902m epaplugins]# perl psweb.pl
    Bareword found where operator expected at psweb.pl line 20, near "]ebsphere"
    (Missing operator before ebsphere?)
    Backslash found where operator expected at psweb.pl line 20, near "ebsphere\"
    syntax error at psweb.pl line 20, near "]ebsphere"
    Execution of psweb.pl aborted due to compilation errors.


  • 21.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 04:12 PM
    Thanks that was helpful.
    Let me work on this to get this cleaned up for your manual test.


  • 22.  RE: EPAgeng script for Zlinux

    Posted 08-08-2013 04:17 PM
    Run the "ps" command from the shell, not the Perl program:
    ps -eaf|awk \'/(WebSphere\/java)/&&!/grep/{print $2}\'|xargs -n1 ps vww|awk \'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$7,$11,$NF;t+=$7;c+=$11}\'
    Please update with the results.


  • 23.  RE: EPAgeng script for Zlinux

    Posted 08-09-2013 09:46 AM
    [root@e41l902m epaplugins]# ps -eaf|awk \'/(WebSphere\/java)/&&!/grep/{print $2}\'|xargs -n1 ps vww|awk \'NF>5&&!/PID/{printf "%s\t%s\t%s\n", $7,$11,$NF,t+=$7;c+=$11}\'
    -bash: !/grep/{print: event not found


  • 24.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 09:46 AM
    Hi Davis,
    Any update on this please?


  • 25.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 10:06 AM
    I'm still working on the details of the "ps" output so we can get the parsing correct.
    It's a bit difficult as I don't have a zSeries system to work with but I'm am testing on RHEL.


  • 26.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 10:08 AM
    Thank you, I can run the script and show you the output from my side for your testing if you need my help. Let me know.


  • 27.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 01:39 PM
    Please send me your output from this command:
    ps -eaf|awk '/WebSphere/&&!/grep/{print $2}'|xargs -n1 ps vww


  • 28.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 01:44 PM
    There is a long output.. I just take the part of it.


    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    18455 ? Sl 314:22 5942 50 3182233 1633156 3.3 /opt/IBM/WebSphere/EntAppServer7-64/java/bin/java -Declipse.security -Dwas.status.socket=41866 -Dosgi.install.area=/opt/IBM/WebSphere/EntAppServer7-64 -Dosgi.configuration.area=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev70_%g,groupAccess,nonFatal -Xscmx50M -Xbootclasspath/p:/opt/IBM/WebSphere/EntAppServer7-64/java/jre/lib/ext/ibmorb.jar:/opt/IBM/WebSphere/EntAppServer7-64/java/jre/lib/ext/ibmext.jar -classpath /opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties:/opt/IBM/WebSphere/EntAppServer7-64/properties:/opt/IBM/WebSphere/EntAppServer7-64/lib/startup.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/bootstrap.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/jsf-nls.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/lmproxy.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/urlprotocols.jar:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/batchboot.jar:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/batch2.jar:/opt/IBM/WebSphere/EntAppServer7-64/java/lib/tools.jar -Dibm.websphere.internalClassAccessMode=allow -Xms1024m -Xmx2048m -Xcompressedrefs -Dws.ext.dirs=/opt/IBM/WebSphere/EntAppServer7-64/java/lib:/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/classes:/opt/IBM/WebSphere/EntAppServer7-64/classes:/opt/IBM/WebSphere/EntAppServer7-64/lib:/opt/IBM/WebSphere/EntAppServer7-64/installedChannels:/opt/IBM/WebSphere/EntAppServer7-64/lib/ext:/opt/IBM/WebSphere/EntAppServer7-64/web/help:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/opt/IBM/WebSphere/EntAppServer7-64/derby -Dcom.ibm.itp.location=/opt/IBM/WebSphere/EntAppServer7-64/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01 -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dwas.install.root=/opt/IBM/WebSphere/EntAppServer7-64 -Dpython.cachedir=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/temp/cachedir -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01 -DPVM_LOAD_BALANCER_URL=http://pvm-v0.cmssvc.local:80 -DMSTR_URL=https://portalz7.cms.cmsval/wps/myportal/cms_portal/PV-Reports_V0 -DPVP_LANDING_PAGE_URL=https://portalz7.cms.cmsval/wps/myportal/cmsportal/PV-PQRS/PV_V0/overview1-pv-v0 -DPVA_LANDING_PAGE_URL=https://portalz7.cms.cmsval/wps/myportal/cmsportal/PV-PQRS/PV_V0/overview2-pv-v0 -DmdmCheck=true -javaagent:/opt/CA/PVMV0/wily/Agent.jar -Dcom.wily.introscope.agentProfile=/opt/CA/PVMV0/wily/IntroscopeAgent.profile -Djava.security.auth.login.config=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties/wsjaas.conf -Djava.security.policy=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/config ENT7-CELL node-01 PVMV0-002v-S1
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    21162 ? Sl 514:54 13672 50 1283713 492784 0.9 /opt/IBM/WebSphere/EntAppServer7-64/java/bin/java -Declipse.security -Dwas.status.socket=33676 -Dosgi.install.area=/opt/IBM/WebSphere/EntAppServer7-64 -Dosgi.configuration.area=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev70_%g,groupAccess,nonFatal -Xscmx50M -Xbootclasspath/p:/opt/IBM/WebSphere/EntAppServer7-64/java/jre/lib/ext/ibmorb.jar:/opt/IBM/WebSphere/EntAppServer7-64/java/jre/lib/ext/ibmext.jar -classpath /opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties:/opt/IBM/WebSphere/EntAppServer7-64/properties:/opt/IBM/WebSphere/EntAppServer7-64/lib/startup.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/bootstrap.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/jsf-nls.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/lmproxy.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/urlprotocols.jar:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/batchboot.jar:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/batch2.jar:/opt/IBM/WebSphere/EntAppServer7-64/java/lib/tools.jar -Dibm.websphere.internalClassAccessMode=allow -Xms256m -Xmx512m -Xcompressedrefs -Dws.ext.dirs=/opt/IBM/WebSphere/EntAppServer7-64/java/lib:/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/classes:/opt/IBM/WebSphere/EntAppServer7-64/classes:/opt/IBM/WebSphere/EntAppServer7-64/lib:/opt/IBM/WebSphere/EntAppServer7-64/installedChannels:/opt/IBM/WebSphere/EntAppServer7-64/lib/ext:/opt/IBM/WebSphere/EntAppServer7-64/web/help:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/opt/IBM/WebSphere/EntAppServer7-64/derby -Dcom.ibm.itp.location=/opt/IBM/WebSphere/EntAppServer7-64/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01 -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dwas.install.root=/opt/IBM/WebSphere/EntAppServer7-64 -Dpython.cachedir=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/temp/cachedir -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01 -Dcom.ibm.security.jgss.debug=off -Dcom.ibm.security.krb5.Krb5Debug=off -Djava.security.auth.login.config=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties/wsjaas.conf -Djava.security.policy=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/config ENT7-CELL node-01 RACS-s1


  • 29.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 01:46 PM
    That's exactly what I was looking for; I needed to validate that we're getting the same columns of data.

    I'm almost there now.


  • 30.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 01:57 PM
    Run this command:
    ps -eaf|awk '/(WebSphere\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'


  • 31.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 01:59 PM
    [root@e48l002v ~]# ps -eaf|awk '/(WebSphere\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'
    6568 0.0 -
    3420 0.0 -
    1856 0.0 -bash
    4912 0.0 wasadmin
    3476 0.0 -
    3392 0.0 -
    1780 0.0 -bash
    572 0.0 vww
    932 0.0 vww
    440 0.0 --noclear


  • 32.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:02 PM
    That wasn't quite what I wanted.

    Try this:
    ps -eaf|awk '/(WebSphere)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'


  • 33.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:04 PM
    [root@e48l002v ~]# ps -eaf|awk '/(WebSphere)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'
    678672 1.3 RNAVal0-s2
    673360 1.3 RNAVal0-s1
    1058816 2.1 -Dpecos.url=
    1173432 2.3 -Xjit:dontInline={jav
    1156016 2.3 -Xjit:dontInline={ja
    1597480 3.2 REMAS-S1
    2543512 5.1 nodeagent
    638844 1.2 ACA-ACO-s2
    657676 1.3 ACA-AC0-s1
    366996 0.7 MACBIS-S1
    354104 0.7 HATS-e48l002v-1
    427064 0.8 RNSGUI-WVE-V0_node-01
    1024004 2.0 EES-S1
    1026724 2.0 EES-S2
    571904 1.1 CPC-002V-s1
    1633160 3.3 PVMV0-002v-S1
    492780 0.9 RACS-s1
    1023308 2.0 -Djava.sec
    1026428 2.0 -Djava.sec
    986312 1.9 -Dnppes.useridurl=https://nppes7.cm
    1036648 2.0 -Djava.security.auth.l
    1014616 2.0 -Dnppes.useridurl=https://nppes7.cm
    1028416 2.0 -Dnppes.useridurl=https://nppes7.cms.cmsval/I
    195516 0.3 nodeagent
    505568 1.0 RNSGUI-V0-s1
    473476 0.9 RNSGUI-V0-s2
    9086888 18.3 -appl
    9140624 18.4 -no
    920792 1.8 ESMD-WEB-APP-s1
    951416 1.9 ESMD-WEB-APP-s2


  • 34.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:08 PM
    We're getting the values now, but not correctly getting the process name.

    Let me work on this.


  • 35.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:15 PM
    Is your script capable of defining each of the process name by our own? Otherwise the names will confuse our customers. For example, there are 2 jvms for our Application A. Can we name this two processes as JVM_1_APPLICATION A and JVM_2_APPLICATION A, which will be clear when we check the performance data from metric groupings or generate reports based on it.


  • 36.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:17 PM
    The names are defined in WAS, and they appear in the output of the "ps -aef" command. I'm grabbing that as the node name.


  • 37.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:21 PM
    Yes. I know the name is from the "ps -aef"... I was asking if the script is able to customize the name based on the output of the "ps -aef" command.


  • 38.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:22 PM
    You could if you wanted to add more conditional statements in the program.


  • 39.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:39 PM
    Try this:
    ps -eaf|awk '/(WebSphere.*\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'


  • 40.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:41 PM
    [root@e48l002v ~]# ps -eaf|awk '/(WebSphere.*\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'
    678768 1.3 RNAVal0-s2
    675436 1.3 RNAVal0-s1
    1058832 2.1 -Dpecos.url=
    1173588 2.3 -Xjit:dontInline={jav
    1156056 2.3 -Xjit:dontInline={ja
    1597480 3.2 REMAS-S1
    2543612 5.1 nodeagent
    638840 1.2 ACA-ACO-s2
    657676 1.3 ACA-AC0-s1
    367016 0.7 MACBIS-S1
    354128 0.7 HATS-e48l002v-1
    427080 0.8 RNSGUI-WVE-V0_node-01
    1024008 2.0 EES-S1
    1026776 2.0 EES-S2
    571920 1.1 CPC-002V-s1
    1633176 3.3 PVMV0-002v-S1
    492784 0.9 RACS-s1
    1033184 2.0 -Djava.sec
    1072212 2.1 -Djava.sec
    988236 1.9 -Dnppes.useridurl=https://nppes7.cm
    1055836 2.1 -Djava.security.auth.l
    1017448 2.0 -Dnppes.useridurl=https://nppes7.cm
    1066708 2.1 -Dnppes.useridurl=https://nppes7.cms.cmsval/I
    195516 0.3 nodeagent
    505568 1.0 RNSGUI-V0-s1
    473640 0.9 RNSGUI-V0-s2
    9086900 18.3 -appl
    9140636 18.4 -no
    920852 1.8 ESMD-WEB-APP-s1
    951404 1.9 ESMD-WEB-APP-s2


    Still having issue.


  • 41.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:45 PM
    This is the completed output? No missing JVMs in the list?


  • 42.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:46 PM
    Yes, this is complete output.


  • 43.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:50 PM
    Try this:
    ps -eaf|awk '/(WebSphere\/EntAppServer.*\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'
    I think we look for some other unique value in the string.


  • 44.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 02:52 PM
    Looks the output is same


    [root@e48l002v ~]# ps -eaf|awk '/(WebSphere\/EntAppServer.*\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'
    678944 1.3 RNAVal0-s2
    679628 1.3 RNAVal0-s1
    1058896 2.1 -Dpecos.url=
    1173704 2.3 -Xjit:dontInline={jav
    1156056 2.3 -Xjit:dontInline={ja
    1597476 3.2 REMAS-S1
    2543616 5.1 nodeagent
    638840 1.2 ACA-ACO-s2
    657676 1.3 ACA-AC0-s1
    367024 0.7 MACBIS-S1
    354128 0.7 HATS-e48l002v-1
    427080 0.8 RNSGUI-WVE-V0_node-01
    1024020 2.0 EES-S1
    1026812 2.0 EES-S2
    571920 1.1 CPC-002V-s1
    1633192 3.3 PVMV0-002v-S1
    492784 0.9 RACS-s1
    1033388 2.0 -Djava.sec
    1072232 2.1 -Djava.sec
    988476 1.9 -Dnppes.useridurl=https://nppes7.cm
    1056088 2.1 -Djava.security.auth.l
    1017492 2.0 -Dnppes.useridurl=https://nppes7.cm
    1066748 2.1 -Dnppes.useridurl=https://nppes7.cms.cmsval/I
    195516 0.3 nodeagent
    505568 1.0 RNSGUI-V0-s1
    473632 0.9 RNSGUI-V0-s2
    9086904 18.3 -appl
    9140648 18.4 -no
    920852 1.8 ESMD-WEB-APP-s1
    951404 1.9 ESMD-WEB-APP-s2


  • 45.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:04 PM
    If you match the output of these JVMs:
    988476 1.9 -Dnppes.useridurl=https://nppes7.cm
    1056088 2.1 -Djava.security.auth.l
    1017492 2.0 -Dnppes.useridurl=https://nppes7.cm
    1066748 2.1 -Dnppes.useridurl=https://nppes7.cms.cmsval/I
    with the output you get from running:
    ps -eaf|awk '/(WebSphere\/EntAppServer.*\/java)/&&!/grep/{print $2}'|xargs -n1 ps vww
    can you show me just the last column of data (from the 'ps') for that first JVM (ends with 'https://nppes7.cm)? That's basically the arguments from WAS for that node.


  • 46.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:16 PM
    /opt/IBM/WebSphere/EntAppServer7-64/java/bin/java -server -Dwas.status.socket=57886 -Declipse.security -Dosgi.install.area=/opt/IBM/WebSphere/EntAppServer7-64 -Dosgi.configuration.area=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev70_%g,groupAccess,nonFatal -Xscmx50M -Xbootclasspath/p:/opt/IBM/WebSphere/EntAppServer7-64/java/jre/lib/ext/ibmorb.jar:/opt/IBM/WebSphere/EntAppServer7-64/java/jre/lib/ext/ibmext.jar -classpath /opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/properties:/opt/IBM/WebSphere/EntAppServer7-64/properties:/opt/IBM/WebSphere/EntAppServer7-64/lib/startup.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/bootstrap.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/jsf-nls.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/lmproxy.jar:/opt/IBM/WebSphere/EntAppServer7-64/lib/urlprotocols.jar:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/batchboot.jar:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/batch2.jar:/opt/IBM/WebSphere/EntAppServer7-64/java/lib/tools.jar -Dibm.websphere.internalClassAccessMode=allow -verbose:gc -Xms512m -Xmx1792m -Dws.ext.dirs=/opt/IBM/WebSphere/EntAppServer7-64/java/lib:/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/classes:/opt/IBM/WebSphere/EntAppServer7-64/classes:/opt/IBM/WebSphere/EntAppServer7-64/lib:/opt/IBM/WebSphere/EntAppServer7-64/installedChannels:/opt/IBM/WebSphere/EntAppServer7-64/lib/ext:/opt/IBM/WebSphere/EntAppServer7-64/web/help:/opt/IBM/WebSphere/EntAppServer7-64/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/opt/IBM/WebSphere/EntAppServer7-64/derby -Dcom.ibm.itp.location=/opt/IBM/WebSphere/EntAppServer7-64/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01 -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dwas.install.root=/opt/IBM/WebSphere/EntAppServer7-64 -Dpython.cachedir=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/temp/cachedir -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01 -Dcom.ibm.security.jgss.debug=off -Dcom.ibm.security.krb5.Krb5Debug=off -DADDRESS_VRFCTN_ENBLD=Y -DDMEPOS_ENBLD=Y -DEMAIL_SEND_ENBLD=Y -DSSN_VLDTN_ENBLD=N -Dapp.id=pecos -Dapp.ldap.suffix=ou=Users,ou=nppes -Dcomm.secure.ldap=true -Dhost.name=v3035 -Dhost.port=636 -Dldap.app.admin.dn=uid=nppesadmin,ou=enumerators,ou=nppes,dc=cms,dc=hhs,dc=gov -Dldap.app.admin.pwd=14D18B2C7F02BCF9B76D982288646D50 -Dmax.retry.count=3 -Dnppes.url=https://nppes7.cms.cmsval/NPPES/ -Dpay.gov.activityfile.dir=/opt/IBM/WebSphere/EntAppServer7-64/profiles/profile01/logs/PECOSPI-S2/activity/activity -Dpay.gov.activityfile.password=XXXX -Dpay.gov.activityfile.url=http://158.73.175.150:8787/ActivityDownload/ActivityDownload -Dpay.gov.activityfile.username=XXXX -Dpay.gov.application.name=Medicare Application Fee VAL -Dpay.gov.oci.url=https://qa.pay.gov/paygov/OCIServlet?agency_id=1568 -Dretry.wait.time=1200 -Dws.endpoint=http://e48l002v:4012/NPPESIA/services/NPPESIAService http://e48l002v:4013/NPPESIA/services/NPPESIAService http://e48l002v:4014/NPPESIA/services/NPPESIAService -Dws.endpoint.delay.time=240000 -Dnpi.verification.ws.url=http://e48l002v:4012/NPPES/services/NPIVerificationService;http://e48l002v:4013/NPPES/services/NPIVerificationService;http://e48l002v:4014/NPPES/services/NPIVerificationService -Dnpi.checkdigit.sw=Y -Dnpi.verification.sw=N -Dcts.document.ws.url=http://ecm-cts-val.cmssvc.local/cts/CTSWebService -Dcts.document.ws.authBlock=AnwgMgIBAACppKcNd2_a1t4oqa_OqIryxwlDgfme49kLEbcUKLhqmpuufDsQ9svvHYXb6m3KJPGv7GC0R4ic-2dn_YL3112dRUAUC4kWuCIQFIVUmThdlw -Dcts.document.sw=true -DJNDI_NPPES_IA_WS_ENDPOINT=jms:jndi:jms/datawas_nppes_auth_request?jndiConnectionFactoryName=jms/PecosConnectionFactory&targetService=NPPESIAService&replyToName=jms/appwas_nppes_auth_reply&messageType=TEXT -Dnppes.useridurl=https://nppes7.cm


  • 47.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:26 PM
    Okay...

    The "ps" command is working as expected now. The problem I see if that for the above example, the very last string was the URL; we are expecting the WAS node name.

    So my question to you is: should we ignore the JVMs that do not report their node names, or I could write a skeleton branching statement that you can replicate to add your own application names for those not picked up by the command.

    I'm sorry this has taken so long and so many iterations. I needed to be sure we're getting the same output results so I can run tests from my RHEL server.


  • 48.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:34 PM
    Thank You for your help on my issue. My answer is that we cannot just ignore the jvms that do not report their node names correctly. For example -Dnppes.useridurl=https://nppes7.cm, this is one of our important applications that is required for CPU Memory info. So could you plz write a skeleton branching statement plz?
    ,

    [root@e48l002v ~]# ps -eaf|awk '/(WebSphere)/&&!/grep/{print $2}'|xargs -n1 ps vww|awk 'NF>5&&!/PID/{printf "%s\t%s\t%s\n",$8,$9,$NF;t+=$7;c+=$11}'
    678672 1.3 RNAVal0-s2
    673360 1.3 RNAVal0-s1
    1058816 2.1 -Dpecos.url=
    1173432 2.3 -Xjit:dontInline={jav
    1156016 2.3 -Xjit:dontInline={ja
    1597480 3.2 REMAS-S1
    2543512 5.1 nodeagent
    638844 1.2 ACA-ACO-s2
    657676 1.3 ACA-AC0-s1
    366996 0.7 MACBIS-S1
    354104 0.7 HATS-e48l002v-1
    427064 0.8 RNSGUI-WVE-V0_node-01
    1024004 2.0 EES-S1
    1026724 2.0 EES-S2
    571904 1.1 CPC-002V-s1
    1633160 3.3 PVMV0-002v-S1
    492780 0.9 RACS-s1
    1023308 2.0 -Djava.sec
    1026428 2.0 -Djava.sec
    986312 1.9 -Dnppes.useridurl=https://nppes7.cm
    1036648 2.0 -Djava.security.auth.l
    1014616 2.0 -Dnppes.useridurl=https://nppes7.cm
    1028416 2.0 -Dnppes.useridurl=https://nppes7.cms.cmsval/I
    195516 0.3 nodeagent
    505568 1.0 RNSGUI-V0-s1
    473476 0.9 RNSGUI-V0-s2
    9086888 18.3 -appl
    9140624 18.4 -no
    920792 1.8 ESMD-WEB-APP-s1
    951416 1.9 ESMD-WEB-APP-s2


  • 49.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:39 PM
    Actually if it's possible that you adjust your script so that I can pick whatever processes I am interested in to show? For example this two processes are not important ACA-ACO-s1 and ACA-ACO-s2 even though the process names are correct. On the other hand, the other one we were working, that process is quite important for us to monitor.

    678672 1.3 RNAVal0-s2
    673360 1.3 RNAVal0-s1
    1058816 2.1 -Dpecos.url=
    1173432 2.3 -Xjit:dontInline={jav
    1156016 2.3 -Xjit:dontInline={ja
    1597480 3.2 REMAS-S1
    2543512 5.1 nodeagent
    638844 1.2 ACA-ACO-s2
    657676 1.3 ACA-AC0-s1
    366996 0.7 MACBIS-S1
    354104 0.7 HATS-e48l002v-1
    427064 0.8 RNSGUI-WVE-V0_node-01
    1024004 2.0 EES-S1
    1026724 2.0 EES-S2
    571904 1.1 CPC-002V-s1
    1633160 3.3 PVMV0-002v-S1
    492780 0.9 RACS-s1
    1023308 2.0 -Djava.sec
    1026428 2.0 -Djava.sec


  • 50.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:49 PM
    I'm capturing them all when I run the "ps" command, then iterating through the array. You can very easily skip JVMs inside the "foreach" loop.


  • 51.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 03:54 PM
    OK.. Could you write a skeleton branching statement that we can replicate to add our own application names for those not picked up by the command then as you mentioned previously?


  • 52.  RE: EPAgeng script for Zlinux

    Posted 08-13-2013 04:14 PM
    I will try to do that.

    I see from the last example that have a property called "-Dpay.gov.application.name=". Is there a common property for these applications that do not show their WAS application names?


  • 53.  RE: EPAgeng script for Zlinux
    Best Answer

    Posted 08-13-2013 05:11 PM
      |   view attached
    Let's make sure we can grab the application nodes that report properly.

    Run the program and post the results.

    Afterwards, we'll work on getting some names attached to the remaining application nodes.

    UPDATE: I found a typo in the code; I've attached the latest version for you to try.

    Attachment(s)

    zip
    psWASforLinux.zip   971B 1 version


  • 54.  RE: EPAgeng script for Zlinux

    Posted 08-14-2013 10:52 AM
      |   view attached
    Davis,
    The new script is working properly. A snapshot is attached. Thank you very much for your help~!!!!!


  • 55.  RE: EPAgeng script for Zlinux

    Posted 08-14-2013 12:55 PM
    I'm glad the first part of the process has worked out.

    We still need to figure out what to do about the remaining nodes that are not reporting their application names.
    The program is ignoring any row in the array that's starts with "-D" or "-X". I also see from the screenshot that there are some application names starting with "-[a-z]".

    I began to wonder if this is due to a string length limitation. I remember seeing this before and don't quite remember what the workaround was.

    Did you see my previous post to you about trying to figure out if there's a common property that we could key on to use as the application name?


  • 56.  RE: EPAgeng script for Zlinux

    Posted 08-14-2013 01:00 PM
    Yes. But seems that's not a common property. I am not sure about that.


  • 57.  RE: EPAgeng script for Zlinux

    Posted 08-14-2013 01:19 PM
    How would you like to handle these "unknowns"?

    We can't use PIDs because it changes upon startup/restart.

    We need to find a system property in that "ps" output to latch onto like that application name from your sample.


  • 58.  RE: EPAgeng script for Zlinux

    Posted 08-14-2013 01:34 PM
    For our case, I think the easiest way is to standardise the JVMs' argument of those "unknowns" since the regex in your script works for most of our applications. But issue is that I am not the one who is able to adjust this arguments. I need other team's help, which I know will take time... I am not sure how they define the arguments... Like the example 986312 1.9 -Dnppes.useridurl=https://nppes7.cm, it's one of our key application that needs to be monitored, but I didn't find the key pattern like "nppes-S1" in the whole process name... It might because of the string length limitation.


  • 59.  RE: EPAgeng script for Zlinux