Skip to content

Add -t bash -ci '<alias on ssh destination server to run>' to examples in docs #132

@beevabeeva

Description

@beevabeeva

Hi @greymd,

Firstly, thank you for this amazing piece of kit.
I've made a tool built on xpanes that really helped my research: htop cluster.

I've found myself building another tool using xpanes. This time, I needed to run an alias command on each of the servers in the cluster which I ssh into on xpanes. Similar to the tool mentioned earlier, just with an alias instead of htop.

I eventually figured out how this needs to be done from following the instructions here.

The following is a snippet from my Python script:

# Make ha partition hosts (mscluster1...mscluster10) procedurely:
ha = ""
for i in range(0,10):
    ha+= 'mscluster'+str(i+1)+" "


run2 = xpanes + " -C 2 -t -c \"ssh abank@{} -t bash -ci 'atm-run'\" " + ha
system(run2)

The -t bash -ci 'atm-run' allows me to execute my alias (atm-run) in each of the panes, corresponding to each node in the cluster.

I know there shouldn't be instructions for ssh options in these docs, but it seems to me like it would be beneficial to have this as one of the examples in the docs.
At the very least, this issue will remind me of how to do this in the future 😋

All the best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions