Merge branch 'main' of ssh://git.dev-c.at:222/Theenoro/short-scripts into main

main
Theenoro 2022-08-05 09:57:32 +02:00
commit fc33eccb2b
1 changed files with 20 additions and 13 deletions

View File

@ -1,13 +1,20 @@
# Ping Logger
Replace the variables `check_host` & `check_hostname` from the `ping_logger.bat` like:
```bat
set check_host=8.8.8.8
set check_hostname=google_dns
```
You can also alter the path of the log file or name. Normally logs will be written in the `.\log` folder.
```bat
set filename=.\log\%check_hostname%.log
```
# Ping Logger
Replace the variables `check_host` & `check_hostname` from the `ping_logger.bat` like:
```bat
set check_host=8.8.8.8
set check_hostname=google_dns
```
You can also alter the path of the log file or name. Normally logs will be written in the `.\log` folder.
```bat
set filename=.\log\%check_hostname%.log
```
One better solution if you have more hosts. Replace
```bat
set check_host=%1
set check_hostname=%2
```
then you can start the bat file via `start .\ping_logger.bat 8.8.8.8 google_dns`. This will open a new cmd window pinging the given host info and create the logfile for it.