Command File

Besides submitting commands directly within the command line, you can also submit a command file in XML format. Specify the commands by using the following syntax.
Perfexp.exe /COMMANDFILE:<CmdFile>

The command file is designated for batch operation.

The structure of the XML file to use as a command file consists of a root node called PerfExpCommandFile and two optional sub-nodes called OverviewReport and Command.

PerfExpCommandFile

Possible specifications in the root node PerfExpCommandFile include the following examples:
  • NoGui="True" / NoGui="False"

    Specifies whether Performance Explorer launches visibly or invisibly.

  • LogFile="<filename>"

    Specifies the name and location of the log file.

Different Command and OverviewReport nodes can reside below the root node.

OverviewReport

The OverviewReport node specifies which .tsd file Performance Explorer uses. The following attributes are available:
  • File

    Specifies which .tsd file to use. If omitted, the last file loaded by Performance Explorer is used.

  • Export
    Specifies the output file to which the overview report is saved. Available formats include the following options:
    • HTML (.htm)
    • WebArchive (.mht)
  • Template

    Specifies an optional template OVT file to use for the overview report.

Command

The text of a Command node is interpreted as a command line parameter. Nodes are executed sequentially.

The following code shows an XML command file:

<?xml version="1.0" encoding="UTF-8" ?>
<PerfExpCommandFile NoGui="True"
      LogFile="c:\TEMP\Results\PerfExp.log">
 <OverviewReport
      File="c:\TEMP\Results\m@host@Simple.tsd"
      Export="c:\TEMP\Results\Simple.mht"
  />
   <Command>PEW:"c:\test.pew"</Command>
   <Command>SINGLEINSTANCE</Command>
   <Command>ACTION:STARTALLMONITORS</Command>  
   <Command>EXIT</Command>
</PerfExpCommandFile>

Help command

Use the help command /? with the following syntax.
Perfexp.exe /?

Performance Explorer opens and displays the command line help.