| C:\snml2019\ping\ping_nms1.txt |
---|
001 | screen.text at point {150} {30} string {9、ping测试:ttl、size、roundtrip_time、ip} |
002 | |
003 | var {v_ttl} value {0} |
004 | var {v_y} value {60} |
005 | screen.text at point {50} {~v_y~} string {发送ping请求参数} |
006 | screen.line from point {10} {75} to point {180} {75} |
007 | screen.text at point {350} {~v_y~} string {ping应答参数} |
008 | screen.line from point {200} {75} to point {630} {75} |
009 | |
010 | #run.set loglevel {debug} |
011 | var {v_y} value {80} |
012 | screen.text at point {10} {~v_y~} string {目的IP地址} |
013 | screen.text at point {110} {~v_y~} string {TTL} |
014 | screen.text at point {150} {~v_y~} string {字节数} |
015 | |
016 | screen.text at point {200} {~v_y~} string {IP地址} |
017 | screen.text at point {300} {~v_y~} string {TTL} |
018 | screen.text at point {350} {~v_y~} string {字节数} |
019 | screen.text at point {400} {~v_y~} string {毫秒数} |
020 | screen.text at point {450} {~v_y~} string {ping.status} |
021 | |
022 | #screen.line from point {10} {100} to point {630} {100} |
023 | |
024 | |
025 | #var {ip_addr} value {192.168.118.2} |
026 | run.set loglevel {debug} |
027 | dns.get var {ip_addr} host {mail.163.com} |
028 | |
029 | var {v_ttl} value {0} |
030 | var {v_y} value {80} |
031 | var {v_sendbytes} value {1000} |
032 | loop.begin |
033 | var {v_ttl} add number {1} |
034 | var {v_y} add number {20} |
035 | run.set loglevel {debug} |
036 | ping.ip {~ip_addr~} ttl {~v_ttl~} size {~v_sendbytes~} |
037 | run.set loglevel {nolog} |
038 | screen.text at point {10} {~v_y~} string {~ping.dest_ip~} |
039 | screen.text at point {110} {~v_y~} string {~v_ttl~} |
040 | screen.text at point {150} {~v_y~} string {~v_sendbytes~} |
041 | |
042 | screen.text at point {200} {~v_y~} string {~ping.reply_ip~} |
043 | screen.text at point {300} {~v_y~} string {~ping.reply_ttl~} |
044 | screen.text at point {350} {~v_y~} string {~ping.reply_bytes~} |
045 | screen.text at point {400} {~v_y~} string {~ping.roundtrip_time_milliseconds~} |
046 | screen.text at point {450} {~v_y~} string {~ping.status~} |
047 | if.var {v_ttl} > {16} |
048 | loop.exit |
049 | if.end |
050 | loop.end |
051 | |
052 | run.end |