How to define a command that will run in a remote shell

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to define a command that will run in a remote shell

Gerhard Lazu
When connecting to a remote node via remsh, is it possible to specify a command that will run on the remote node as soon as the shell is active?

Both -run and -eval erl flags are executed in the context of the current node, I am looking for something like -remrun or -remeval, that would execute in the context of the remote shell.

The end-goal is to have a single CLI command, e.g. observe, which enables a user to select any Erlang node that is part of a cluster, and observer_cli:start() [1]. will be invoked on remote shell invocation.

Thank you, Gerhard.

[1] https://github.com/zhongwencool/observer_cli

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: How to define a command that will run in a remote shell

Dmitry Klionsky-2

Entop implemented a separate script for it.

https://github.com/mazenharake/entop/blob/master/entop


On 02/05/2018 11:36 AM, Gerhard Lazu wrote:
When connecting to a remote node via remsh, is it possible to specify a command that will run on the remote node as soon as the shell is active?

Both -run and -eval erl flags are executed in the context of the current node, I am looking for something like -remrun or -remeval, that would execute in the context of the remote shell.

The end-goal is to have a single CLI command, e.g. observe, which enables a user to select any Erlang node that is part of a cluster, and observer_cli:start() [1]. will be invoked on remote shell invocation.

Thank you, Gerhard.

[1] https://github.com/zhongwencool/observer_cli


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

-- 
BR,
Dmitry

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions