这个脚本是通过PING Google的DNS服务器8.8.8.8来判断网络是否连通的 连续5次不能PING通,中间间隔10秒,就判断为网络故障 我先考虑的处理办法是重启路由器,后来尝试用网络服务重启就可以恢复 增加了一个my_watchdog.log的日志文件,记录故障、重启的时间、次数 路由器的固态硬盘容量非常小,只有2M多,日志文件都不能大...
关闭IPv6后编译openwrt 15.05.01,运行时发现ssr-watchdog脚本不断报错: 2017-05-23 02:30:53] Backup server is running. ping: bad address '-c' sh: bad number [2017-05-23 02:30:53] Main server down,% packet loss. [2017-05-23 02:30:53] No problem. [2017-05-23
//spawn_procd()函数繁衍后继真正使用的/sbin/procd进程,从/tmp/debuglevel读出debug级别并设置到环境变量DBGLVL中,把watchdog fd设置到环境变量WDTFD中,最后调用execvp()繁衍后继真正使用的sbin/procd进程,使其成为用户空间的第一个进程(PID=1)。 static void spawn_procd(struct uloop_process *proc, int ret)...
watchdog_ping(); } } uloop_init(); preinit(); uloop_run(); return0; } 主要是: early(); --->early_mounts(); //挂载proc、sysfs、tmpfs等这些 --->early_env(); //设置PATH环境变量 watchdog_init(1); //设置看门狗 cmdline(); //处理/proc/cmdline的内容,主要读取bootloader设置的bootargs...
[ 2.184838] init: - watchdog - [ 2.917103] kmodloader: loading kernel modules from /etc/modules-boot.d/ [ 2.940185] Key type encrypted registered [ 2.991344] device-mapper: ioctl: 4.47.0-ioctl (2022-07-28) initialised:dm-devel@redhat.com ...
}else{inti;for(i =0; i <1200; i++) {if(waitpid(pid,NULL, WNOHANG) >0)break;usleep(10*1000);watchdog_ping(); } }uloop_init();/* preinit * |-> LOG("- preinit -") * |-> fork->procd * |-> setenv("PREINIT", "1", 1) ...
03openwrt的启动过程 03openwrt的启动过程 [ 2.824545] VFS: Mounted root (ext4 filesystem) readonly on device 179:1.[ 2.833446] Freeing unused kernel memory: 244K (84733000 - 84770000)[ 3.006884] init: Console is alive [ 3.011436] init: - watchdog - [ 3.329383] init: - preinit -...
`ping-c5119.29.29.29|grep-vgrep|grep''64bytes''|wc-l`if[ ${PING2}-ne0];then?exit0elseecho$DATENetworkfailure,Ro uterreboot>>watchdog.logreboot???#server信息?#!/bin/sh?DATE=`d ate+%Y-%m-%d-%H:%M:%S`key=?sc_send(){curl-s"https://sc.ftqq.c om...
[ 1.298061] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0 [ 1.307715] i2c /dev entries driver [ 1.313865] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.325438] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2...
[ 2.620000] init: - watchdog -[ 4.380000] usbcore: registered new interface driver usbfs[ 4.380000] usbcore: registered new interface driver hub[ 4.390000] usbcore: registered new device driver usb[ 4.400000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI)Driver[ 4.410000] ehci-platform...