next up previous
Next: List (-l) Up: PICA commands and options Previous: Install (-i)

Execute (-x)

This command will execute the given list of commands in each of the given hosts. If PICA finds an object with the given name, it will read its path attribute and use it for remote execution. This way we don't have to remember the location of the script. If it doesn't find an object with that name, PICA assumes it's a Unix command and tries to run it.

For example, the command

pica -xv +F DNSChkUrgent +H servers

will execute /var/lib/pica/alarms/Urgent/DNSChkUrgent in all servers, since the object DNSChkUrgent exists and PICA can build the remote path using the object's attributes.

On the other hand, the command

pica -xv +F "ndc reload" +H dnsservers

will run the command ``ndc reload'' in each member of the dnsservers group. Since PICA can't find an object named ndc, it assumes it's a Unix command and tries to execute.

Esteban Manchado Velázquez 2002-12-13