You can use the command "ps-ef | grep" to locate daemons.
This feature cannot report metrics for a daemon if the native OS does not permit querying process metrics, for example, due to security policies.
Searching for Daemons with Known Paths
ps-ef Command Output | Executable Name | Search Pattern | Search Pattern Value |
---|---|---|---|
/opt/sampleApp/sampleExe arg1 arg2 arg3 | sampleExe | FullPathToProcExec | /opt/sampleApp/sampleExe |
Searching for Daemons using Process Command Line Arguments
ps-ef Command Output | Executable Name | Search Pattern | Search Pattern Value |
---|---|---|---|
/bin/sh./sample.sh message 1000 localhost sampleLog1.log | sh | CommandLineArg | ./sample.sh message 1000 localhost sampleLog1.log |
You can also use wild card characters to search for daemons. For example, to search for all daemons where the command line arguments begin with databaseProd and the other command line arguments equals tbl, the field entries are:
ps-ef Command Output | Executable Name | Search Pattern | Search Pattern Value |
---|---|---|---|
/bin/sh./mover.sh databaseProdA tbl 5000 /bin/sh./mover.sh databaseProdA tbl 7000 /bin/sh./mover.sh databaseDA1 tbl 7000 |
sh | CommandLineArg | ./mover.sh databaseProd*tbl |
The results of this example are the first two daemons match the search pattern value, so they are monitored.
In another example, to search for all daemons where one of the command line arguments equals databaseProd and ends with Wario, the field entries are:
ps-ef Command Output | Executable Name | Search Pattern | Search Pattern Value |
---|---|---|---|
/bin/sh./load.sh databaseProd Table1Wario 5000 /bin/sh./load.sh databaseProd Table2Wario 7000 bin/sh./load.sh databaseProd Table3Sonic 7000 |
sh | CommandLineArg | ./load.sh databaseProd*Wario |
The results of this example are the first two daemons match the search pattern value, so they are monitored.
Searching for Java-Based Daemons
If a java-based daemon is initiated by a fully qualified classname, the field entries are:
ps-ef Command Output | Executable Name | Search Pattern | Search Pattern Value |
---|---|---|---|
/usr/bin/java -classpath /opt/sampleApp/sampleApp.jar com.sampleCom.samplePackage.sampleJavaApp | java | JavaFullClassName | com.sampleCom.samplePackage.sampleJavaApp |
If the Java-based daemon is initiated without specifying the full class name as part of the start parameter, you can search for the daemon using command line arguments. Use the output of the ps-ef command as follows:
ps-ef Command Output | Executable Name | Search Pattern | Search Pattern Value |
---|---|---|---|
/usr/bin/java - D.proc.base=var/opt/app/base - Xmx512M - Dlog4j.configuration=proc.properties - jar procApp.jar | java | CommandLineArg | -D.proc.base=var/opt/app/base - Xmx512M - Dlog4j.configuration=proc.properties - jar procApp.jar |