Yet Another Robot Platform
yarprun: run programs on a set of machines

The command-line utility "yarprun" provides a client-server environment that is able to run, kill and monitor applications commands on a remote machine, with the same syntax and behaviour in Windows and Linux.

Typical YARP applications consist of several intercommunicating modules distributed on different machines. If a yarprun server is running on each machine, distributed applications can be remotely launched, monitored and terminated by yarprun commands.

yarprun is also an API library that supplies access to yarprun services. See yarp::run::Run class for documentation.

Running a server

To run a yarprun server on a machine:

$ yarprun --server /SERVERPORT
  • /SERVERPORT must be unique and identifies the remote machine.

Running an application

The basic command to run a command/application on a remote machine is:

$ yarprun --on /SERVERPORT --as TAG --cmd COMMAND [ARGLIST]
  • /SERVERPORT is the name of the server that actually runs the command
  • TAG identifies the application process set, and must be unique
  • COMMAND is the application that has to be executed, followed by the optional argument list

Some options can be added to the basic format of yarprun:

$ yarprun --on /SERVERPORT1 --as TAG --cmd COMMAND [ARGLIST] --stdio /SERVERPORT2

opens a remote shell window where the stdin, stdout and stderr of the application will be redirected.

  • /SERVERPORT2 specifies the machine where the IO shell will be executed, and can be either a remote machine or be equal to /SERVERPORT1 itself.

If "--stdio" is specified, there are two useful sub-options (linux only):

  • –hold keep the stdio window open even if the command is terminated or aborted.
  • –geometry WxH+X+Y set the stdio window size and position. Example: –geometry 320x240+80+20

Other commands

To terminate an application, the yarprun syntax is:

$ yarprun --on /SERVERPORT --sigterm TAG

To send a signal to an application (usually SIGKILL) use:

$ yarprun --on /SERVERPORT --kill TAG SIGNUM

To terminate all the applications managed by a yarprun server, use:

$ yarprun --on /SERVERPORT --sigtermall

To check if an application is still running on a yarprun server, use:

$ yarprun --on /SERVERPORT --isrunning TAG

To get a report of applications running on a yarprun server, use:

$ yarprun --on /SERVERPORT --ps

To shutdown a yarprun server, use:

$ yarprun --on /SERVERPORT --exit