Mam podobny problem na DWR-960 z MiFi. Licznik danych w losowych momentach znika. Na przykład tak:
2022-04-01 00:30:20 5326
2022-04-01 00:45:20 5327
2022-04-01 01:00:20 5324
2022-04-01 01:15:20 5323
2022-04-01 01:30:20 5329
2022-04-01 01:45:21 20 <---
*** fixed
2022-04-01 02:00:21 5339
2022-04-01 02:15:20 5338
2022-04-01 02:30:20 5337
2022-04-01 02:45:20 5336
Zrobiłem mały debug, ale ja nic z tego nie wydłubałem i nadal nie wiem z czym to problem. Ustawiłem w LANie lokalny serwer czasu i router (mam nadzieję) pobiera z niego czas po restarcie przed połączeniem z internetem, mimo to licznik nadal resetuje się raz na kilka dni. wyłapałem logi z kwadransu w którym licznik się przekręca, ale w logread pusto, poniżej sam dmesg:
[ 0.000000] Linux version 5.4.179 (cezary@eko.one.pl) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16500-b99d7aecc8)) #0 Tue Feb 22 19:29:39 2022
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[ 0.000000] MIPS: machine is D-Link DWR-960
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] Normal zone: 144 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16384 pages, LIFO batch:3
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Writing ErrCtl register=0003d5f0
[ 0.000000] Readback ErrCtl register=0003d5f0
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 57492K/65536K available (5070K kernel code, 206K rwdata, 632K rodata, 1188K init, 213K bss, 8044K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] random: get_random_bytes called from 0x805c7a28 with crng_init=0
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[ 0.000000] systick: enable autosleep mode
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[ 0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[ 0.015501] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[ 0.059582] pid_max: default: 32768 minimum: 301
[ 0.068942] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.083348] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.105091] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.124391] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.137990] pinctrl core: initialized pinctrl subsystem
[ 0.149795] NET: Registered protocol family 16
[ 0.416947] PCI host bridge /pcie@10140000 ranges:
[ 0.426341] MEM 0x0000000020000000..0x000000002fffffff
[ 0.436712] IO 0x0000000010160000..0x000000001016ffff
[ 0.469578] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.480622] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.493207] rt2880_gpio 10000638.gpio: registering 16 gpios
[ 0.504220] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[ 0.516814] rt2880_gpio 10000660.gpio: registering 32 gpios
[ 0.527826] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[ 0.540413] rt2880_gpio 10000688.gpio: registering 1 gpios
[ 0.551249] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[ 0.564234] PCI host bridge to bus 0000:00
[ 0.572287] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[ 0.585900] pci_bus 0000:00: root bus resource [io 0x10160000-0x1016ffff]
[ 0.599573] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.613072] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.628864] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[ 0.640798] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[ 0.653231] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[ 0.665760] pci 0000:00:00.0: supports D1
[ 0.673650] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 0.687075] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.703101] pci 0000:01:00.0: [14c3:7610] type 00 class 0x028000
[ 0.714970] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[ 0.727497] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[ 0.741495] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.754548] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[ 0.767694] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 0.780815] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 0.794663] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[ 0.808163] pci 0000:00:00.0: BAR 1: assigned [mem 0x20100000-0x2010ffff]
[ 0.821671] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[ 0.835164] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.845027] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff]
[ 0.864899] clocksource: Switched to clocksource systick
[ 0.876473] thermal_sys: Registered thermal governor 'step_wise'
[ 0.876975] NET: Registered protocol family 2
[ 0.897619] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.912751] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.929314] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.944482] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.958495] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.971276] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.984184] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.998293] NET: Registered protocol family 1
[ 1.006915] PCI: CLS 0 bytes, default 32
[ 1.017663] rt-timer 10000100.timer: maximum frequency is 1220Hz
[ 1.031789] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 1.052546] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.064054] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 1.099175] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 1.116754] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 1.132177] printk: console [ttyS0] disabled
[ 1.140647] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[ 1.160287] printk: console [ttyS0] enabled
[ 1.176867] printk: bootconsole [early0] disabled
[ 1.204777] spi spi0.0: force spi mode3
[ 1.224379] spi-nor spi0.0: w25q128 (16384 Kbytes)
[ 1.233998] 3 fixed-partitions partitions found on MTD device spi0.0
[ 1.246660] Creating 3 MTD partitions on "spi0.0":
[ 1.256215] 0x000000000000-0x000000010000 : "jboot"
[ 1.267048] 0x000000010000-0x000000ff0000 : "firmware"
[ 1.280466] 2 jimage-fw partitions found on MTD device firmware
[ 1.292340] Creating 2 MTD partitions on "firmware":
[ 1.302249] 0x000000000000-0x0000001e6b2b : "kernel"
[ 1.313335] 0x0000001e6b2b-0x000000fe0000 : "rootfs"
[ 1.324287] mtd: device 3 (rootfs) set to be root filesystem
[ 1.337767] 1 squashfs-split partitions found on MTD device rootfs
[ 1.350173] 0x0000005d9000-0x000000fe0000 : "rootfs_data"
[ 1.362070] 0x000000ff0000-0x000001000000 : "config"
[ 1.384643] gsw: setting port4 to ephy mode
[ 1.393083] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 3 link up (100Mbps/Full duplex)
[ 1.411370] mtk_soc_eth 10100000.ethernet: generated random MAC address ba:44:78:71:f2:0c
[ 1.429491] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:07 [uid=004dd072, driver=Atheros 8035 ethernet]
[ 1.452473] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[ 1.465021] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[ 1.482014] rt2880_wdt 10000120.watchdog: Initialized
[ 1.493789] NET: Registered protocol family 10
[ 1.507502] Segment Routing with IPv6
[ 1.515008] NET: Registered protocol family 17
[ 1.523949] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 1.549780] 8021q: 802.1Q VLAN Support v1.8
[ 1.566840] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 1.587609] Freeing unused kernel memory: 1188K
[ 1.596657] This architecture does not have kernel memory protection.
[ 1.609485] Run /sbin/init as init process
[ 1.824861] random: fast init done
[ 2.444518] init: Console is alive
[ 2.451713] init: - watchdog -
[ 4.016693] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 4.134374] usbcore: registered new interface driver usbfs
[ 4.145453] usbcore: registered new interface driver hub
[ 4.156153] usbcore: registered new device driver usb
[ 4.173262] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.188095] ehci-fsl: Freescale EHCI Host controller driver
[ 4.200839] ehci-platform: EHCI generic platform driver
[ 4.221663] phy phy-usbphy.0: remote usb device wakeup disabled
[ 4.233469] phy phy-usbphy.0: UTMI 16bit 30MHz
[ 4.242323] ehci-platform 101c0000.ehci: EHCI Host Controller
[ 4.253806] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[ 4.269727] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[ 4.287328] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[ 4.300835] hub 1-0:1.0: USB hub found
[ 4.308820] hub 1-0:1.0: 1 port detected
[ 4.322023] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 4.336215] ohci-platform: OHCI generic platform driver
[ 4.347004] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[ 4.360607] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[ 4.376542] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[ 4.413663] hub 2-0:1.0: USB hub found
[ 4.421662] hub 2-0:1.0: 1 port detected
[ 4.436449] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 4.455393] init: - preinit -
[ 5.618834] random: jshn: uninitialized urandom read (4 bytes read)
[ 5.716889] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.008413] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.835708] 8021q: adding VLAN 0 to HW filter on device eth0
[ 6.847743] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[ 6.912131] urandom_read: 4 callbacks suppressed
[ 6.912140] random: procd: uninitialized urandom read (4 bytes read)
[ 7.258399] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.942591] jffs2: notice: (525) jffs2_build_xattr_subsystem: complete building xattr subsystem, 26 of xdatum (25 unchecked, 1 orphan) and 34 of xref (1 dead, 0 orphan) found.
[ 8.975913] mount_root: switching to jffs2 overlay
[ 8.990761] overlayfs: upper fs does not support tmpfile.
[ 9.008593] urandom-seed: Seeding with /etc/urandom.seed
[ 9.154805] procd: - early -
[ 9.160774] procd: - watchdog -
[ 9.759174] random: jshn: uninitialized urandom read (4 bytes read)
[ 9.899584] procd: - watchdog -
[ 9.919766] procd: - ubus -
[ 10.171601] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.218519] procd: - init -
[ 12.470977] kmodloader: loading kernel modules from /etc/modules.d/*
[ 12.544389] gre: GRE over IPv4 demultiplexor driver
[ 12.581123] ip_gre: GRE over IPv4 tunneling driver
[ 12.643946] usbcore: registered new interface driver cdc_wdm
[ 12.684232] Loading modules backported from Linux version v5.10.85-0-ge4f2aee6612e
[ 12.699402] Backport generated by backports.git v5.10.85-1-0-gf988973f
[ 12.834972] usbcore: registered new interface driver usbserial_generic
[ 12.848164] usbserial: USB Serial support registered for generic
[ 12.953659] xt_time: kernel timezone is -0000
[ 12.964237] urngd: jent-rng init failed, err: 2
[ 12.989149] usbcore: registered new interface driver cdc_ether
[ 13.022002] usbcore: registered new interface driver cdc_ncm
[ 13.094303] usbcore: registered new interface driver huawei_cdc_ncm
[ 13.480883] PPP generic driver version 2.4.2
[ 13.508560] PPP MPPE Compression module registered
[ 13.532434] NET: Registered protocol family 24
[ 13.553900] PPTP driver version 0.8.5
[ 13.580909] usbcore: registered new interface driver qmi_wwan
[ 13.609576] usbcore: registered new interface driver rndis_host
[ 13.665567] usbcore: registered new interface driver sierra
[ 13.676843] usbserial: USB Serial support registered for Sierra USB modem
[ 13.722013] usbcore: registered new interface driver sierra_net
[ 13.799084] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[ 13.811717] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[ 13.852972] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[ 14.107772] mt76x0e 0000:01:00.0: EEPROM ver:01 fae:00
[ 14.126028] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 14.145515] usbcore: registered new interface driver option
[ 14.156790] usbserial: USB Serial support registered for GSM modem (1-port)
[ 14.211778] usbcore: registered new interface driver qcserial
[ 14.223416] usbserial: USB Serial support registered for Qualcomm USB modem
[ 14.298714] ieee80211 phy1: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[ 14.339121] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[ 14.354692] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[ 14.368659] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 14.412781] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 21.253322] crng init done
[ 30.777554] 8021q: adding VLAN 0 to HW filter on device eth0
[ 30.811235] device eth0 entered promiscuous mode
[ 30.832800] br-lan: port 1(eth0.1) entered blocking state
[ 30.843638] br-lan: port 1(eth0.1) entered disabled state
[ 30.854802] device eth0.1 entered promiscuous mode
[ 30.936147] br-lan: port 1(eth0.1) entered blocking state
[ 30.946985] br-lan: port 1(eth0.1) entered forwarding state
[ 31.781747] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 37.745324] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 37.975743] ieee80211 phy1: rt2800_rf_self_txdc_cal: Info - RF Tx self calibration start
[ 37.992444] ieee80211 phy1: rt2800_rf_self_txdc_cal: Info - RF Tx self calibration end
[ 39.569960] option 1-1:1.0: GSM modem (1-port) converter detected
[ 39.582504] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 39.846244] option 1-1:1.2: GSM modem (1-port) converter detected
[ 39.858763] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 39.873622] option 1-1:1.3: GSM modem (1-port) converter detected
[ 39.886109] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 40.093770] qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM device
[ 44.338560] ieee80211 phy1: rt2800_loft_iq_calibration: Info - LOFT Calibration Done!
[ 44.358147] ieee80211 phy1: rt2800_iq_search: Info - IQCalibration Start!
[ 44.385608] ieee80211 phy1: rt2800_iq_search: Info - IQCalibration Done! CH = 0, (gain= 0, phase=3c)
[ 44.404716] ieee80211 phy1: rt2800_iq_search: Info - IQCalibration Start!
[ 44.432605] ieee80211 phy1: rt2800_iq_search: Info - IQCalibration Done! CH = 1, (gain= f, phase=3d)
[ 44.450833] ieee80211 phy1: rt2800_loft_iq_calibration: Info - TX IQ Calibration Done!
[ 44.664175] ieee80211 phy1: rt2800_rxiq_calibration: Info - RXIQ G_imb=0, Ph_rx=-5
[ 44.689444] ieee80211 phy1: rt2800_rxiq_calibration: Info - RXIQ G_imb=1, Ph_rx=-3
[ 44.779827] qmi_wwan 1-1:1.4 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1, WWAN/QMI device, 02:91:ec:26:bc:51
[ 44.846000] br-lan: port 2(wlan1) entered blocking state
[ 44.856660] br-lan: port 2(wlan1) entered disabled state
[ 44.867669] device wlan1 entered promiscuous mode
[ 45.505417] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[ 45.518344] br-lan: port 2(wlan1) entered blocking state
[ 45.528982] br-lan: port 2(wlan1) entered forwarding state
[ 45.652234] br-lan: port 3(wlan0) entered blocking state
[ 45.663026] br-lan: port 3(wlan0) entered disabled state
[ 45.674064] device wlan0 entered promiscuous mode
[ 45.683642] br-lan: port 3(wlan0) entered blocking state
[ 45.694265] br-lan: port 3(wlan0) entered forwarding state
[ 45.805395] br-lan: port 3(wlan0) entered disabled state
[ 46.328620] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 46.341604] br-lan: port 3(wlan0) entered blocking state
[ 46.352241] br-lan: port 3(wlan0) entered forwarding state
[23087.852346] pptp-vpn: renamed from ppp0
[23912.725255] pptp-vpn: renamed from ppp0
Na razie stosuję takie obejście, że co kilka minut porównuję rozmiar pliku easyconfig_statistics.json.gz z poprzednią jego wersją - jeśli różnią się znacznie to przywracam kopię, ale transfer z tej przerwy niestety przepada:
#!/bin/sh
# .gz
# .gz.last - previous file
F1="/usr/lib/easyconfig/easyconfig_statistics.json.gz"
F2="/usr/lib/easyconfig/easyconfig_statistics.json.gz.last"
[ -e $F1 ] && [ -e $F2 ] && {
S1=$(wc -c < $F1)
S2=$(wc -c < $F2)
[ $((S1)) -le $((S2 >> 1)) ] && {
F1="/usr/lib/easyconfig/easyconfig_statistics.json.gz.last"
F2="/usr/lib/easyconfig/easyconfig_statistics.json.gz"
rm -f /tmp/easyconfig_statistics.json
}
}
cp -fp "$F1" "$F2"
W crontab:
*/15 * * * * sleep 20 && /etc/config/check_counters.sh
Brakuje pomysłu co by tu jeszcze sprawdzić.