Using the Command Line Workstation (CLW), how can I collect information for more than one set of metrics at a time?
search cancel

Using the Command Line Workstation (CLW), how can I collect information for more than one set of metrics at a time?

book

Article ID: 19760

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

Description:

How to extract more that one set of metrics using the Command Line Workstation (CLW) in a single command (e.g. collect metrics for a particular agent where the metric name is either metric1 or metric2). There does not appear to be a description or example of the OR operator in the documentation.

Solution:

The Command Line Workstation (CLW) syntax uses Perl regex (regular expressions) that accept the '|' (pipe) as an alternate operator. It is therefore possible to construct a command using this operator.

To collect the "GC Heap:Bytes In Use" and "GC Heap:Bytes Total"

For execution in a Linux/Unix environment the format is:

$ java -Xmx128M -Duser=admin -Dhost=localhost -Dport=5001 -jar CLWorkstation.jar "get historical data from agents matching \".*WebLogic.*\" and metrics matching \"GC Heap:Bytes In Use|GC Heap:Bytes Total\" for past 1 minutes with frequency of 60 seconds"

Result:

SuperDomain/DomainA,HOST,WebLogic,WebLogic Agent,GC Heap,Bytes In Use,GC Heap Bytes In Use,60,Tue Sep 10 13:34:37 EDT 2013,Tue Sep 10 13:33:30 EDT 2013,Tue Sep 10 13:34:30 EDT 2013,24,Long,429706504,428133664,429706504,,,,,
SuperDomain/DomainA,HOST,WebLogic,WebLogic Agent,GC Heap,Bytes Total,GC Heap Bytes Total,60,Tue Sep 10 13:34:37 EDT 2013,Tue Sep 10
13:33:30 EDT 2013,Tue Sep 10 13:34:30 EDT 2013,24,Long,536870912,536870912,536870912,,,,,

and for execution in a Windows environment:

C:\Introscope9.1.1.1\lib>..\jre\bin\java -Xmx128M -Duser=admin -Dhost=localhost -Dport=5003 -jar CLWorkstation.jar "get historical data
from agents matching (.*916.*) and metrics matching (GC Heap:Bytes In Use)|(GC Heap:Bytes Total) for past 1 minutes with frequency of 30 seconds"

Result:

SuperDomain/my 2nd domain,HOST,WebSphere916,WebSphere Agent,GC Heap,Bytes In Use,GC Heap Bytes In Use,30,Mon Sep 16 05:15:04 EDT 2013,Mon Sep 16 05:14:00 EDT 2013,Mon Sep 16 05:14:30 EDT 2013,12,Long,83049120,82232040,83049120,,,,,
SuperDomain/my 2nd domain,HOST,WebSphere916,WebSphere Agent,GC Heap,Bytes Total,GC Heap Bytes Total,30,Mon Sep 16 05:15:04 EDT 2013,Mon
Sep 16 05:14:00 EDT 2013,Mon Sep 16 05:14:30 EDT 2013,12,Long,100981760,100981760,100981760,,,,,
SuperDomain/my 2nd domain,HOST,WebSphere916,WebSphere Agent,GC Heap,Bytes In Use,GC Heap Bytes In Use,30,Mon Sep 16 05:15:04 EDT 2013,Mon
Sep 16 05:14:30 EDT 2013,Mon Sep 16 05:15:00 EDT 2013,12,Long,84151152,83126320,84151152,,,,,
SuperDomain/my 2nd domain,HOST,WebSphere916,WebSphere Agent,GC Heap,Bytes Total,GC Heap Bytes Total,30,Mon Sep 16 05:15:04 EDT 2013,Mon
Sep 16 05:14:30 EDT 2013,Mon Sep 16 05:15:00 EDT 2013,12,Long,100981760,100981760,100981760,,,,,

Environment

Release:
Component: APMISP