16.10 - Advanced Usage - Teradata Ecosystem Manager

Teradata Ecosystem Manager API Reference

prodname
Teradata Ecosystem Manager
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-3204-067K

Use of Wildcard Characters

This advanced usage example supports searches that use wildcard characters (*) in the process search criteria value for process search criteria commandLineArg. A wildcard-based search can be used to identify and report multiple processes that use the same process command line arguments.

Action ps -ef Command Output XML Entries
Include multiple processes by using a wildcard character in the command argument. In this example, the search looks for all processes that fulfill the following: (1) one of the command line arguments begins with databaseProd, and (2) the other command line argument equals tbl. 1) /bin/sh ./mover.sh databaseProdA tbl 5000

2) /bin/sh ./mover.sh databaseProdB tbl 7000

3) /bin/sh ./mover.sh databaseDA1 tbl 7000

This example monitors process 1 and 2 (listed in the previous column):

<metric resourceType=PING[sh] displayName=”moverScripts >

<arg>commandlinearg</arg>

<arg>./mover.sh databaseProd* tbl</arg>

</metric>

Include multiple processes by using a wildcard character in the command argument. In this example, the search looks for all processes that fulfill the following: (1) one of the command line arguments equals databaseProd, and (2) the other argument ends with Wario. 1) /bin/sh ./load.sh databaseProd Table1Wario 5000

2) /bin/sh ./load.sh databaseProd Table2Wario 7000

3) /bin/sh ./load.sh databaseProd Table3Sonic 7000

This example monitors process 1 and 2 (listed in the previous column):

<metric resourceType=PING[sh] displayName=”moverScripts”>

<arg>commandlinearg</arg>

<arg>./load.sh databaseProd *Wario</arg>

</metric>

Java Process Monitoring without Fully Qualified Classname

Certain Java processes are initiated without specifying the fully qualified class name as part of the startup parameter. Such processes can be monitored by specifying the process search criteria as commandLineArg.

The following table includes example code that shows how to use the commandLineArg argument. Also see the Process Search Criteria table for more information about this value.

Action ps -ef Command Output XML Entries
Initiate a Java process without specifying the fully qualified classname. /usr/bin/java –Dproc.base=/var/opt/app/base –Xmx512M –Dlog4j.configuration=proc.properties –jar procApp.jar <metric resourceType=PING[java] displayName=”procApp”>

<arg>commandlinearg</arg>

<arg>–Dproc.base=/var/opt/app/base –Xmx512M –Dlog4j.configuration=proc.properties –jar procApp.jar </arg>

</metric>

processInfo Option in Emmonitor Script

Display the process name executable and process arguments with an option available using the emmonitor script. Get additional information about the process search criteria value. This option requires the input of one or more PIDs. The emmonitorconfig.xml file can be updated later with the result obtained after executing emmonitor with the processInfo option.

This option does not enable process metrics monitoring, but helps you find the process search criteria value (assuming that the PID of the process to be monitored is known in advance).

In the following Linux example, the process PID is 23416.

sdll0392:~ # /etc/init.d/tmsmmonitor processInfo 23416
-----Initiaiting process info finder-----
Process name executable for PID(23416): /usr/java/jre1.6.0_21/bin/java
Process Arg: /usr/java/jre1.6.0_21/bin/java
Process Arg: -Dservice_name=sampler
Process Arg: 
-Djava.util.logging.config.file=/opt/teradata/client/sample/conf/sampler.properties
Process Arg: -classpath
Process Arg: /opt/teradata/client/sample/lib/sampler.jar
Process Arg: com.teradata.sample.ApplicationTester