-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathping_collector.bat
executable file
·64 lines (37 loc) · 1.35 KB
/
ping_collector.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@ECHO OFF
SETLOCAL
REM this could be smarter...
REM try to run hrping to collect data to investigate
REM whether a link uses ATM cell quantization
REM Is hrping installed? Bail out and complain if not
REM Is hrping installed? Bail out & complain if not
REM Get hrping from: https://www.cfos.de/en/ping/ping.htm
REM hrping required EULA confirmation on initial run
ECHO This script requires administrative priviledge
REM Define variables
REM gstatic.com does seem to respond only up to 64 bytes ICMP payload...
REM 8.8.8.8 also stopped returning larger sizes, so switch to 1.1.1.1
SET TARGET=1.1.1.1
SET /A SWEEPMINSIZE=16
SET /A SWEEP_N_ATM_CELLS=3
SET /A SWEEPMAXSIZE=%SWEEP_N_ATM_CELLS% * 48 + %SWEEPMINSIZE%
SET PINGPERIOD_MS=10
SET PINGSPERSIZE=1000
SET /A N_SIZES=%SWEEPMAXSIZE% - %SWEEPMINSIZE%
ECHO %N_SIZES%
SET /A N_PINGSTOTAL=%N_SIZES% * %PINGSPERSIZE%
ECHO %N_PINGSTOTAL%
SET TECH=xDSL
REM get time and date and remove some unwanted characters
SET TIMESTR=%TIME: =%
SET TIMESTR=%TIMESTR::=%
SET DATESTR=%DATE: =%
SET DATESTR=%DATESTR:/=%
SET LOG_FILE_NAME=ping_sweep_%TECH%_%DATESTR%_%TIMESTR%.txt
SET PING_CMD=hrping -q -l%SWEEPMINSIZE%:%SWEEPMAXSIZE%:1 -s %PINGPERIOD_MS% -W -n %N_PINGSTOTAL% -F %LOG_FILE_NAME% %TARGET%
ECHO %PING_CMD%
REM now run this
%PING_CMD%
ECHO DONE
ENDLOCAL
ECHO ON