The Geek Blog

View Original

Python Code to Ping Servers

This is sort of a follow up from my tip last week - Cut Command a couple of examples.

Below is the code, the first section is setting the variables to read the config file, stored in certain directories, and also write out to a log file.

The code is very simple to do the ping and will write out if it responds or if it's down.

Very small easy script if you do have a long list of servers that you need to check.

See this content in the original post