LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to find a least busy host given a hardcoded host list? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-find-a-least-busy-host-given-a-hardcoded-host-list-837615/)

justnil 10-12-2010 10:35 AM

how to find a least busy host given a hardcoded host list?
 
Hi,

I got a bunch of machines (~10) that I share with my co-workers. I have appropriate .ssh file(s) set up so I don't get prompt for password when I try to ssh.

Currently I ssh into these hosts and then do a top to check the load before I start using the machine. Because I don't want to be on a busy host..

Can someone show me how to write a script that find a least-busy host given a list of hosts to check? (hardcoded is fine)

Please help...

Many thanks!

TB0ne 10-12-2010 10:53 AM

Quote:

Originally Posted by justnil (Post 4125053)
Hi,
I got a bunch of machines (~10) that I share with my co-workers. I have appropriate .ssh file(s) set up so I don't get prompt for password when I try to ssh.
Currently I ssh into these hosts and then do a top to check the load before I start using the machine. Because I don't want to be on a busy host..
Can someone show me how to write a script that find a least-busy host given a list of hosts to check? (hardcoded is fine)

We can help....post what you've written so far, and where you're getting stuck.

Otherwise, you can take a look at one of the thousands of bash scripting tutorials you can find via Google, and start there.


All times are GMT -5. The time now is 09:50 PM.