I've written a script to handle the inventory of our servers. It SSH's into each machine and pulls down the information, storing it in a local db.
SSH options to prevent the script from hanging. However, on occasion there will be a server which will not respond and which won't catch on the ConnectTimeout.
An idea I had was to use threads. One thread would be the SSH routine, and the 2nd thread would be some type of timer which would kill the first thread if it took too long.
I'd like to know if there is a better way of handling this. If not, I'll need some guidance on threads, as I've never dealt with them before in Perl.