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.
To run a yarprun server on a machine:
$ yarprun --server /SERVERPORT
The basic command to run a command/application on a remote machine is:
$ yarprun --on /SERVERPORT --as TAG --cmd COMMAND [ARGLIST]
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.
If "--stdio" is specified, there are two useful sub-options (linux only):
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