pw cmdfile
The pw cmdfile command can be used on the Integration Service and the BMC TrueSight Infrastructure Management Server.
pw cmdfile filename can be used to run a batch of pw commands.
To speed up the execution of large numbers of commands, run the command with pw cmdfile filename. The script must contain the pw commands exactly as you would type them directly at the shell prompt.
Speed will be improved by running the following pw commands with the pw cmdfile versus comparing the command in the shell script.
- pw device
- pw template
- pw threshold
- pw baseline
- pw event
- pw group
Example:
pw device add device1 -ttemplate
pw device add device2 -ttemplate
pw device add device3 -ttemplate
pw device add device4 -ttemplate
pw device add device5 -ttemplate
Then, run the cmdfile command by using pw cmdfile filename.
The commands will be executed in order, one by one.
At the end, this command also prints the total time taken to run all commands.
Comments can be added by prefixing the line with the symbol '#'.