Added some convenience functions

Just added a few functions that we found useful where I work, so I assume others might, too. The rest is mostly debugging output.
Well, we don't tend to test with clusters, though our application supports them... and we only ever configure one server, quite frankly. Again, our clients could configure things differently, but the script I was writing isn't really intended for end-user use, so  wasn't too bothered about that.

Copying over the warnings sounds like a good idea, though. I'll do that.