DX Application Performance Management

Expand all | Collapse all

CLW Syntax

Jump to Best Answer
  • 1.  CLW Syntax

    Posted 04-13-2011 11:31 AM
    hello list,
    i am trying to work on the CLW Script to get some very basic information and post it on the intranet like Agent status; etc;

    tried the following but got an unexpected result

    [font=Courier New]./../jre/bin/java -Duser=Admin -Dpassword=****** -Dhost=localhost -Dport=0000 -jar ../lib/CLWorkstation.jar "get status for agents matching (.*)"

    [color=#EE0F0F]Writing Dynamic Instrumentation Data to .//DynamicInstrumentationData-20110413111717.xml
    [color][font]

    tried the following and got same response:

    [font=Courier New]./../jre/bin/java -Duser=Admin -Dpassword=****** -Dhost=localhost -Dport=0000 -jar ../lib/CLWorkstation.jar get status for agents matching \(.*\)

    [color=#EE0F0F]Writing Dynamic Instrumentation Data to .//DynamicInstrumentationData-20110413111717.xml
    [color][font]

    tried this and got Syntax error:

    [font=Courier New]./../jre/bin/java -Duser=Admin -Dpassword=****** -Dhost=localhost -Dport=0000 -jar ../lib/CLWorkstation.jar get status for agents matching (.*)
    [color=#EE0F0F]-bash: syntax error near unexpected token `('[color]
    [font]

    tried this as well ( just to be clear, running this command on Mom)

    [font=Courier New]./../jre/bin/java -Duser=Admin -Dpassword=****** -Dhost=localhost -Dport=0000 -jar ../lib/CLWorkstation.jar get status for agents matching "Custom Metric Host \(Virtual\)\|Custom Metric Process \(Virtual\)\|(.*)"

    [color=#EE0F0F]Writing Dynamic Instrumentation Data to ./DynamicInstrumentationData-20110413114641.xml('[color]
    [font]
    i am sure i am doing something wrong... could anyone please point to the error here...


    regards
    ashish


  • 2.  RE: CLW Syntax

    Posted 04-13-2011 12:06 PM
    [list]
    [*]Use -Dkeyfile=/config/internal/server/EM.public in place of using -Duser & -Dpassword.
    if you're running from your workstation, create the directory and get a copy of the public key from your MOM or standalone EM.
    [*]Make sure you use max heap value so you don't get a OOM exception
    [*]I don't remember a "status" query. You can, however, query for the metric ConnectionStatus.
    [list]


  • 3.  RE: CLW Syntax

    Posted 04-13-2011 12:32 PM
    these queries are being performed on MoM: @ version 9.0.6:

    [font=Courier New]./../jre/bin/java -Duser=Admin -Dpassword= -Dhost=localhost -Dport=5001 -jar ../lib/CLWorkstation.jar help | grep get

    get historical events matching [REGULAR EXPRESSION]
    get historical event summaries matching [REGULAR EXPRESSION]
    get historical data from agents matching [REGULAR EXPRESSION] and metrics matching [REGULAR EXPRESSION] between [EXACT MATCH] and [EXACT MATCH] with frequency of [EXACT MATCH] (second|seconds|sec|secs|s)
    get historical data from agents matching [REGULAR EXPRESSION] and metrics matching [REGULAR EXPRESSION] between [EXACT MATCH] and [EXACT MATCH]
    get historical data from agents matching [REGULAR EXPRESSION] and metrics matching [REGULAR EXPRESSION] for past [EXACT MATCH] (minute|minutes) with frequency of [EXACT MATCH] (second|seconds|sec|secs|s)
    get historical data from agents matching [REGULAR EXPRESSION] and metrics matching [REGULAR EXPRESSION] for past [EXACT MATCH] (minute|minutes)
    [color=#1732E3][size=5]get status for agents matching [REGULAR EXPRESSION][size][color]
    get packages in agents matching [REGULAR EXPRESSION]
    get classes in agents matching [REGULAR EXPRESSION] for package [EXACT MATCH]
    get methods in agents matching [REGULAR EXPRESSION] for class [EXACT MATCH]
    get instrumentation info for agents matching [REGULAR EXPRESSION] for method [EXACT MATCH] in class [EXACT MATCH]
    get groups for agents matching [REGULAR EXPRESSION]
    get method calls in agents matching [REGULAR EXPRESSION] for method [EXACT MATCH] in class [EXACT MATCH]
    get available tracer for agents matching [REGULAR EXPRESSION] for method [EXACT MATCH] in class [EXACT MATCH]
    get labels for agents matching [REGULAR EXPRESSION]
    get label instrumentation info for agents matching [REGULAR EXPRESSION] and label [EXACT MATCH][font]

    i did however got results for the following query

    [font=Courier New] ./../jre/bin/java -Duser=Admin -Dpassword= -Dhost=localhost -Dport=5001 -jar ../lib/CLWorkstation.jar "list agents matching (.*)"

    Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual) (em2)
    Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Business Application Agent (Virtual) (em1)
    Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Business Application Agent (Virtual) (em2)
    Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Business Application Agent (Virtual)
    XXXXXXXX01|Tomcat|XXXXXXXX01
    YYYYYYYYY01|WebLogic|YYYYYYYYY01
    YYYYYYYYY02|WebLogic|YYYYYYYYY02
    Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)
    Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual) (em1)[font]


  • 4.  RE: CLW Syntax
    Best Answer

    Posted 04-13-2011 08:04 PM
    Learn something new everyday! :lol:

    I successfully queried my MOM using the following on AIX:

    >
    java -Xmx128M -Dhost=localhost -Dport=5001 -Dkeyfile=../config/internal/server/EM.public -jar CLWorkstation.jar get status for agents matching \(.*\)


    The output is an XML file which has the agent name and status value.

    -Hiko


  • 5.  RE: CLW Syntax

    Posted 04-14-2011 08:48 AM
    [size=4]does the response looks like this:

    [font=Courier New]
    <map>
    <entry>
    <string>Server1|Tomcat|ProcessName</string>
    <com.wily.introscope.spec.agent.beans.dynamicinstrumentation.DynamicInstrumentationResult>
    <status>0</status>
    <isActive>true</isActive>
    </com.wily.introscope.spec.agent.beans.dynamicinstrumentation.DynamicInstrumentationResult>
    </entry>
    [font]


    Here's the exat command that i ran: because i am running this command from the MoM i dont beleive i need to include the keyfile... we are using EEM for all authentication/Authorizations... so would have gotten an error if there was any issues with Auth token

    [font=Courier New]
    ./../jre/bin/java -Xms64m -Xmx512m -Duser=Admin -Dpassword=XXXXXXX-Dhost=localhost -Dport=5001 -jar ./../lib/CLWorkstation.jar get status for agents matching \(.*\)
    Writing Dynamic Instrumentation Data to DynamicInstrumentationData-20110414084132.xml
    [font]


    because this is what i am getting... seems like there is something wrong in my environment!!!! SR time?


    [size]



    hdavis wrote:

    Learn something new everyday! :lol:

    I successfully queried my MOM using the following on AIX:

    >
    java -Xmx128M -Dhost=localhost -Dport=5001 -Dkeyfile=../config/internal/server/EM.public -jar CLWorkstation.jar get status for agents matching \(.*\)
    The output is an XML file which has the agent name and status value.

    -Hiko


  • 6.  RE: CLW Syntax

    Posted 04-14-2011 11:13 AM
    Yes, that's the result output.

    As to the using CLW: you connect directly with the MOM/EM when use a local account. Just look at your users.xml. Because you're wanting to use a local user account it's best NOT to use the password as it's being set cleartext over your network. In most places I've been, you'd be violating security standards. This is why CA created the use of the keyfile for CLW.

    -Hiko


  • 7.  RE: CLW Syntax

    Posted 04-20-2011 12:14 PM
    One more follow-up item:

    You can redirect the output. Add the following to your command:

    >
    -Dintroscope.clw.tt.console=true


    This will allow you to send the output the stdout and redirect it anywhere you like.


  • 8.  RE: CLW Syntax

    Posted 04-21-2011 11:30 AM
    Just to wrap things up...
    I'm sure those of you who were looking at this thread were wondering what those status codes mean.
    Here's the response I got from support:

    >
    This is the command not intended for the general users but for the support
    purpose to troubleshoot the new dynamic instrumentation function in APM 9.
    It will return the XML entries for each agent.
    <entry>
    <string>AGENT_NAME</string>

    <com.wily.introscope.spec.agent.beans.dynamicinstrumentation.DynamicInstrume
    ntationResult>
    <status>DI_STATU_CODE</status>

    </com.wily.introscope.spec.agent.beans.dynamicinstrumentation.DynamicInstrum
    entationResult>
    </entry>

    * kNormalStatus = 0;
    * kGenericErrorStatus = 100;
    * kConnectionExceptionErrorStatus = 101;
    * kDatabaseNotAvailableErrorStatus = 102;
    * kDatabaseSQLExceptionStatus = 103;
    * kUnableToRedefineClassStatus = 104 (this is when a class exists but
    cannot be redefined for whatever reason)
    * kOperationNotAvailable = 105;
    * kServiceNotAvailable = 106 (The agent remove dynamic
    configurationservice is not available)
    * kClassNotFound = 107 (this is when a class does not exist)
    * kInvalidName = 108 (Any string passed is not valid)
    * kAgentNotConnected = 109. This code means actually "The agent dynamic
    Instrumentation proxy service is not registered with the em". Ic could
    happen because the agent is disconencted, does not support remote dynamic
    instrumentation or is a virtual agent
    * kDynamicInstrNotActive = 110 (DI is available but not active)
    * kServiceAvailable = 111 (The DI is available)
    * kServiceDisabled = 112 (The DI service is disabled)
    * kInvalidDynamicInstrumentation = 113 (The DI directive proposed is
    invalid)
    * kInvalidArgument = 114 (an argument passed is invalid, e.g. the
    duration of a temporary transaction is set to be negative, or an API for a
    single agent identified more than one agent)
    * kAgentBusy = 115 The agent is busy and cannot satisfy the request
    * kNotAuthorized = 116 The user is not authorized to execute dynamic
    instrumentation commands