Merge branch 'main' of ssh://git.dev-c.at:222/Theenoro/short-scripts into main
commit
fc33eccb2b
|
@ -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.
|
Loading…
Reference in New Issue