duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
896 stars 79 forks source link

Show simple session related counters #61

Closed gkotian closed 8 years ago

gkotian commented 8 years ago

It would be great if there was a place (perhaps somewhere under the Hosts menu) where I could see simple counts of the total number of sessions, number of active sessions and number of inactive sessions.

My setup is such that I need to connect to many different servers, and the number of servers changes every once-in-a-while. I usually update my clusters config file whenever the number of servers changes, but on one occasion I forgot to do that. This meant that I performed some updates on 15 servers, whereas I should have done it on 20.

Now, every time I launch cssh and add a cluster, I find myself manually counting the number of sessions under the Hosts menu, and checking that all of them are active. For added safety, I also count the terminal windows to ensure that I have the correct number of windows open.

If cssh itself would just tell me these numbers somehow, it would save me a lot of time and effort.

duncs commented 8 years ago

I will look into what might be appropriate, but instead of hardcoding your cluster you could use the external cluster command to generate them on the fly

gkotian commented 8 years ago

you could use the external cluster command to generate them on the fly

Interesting. I don't know how to do that though. Can you point me to where I can read more about this?

duncs commented 8 years ago

Using 4.04 or newer, look in the man page (cssh -H) for 'external_cluster_command' in the csshrc or .clusterssh.config file.

duncs commented 8 years ago

I'll mark this as closed. Any problems, reopen a ticket.