Macos 文档DSL连接断开

Macos 文档DSL连接断开,macos,unix,connection,dsl,Macos,Unix,Connection,Dsl,我最近注意到,我的O2 DSL连接每隔一小时左右就会断开,一分钟后就会重新建立。不过,这还是很烦人的 既然O2提供了这个完全不提供任何信息的blautiful路由器,我如何记录这些连接丢失 我正在使用OSX,但任何*nix解决方案都应该可以。我目前拥有的(半手动) checkinternet.sh(shell脚本) checkinternet.l(lex脚本) 然后运行checkinternet.sh几个小时,然后 ./checkinternet < checkinternet.log &

我最近注意到,我的O2 DSL连接每隔一小时左右就会断开,一分钟后就会重新建立。不过,这还是很烦人的

既然O2提供了这个完全不提供任何信息的blautiful路由器,我如何记录这些连接丢失

我正在使用OSX,但任何*nix解决方案都应该可以。

我目前拥有的(半手动)

checkinternet.sh(shell脚本)

checkinternet.l(lex脚本)

然后运行checkinternet.sh几个小时,然后

./checkinternet < checkinternet.log > checkinternet.csv
tail checkinternet.csv
open /Applications/Microsoft\ Office\ 2011/Microsoft\ Excel.app/ checkinternet.csv
/checkinternetcheckinternet.csv
tail checkinternet.csv
打开/Applications/Microsoft\Office\2011/Microsoft\Excel.app/checkinternet.csv
并绘制第1、5行,。。。Mac OS预览的屏幕截图和注释

很管用,但有点难看。还有更好的主意吗

localhost
o2.box
192.168.1.2
www.spiegel.de
%{
#include <stdio.h>
%}
%%
[a-zA-Z]+[ ][a-zA-Z]+[ ][0-9]+[ ]     printf("\n"); /* printf("\n%s,", yytext); */
[0-9]+[\:][0-9]+[\:][0-9]+            printf("%s,", yytext);
CEST      /* ignore */
\n        /* ignore */
[ \t]     /* ignore */
round-trip /* ignore */
min      /* ignore */
avg      /* ignore */
max      /* ignore */
stddev      /* printf("CONNECT "); */
=        /* ignore */
[0-9]+\.[0-9]+                       printf("%s,", yytext);
\/       /* ignore */
ms      /* ignore */
[0-9]+ /* ignore year */
%%
lex checkinternet.l
cc lex.yy.c -o checkinternet -ll
./checkinternet < checkinternet.log > checkinternet.csv
tail checkinternet.csv
open /Applications/Microsoft\ Office\ 2011/Microsoft\ Excel.app/ checkinternet.csv