You can run the spot command from either the directory where it is installed, or by adding the installation directory (by default, /opt/SUNWspro/extra/bin) to your system’s $PATH environmental variable.
There are two ways you can run the spot command:
spot can be given a command and arguments and will then gather data by executing that command multiple times
spot can attach to an existing process and generate a report on that process.
The two command lines are:
To run the application multiple times and produce the report:
$ spot application parameters |
Where application is the name of the application being investigated and parameters is the application arguments.
To attach to a running process and produce the report for that process.
$ spot -P pid |
Where pid is the process ID number of the running application.
There are a number of command-line options:
The flag -X requests extended statistics. The SPOT report will include system wide bandwidth consumption data and system wide trap statistics (if the user has the root permission necessary to gather the information). It is recommended that a dedicated system is used when gathering this data. The report will also profile the application on the top four processor events, indicating where these events happen in the application.
The flag -d specifies a directory where the SPOT report should be placed. By default the spot report is placed in the current directory.
The flag -o specifies the name that should be used for the sub-directory containing the SPOT report. By default the directory is called spot_run followed by a unique number. The -o and -d flags work together to specify the location and name of the subdirectory that contains the SPOT report.
The flag -T is appropriate only when spot is attaching to a process. In this case it specifies how long each tool should attach to the process. The default duration is 60 seconds of sampling for each set of results.
The flag -h will print help information listing all the flags.
Each of the tools called by spot can be invoked stand-alone. If invoked stand-alone, the data collected by these tools will not be in HTML format.