Bash

Nov
10
2015

Netzwerkverbindungen per Shellscript prüfen

Für wiederkehrendes Prüfen, ob Netzwerkverbindungen erreichbar sind, gibt es hier ein kleines Shellscript:   root@hostname:~$ cat checkconnection.sh #!/bin/bash #title           :checkconnection.sh #description     :checks network connectivity to specified host:port tupples. #author          :maximilian.riess@riess-group.de #date            :20160201 #version         :1.1 #usage           :bash ./checkconnection.sh #notes           :needs a config file named remotes.csv which contain hosts. #notes           :v1.1: without port information, ping is used to determine #notes           :      connection is working. works also with port=0 #bash_version    :4.1.5(1)-release #============================================================================== # example remotes.csv: # # check connections to defined hosts # # format is: # # hostname:port:<opt infotext> # # 127.0.0.1:22:lokales ssh # 127.0.0.1:0:ping test # 127.0.0.1:: # 127.0.0.1 #============================================================================== filename=“$1″...

More