Troubleshoot > HP Service Manager Doctor > Appendix A: CmdOnDemand.xml

CmdOnDemand.xml

A typical CmdOnDemand.xml file resembles the following codes:

<?xml version="1.0" encoding="UTF-8"?>
<commands>
<command name="sm" description="sm server commands" provider="hp">
    <param name="-reportstatus" description="SM runtime status"/>
    <param name="-reportcache" description="SM cache status"/>
    <param name="-reportipc" description="SM semaphore use"/>
    <param name="-reportlocks" description="SM lock information"/>
    <param name="-reportlic" description="SM licence information"/>
    <param name="-version" description="SM version"/>
    <param name="-verifylic" description="SM verify license"/>
    <param name="-appversion" description="SM application version"/>
    <param name="-reportshm" description="SM shared memory"/>
    <param name="-reportsem" description="SM semaphore"/>
    <param name="-sqlverifyconnection" description="SM verify DB connection"/>
</command>
<!-- 
Any command or script should be under RUN directory to be run with SM doctor; 
more entries could be added like below.
<command name="supportTool.sh" description="Integration with existing support 
tool to trace system information" />
-->
</commands>

To add a new command to the CmdOnDemand.xml file, follow these steps:

  1. Open the CmdOnDemand.xml file in a text editor.
  2. Add more entries similar to <param name="-version" description="SM version"/>.
  3. Add the required Service Manager command parameters in the "name" attribute.
  4. Add the command description in the "description" attribute, which will be used for HTML/TEXT report generation.

    Note To run external commands, make sure that the target scripts or executables reside in the RUN directory. Do not add "param" elements for additional command arguments. Instead, include command arguments in the "name" attribute of the "command" element.

    We do not recommend that you run external commands that work with background processes or I/O streams, such as uname -a & and ls -lrt > 1.txt.