Fatal error turning off hash boards power

Всем привет питаюсь собрать т17 из кучу плат.  есть 4 абсолютно рабочих плат, назовём их так A. B. C. D. платы абсолютно одинаковые.

Всем привет питаюсь собрать т17 из кучу плат.  есть 4 абсолютно рабочих плат, назовём их так A. B. C. D. платы абсолютно одинаковые.

Так вот A. B. работают вместе и майнят. Так же C. D. работают вместе. Но нам нужно 3 платы в т17. И проблема такая берем A и B. к нему 

добавляем  платы C или D чтоб получилось 3 платы как положено, и оно не стартует. ругается на разное напряжение. Voltage are different. Will exit.

В чём проблема я понять не могу.

Скрытый текст

Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-gff8137b-dirty (lzq@armdev2) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-23) ) #25 SMP PREEMPT Fri Nov 23 15:30:52 CST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Xilinx Zynq
cma: Reserved 16 MiB at 0x0e000000
Memory policy: Data cache writealloc
On node 0 totalpages: 61440
free_area_init_node: node 0, pgdat c0b39280, node_mem_map cde10000
  Normal zone: 480 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 61440 pages, LIFO batch:15
percpu: Embedded 12 pages/cpu @cddf1000 s19776 r8192 d21184 u49152
pcpu-alloc: s19776 r8192 d21184 u49152 alloc=12*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 60960
Kernel command line: mem=240M console=ttyPS0,115200 ramdisk_size=33554432 root=/dev/ram rw earlyprintk
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 203752K/245760K available (6345K kernel code, 231K rwdata, 1896K rodata, 1024K init, 223K bss, 25624K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 — 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 — 0xfff00000   (3072 kB)
    vmalloc : 0xcf800000 — 0xff800000   ( 768 MB)
    lowmem  : 0xc0000000 — 0xcf000000   ( 240 MB)
    pkmap   : 0xbfe00000 — 0xc0000000   (   2 MB)
    modules : 0xbf000000 — 0xbfe00000   (  14 MB)
      .text : 0xc0008000 — 0xc090c424   (9234 kB)
      .init : 0xc0a00000 — 0xc0b00000   (1024 kB)
      .data : 0xc0b00000 — 0xc0b39fe0   ( 232 kB)
       .bss : 0xc0b39fe0 — 0xc0b71c28   ( 224 kB)
Preemptible hierarchical RCU implementation.
    Build-time adjustment of leaf fanout to 32.
    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to cf800000
ps7-slcr mapped to cf802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at cf802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
ps7-ttc #0 at cf80a000, irq=18
Console: colour dummy device 80×30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 — 0x100058
CPU1: failed to boot: -1
Brought up 1 CPUs
SMP: Total of 1 processors activated (666.66 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xcf880000
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 — Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
Trying to unpack rootfs image as initramfs…
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 12584K (cceb7000 — cdb01000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=16 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.ps7-dma:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 158, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to cf86e000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
CAN device driver interface
gpiod_set_value: invalid GPIO
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 31 (00:0a:35:00:00:00)
Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver — 3.2.6-k
e1000e: Copyright(c) 1999 — 2015 Intel Corporation.
ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
nand: Micron MT29F2G08ABAGAWP
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
nand: WARNING: pl35x-nand: the ECC used on your system is too weak compared to the one required by the NAND chip
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
6 ofpart partitions found on MTD device pl35x-nand
Creating 6 MTD partitions on «pl35x-nand»:
0x000000000000-0x000002800000 : «BOOT.bin-env-dts-kernel»
0x000002800000-0x000004800000 : «ramfs»
0x000004800000-0x000005000000 : «configs»
0x000005000000-0x000006000000 : «reserve»
0x000006000000-0x000008000000 : «ramfs-bak»
0x000008000000-0x000010000000 : «reserve1»
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
zynq_pm_ioremap: no compatible node found for ‘xlnx,zynq-ddrc-a05’
zynq_pm_late_init: Unable to map DDRC IO memory.
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
RAMDISK: gzip image found at block 0
EXT4-fs (ram0): couldn’t mount as ext3 due to feature incompatibilities
EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 1024K (c0a00000 — c0b00000)
EXT4-fs (ram0): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr
random: dd urandom read with 0 bits of entropy available
ubi0: attaching mtd2
ubi0: scanning is finished
ubi0: attached mtd2 (name «configs», size 8 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 64, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 18/9, WL threshold: 4096, image sequence number: 243014538
ubi0: available PEBs: 0, total reserved PEBs: 64, PEBs reserved for bad PEB handling: 40
ubi0: background thread «ubi_bgt0d» started, PID 708
UBIFS (ubi0:0): background thread «ubifs_bgt0_0» started, PID 711
UBIFS (ubi0:0): recovery needed
UBIFS (ubi0:0): recovery completed
UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name «configs»
UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi0:0): FS size: 1396736 bytes (1 MiB, 11 LEBs), journal size 888833 bytes (0 MiB, 5 LEBs)
UBIFS (ubi0:0): reserved for root: 65970 bytes (64 KiB)
UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID A0A086A4-06D4-4248-A29E-AC296967A2B9, small LPT model
ubi1: attaching mtd5
ubi1: scanning is finished
ubi1: attached mtd5 (name «reserve1», size 128 MiB)
ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi1: good PEBs: 1020, bad PEBs: 4, corrupted PEBs: 0
ubi1: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi1: max/mean erase counter: 1445/822, WL threshold: 4096, image sequence number: 3389548455
ubi1: available PEBs: 0, total reserved PEBs: 1020, PEBs reserved for bad PEB handling: 36
ubi1: background thread «ubi_bgt1d» started, PID 720
UBIFS (ubi1:0): background thread «ubifs_bgt1_0» started, PID 723
UBIFS (ubi1:0): recovery needed
UBIFS (ubi1:0): recovery completed
UBIFS (ubi1:0): UBIFS: mounted UBI device 1, volume 0, name «reserve1»
UBIFS (ubi1:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi1:0): FS size: 123039744 bytes (117 MiB, 969 LEBs), journal size 6221824 bytes (5 MiB, 49 LEBs)
UBIFS (ubi1:0): reserved for root: 4952683 bytes (4836 KiB)
UBIFS (ubi1:0): media format: w4/r0 (latest is w4/r0), UUID 721E72E7-F382-4130-AD9F-6C10D9102537, small LPT model
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
macb e000b000.ethernet eth0: unable to generate target frequency: 25000000 Hz
macb e000b000.ethernet eth0: link up (100/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
In axi fpga driver!
request_mem_region OK!
AXI fpga dev virtual address is 0xcfb38000
*base_vir_addr = 0xab013
In fpga mem driver!
request_mem_region OK!
fpga mem virtual address is 0xd2000000
2021-05-26 05:48:27 driver-btm-api.c:663:init_freq_mode: This is scan-user version
2021-05-26 05:48:27 driver-btm-api.c:2028:bitmain_soc_init: opt_multi_version     = 1
2021-05-26 05:48:27 driver-btm-api.c:2029:bitmain_soc_init: opt_bitmain_ab        = 1
2021-05-26 05:48:27 driver-btm-api.c:2030:bitmain_soc_init: opt_bitmain_work_mode = 0
2021-05-26 05:48:27 driver-btm-api.c:2031:bitmain_soc_init: Miner compile time: Thu Apr 23 16:29:07 CST 2020 type: Antminer T17
2021-05-26 05:48:27 driver-btm-api.c:2032:bitmain_soc_init: commit version: 1c5be6f 2020-04-20 16:18:14, build by: lol 2020-04-23 16:35:04
2021-05-26 05:48:27 driver-btm-api.c:1844:show_sn: no SN got, please write SN to /nvdata/sn
2021-05-26 05:48:27 driver-btm-api.c:1167:miner_device_init: Detect 256MB control board of XILINX
2021-05-26 05:48:27 driver-btm-api.c:1115:init_fan_parameter: fan_eft : 0  fan_pwm : 0
2021-05-26 05:48:27 thread.c:885:create_read_nonce_reg_thread: create thread
2021-05-26 05:48:33 driver-btm-api.c:1099:init_miner_version: miner ID : 81646c042b10481c
2021-05-26 05:48:33 driver-btm-api.c:1105:init_miner_version: FPGA Version = 0xB013
2021-05-26 05:48:35 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-05-26 05:48:37 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-05-26 05:48:39 eeprom.c:431:check_pattern_test_level: L1 board
2021-05-26 05:48:39 driver-btm-api.c:737:get_product_id: product_id[0] = 1
2021-05-26 05:48:39 driver-btm-api.c:737:get_product_id: product_id[1] = 1
2021-05-26 05:48:39 driver-btm-api.c:737:get_product_id: product_id[2] = 1
2021-05-26 05:48:39 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[0] = 1
2021-05-26 05:48:39 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[1] = 1
2021-05-26 05:48:39 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[2] = 1
2021-05-26 05:48:39 driver-btm-api.c:1919:bitmain_board_init: g_ccdly_opt = 1
2021-05-26 05:48:39 driver-btm-api.c:676:_set_project_type: project:2
2021-05-26 05:48:39 driver-btm-api.c:706:_set_project_type: Project type: Antminer T17
2021-05-26 05:48:39 driver-btm-api.c:717:dump_pcb_bom_version: Chain [0] PCB Version: 0x0100
2021-05-26 05:48:39 driver-btm-api.c:718:dump_pcb_bom_version: Chain [0] BOM Version: 0x0100
2021-05-26 05:48:39 driver-btm-api.c:717:dump_pcb_bom_version: Chain [1] PCB Version: 0x0100
2021-05-26 05:48:39 driver-btm-api.c:718:dump_pcb_bom_version: Chain [1] BOM Version: 0x0100
2021-05-26 05:48:39 driver-btm-api.c:717:dump_pcb_bom_version: Chain [2] PCB Version: 0x0100
2021-05-26 05:48:39 driver-btm-api.c:718:dump_pcb_bom_version: Chain [2] BOM Version: 0x0100
2021-05-26 05:48:41 driver-btm-api.c:1939:bitmain_board_init: Fan check passed.
2021-05-26 05:48:42 board.c:36:jump_and_app_check_restore_pic: chain[0] PIC jump to app
2021-05-26 05:48:46 board.c:40:jump_and_app_check_restore_pic: Check chain[0] PIC fw version=0xb9
2021-05-26 05:48:48 board.c:36:jump_and_app_check_restore_pic: chain[1] PIC jump to app
2021-05-26 05:48:51 board.c:40:jump_and_app_check_restore_pic: Check chain[1] PIC fw version=0xb9
2021-05-26 05:48:53 board.c:36:jump_and_app_check_restore_pic: chain[2] PIC jump to app
2021-05-26 05:48:56 board.c:40:jump_and_app_check_restore_pic: Check chain[2] PIC fw version=0xb9
2021-05-26 05:48:56 thread.c:880:create_pic_heart_beat_thread: create thread
2021-05-26 05:48:56 power_api.c:55:power_init: power init … 
2021-05-26 05:48:56 driver-btm-api.c:1949:bitmain_board_init: Enter 30s sleep to make sure power release finish.
2021-05-26 05:48:56 power_api.c:46:power_off: init gpio907
2021-05-26 05:49:28 power_api.c:232:set_iic_power_to_highest_voltage: setting to voltage: 17.00 …
2021-05-26 05:49:34 power_api.c:124:check_voltage_multi: retry time: 0
2021-05-26 05:49:36 power_api.c:86:get_average_voltage: chain[0], voltage is: 19.073291 
2021-05-26 05:49:38 power_api.c:86:get_average_voltage: chain[1], voltage is: 18.436494 
2021-05-26 05:49:39 power_api.c:86:get_average_voltage: chain[2], voltage is: 17.799697 
2021-05-26 05:49:39 power_api.c:97:get_average_voltage: aveage voltage is: 18.436494 
2021-05-26 05:49:39 power_api.c:110:check_voltage: target_vol = 17.00, actural_vol = 18.44, more than 1.0v diff.
2021-05-26 05:49:40 power_api.c:124:check_voltage_multi: retry time: 1
2021-05-26 05:49:42 power_api.c:86:get_average_voltage: chain[0], voltage is: 16.905732 
2021-05-26 05:49:44 power_api.c:86:get_average_voltage: chain[1], voltage is: 16.348535 
2021-05-26 05:49:47 power_api.c:86:get_average_voltage: chain[2], voltage is: 15.448447 
2021-05-26 05:49:47 power_api.c:97:get_average_voltage: aveage voltage is: 16.234238 
2021-05-26 05:49:47 power_api.c:182:set_iic_power_by_voltage: now set voltage to : 17.000000 
2021-05-26 05:49:47 uart.c:80:set_baud: set fpga_baud = 115200, fpga_divider = 26
2021-05-26 05:49:57 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[0]: find 30 asic, times 0
2021-05-26 05:50:07 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[1]: find 30 asic, times 0
2021-05-26 05:50:17 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[2]: find 30 asic, times 0
2021-05-26 05:50:20 driver-btm-api.c:352:set_order_clock: chain[0]: set order clock, stragegy 3 clock_en=0x1
2021-05-26 05:50:21 driver-btm-api.c:352:set_order_clock: chain[1]: set order clock, stragegy 3 clock_en=0x1
2021-05-26 05:50:21 driver-btm-api.c:352:set_order_clock: chain[2]: set order clock, stragegy 3 clock_en=0x1
2021-05-26 05:50:21 driver-hash-chip.c:502:set_clock_delay_control: core_data = 0xb4
2021-05-26 05:50:21 uart.c:80:set_baud: set fpga_baud = 3000000, fpga_divider = 0
2021-05-26 05:50:21 driver-btm-api.c:1693:check_clock_counter: freq 50 clock_counter_limit 6
2021-05-26 05:50:22 uart.c:80:set_baud: set fpga_baud = 115200, fpga_divider = 26
2021-05-26 05:50:22 voltage[0] = 1730
2021-05-26 05:50:22 voltage[1] = 1730
2021-05-26 05:50:22 voltage[2] = 1690
2021-05-26 05:50:22 Voltage are different. Will exit.
2021-05-26 05:50:22 driver-btm-api.c:205:set_miner_status: ERROR_SOC_INIT
2021-05-26 05:50:22 driver-btm-api.c:146:stop_mining: stop mining: soc init failed!
2021-05-26 05:50:22 thread.c:930:cancel_read_nonce_reg_thread: cancel thread
2021-05-26 05:50:22 driver-btm-api.c:131:killall_hashboard: ****power off hashboard****

Всем привет, подскажите (кто что сможет) по этому аппарату. А то, что то я в тупике.

Итак : прибыло два аппарата (после имерсии) один включается, второй вообще молчит, тот что включается все три платы 0 асиков, тот что не включается лег блок ( и с ним в целом все понятно, в работе), но…. с аппарата где мертвый блок вытащил хешки и установил в аппарат который запускается, результат тот же, все платы 0 асиков. И всё бы ничего, но второе НО, на тестере (stasic tester) если сканировать в режиме S19j (поддержки именно S19j pro еще нет) считывается 88 чипов (на про 126 чипов) и корректно считываются температуры. Все сигналы (RX.TX.CLK.RST.Bi) в норме, буст работает, по LDO все стабы рабочие и все напряжения в норме.

И вот такой вот ребус )))

P.S. контролька на амилоджике, последнее ПО прошил. Уж не знаю, что еще проверить….

Показать скрытое содержание

[    0.000000@0] Booting Linux on physical CPU 0x0
[    0.000000@0] Linux version 4.9.113 (jenkins@nomd-nomd-fwc-bj) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP PREEMPT Tue Oct 19 21:56:04 CST 2021
[    0.000000@0] Boot CPU: AArch64 Processor [410fd034]
[    0.000000@0] earlycon: aml_uart0 at MMIO 0x00000000ff803000 (options '')
[    0.000000@0] bootconsole [aml_uart0] enabled
[    0.000000@0] efi: Getting EFI parameters from FDT:
[    0.000000@0] efi: UEFI not found.
[    0.000000@0] 	07400000 - 07500000,     1024 KB, ramoops@0x07400000
[    0.000000@0] __reserved_mem_alloc_size, start:0x0000000005000000, end:0x0000000005400000, len:4 MiB
[    0.000000@0] 	05000000 - 05400000,     4096 KB, linux,secmon
[    0.000000@0] __reserved_mem_alloc_size, start:0x000000003e000000, end:0x0000000040000000, len:32 MiB
[    0.000000@0] failed to allocate memory for node linux,meson-fb, size:32 MB
[    0.000000@0] cma: Reserved 8 MiB at 0x000000000f800000
[    0.000000@0] On node 0 totalpages: 65536
[    0.000000@0]   DMA zone: 1024 pages used for memmap
[    0.000000@0]   DMA zone: 0 pages reserved
[    0.000000@0]   DMA zone: 65536 pages, LIFO batch:15
[    0.000000@0] psci: probing for conduit method from DT.
[    0.000000@0] psci: PSCIv1.0 detected in firmware.
[    0.000000@0] psci: Using standard PSCI v0.2 function IDs
[    0.000000@0] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000@0] psci: SMC Calling Convention v1.1
[    0.000000@0] percpu: Embedded 25 pages/cpu @ffffffc00f753000 s64536 r8192 d29672 u102400
[    0.000000@0] pcpu-alloc: s64536 r8192 d29672 u102400 alloc=25*4096
[    0.000000@0] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000@0] Detected VIPT I-cache on CPU0
[    0.000000@0] CPU features: enabling workaround for ARM erratum 845719
[    0.000000@0] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64512
[    0.000000@0] Kernel command line: init=/init console=ttyS0,115200 no_console_suspend earlycon=aml_uart,0xff803000 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 logo=,loaded,androidboot.selinux=enforcing androidboot.firstboot=1 jtag=disable androidboot.hardware=amlogic androidboot.bootloader=U-Boot 2015.01 androidboot.build.expect.baseband=N/A androidboot.serialno=1234567890 rootfstype=ramfs init=/sbin/init
[    0.000000@0] PID hash table entries: 1024 (order: 1, 8192 bytes)
[    0.000000@0] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000@0] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.000000@0] Memory: 219920K/262144K available (8764K kernel code, 1194K rwdata, 2428K rodata, 3648K init, 1018K bss, 29936K reserved, 12288K cma-reserved)
[    0.000000@0] Virtual kernel memory layout:
[    0.000000@0]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000@0]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000@0]       .text : 0xffffff8009080000 - 0xffffff8009910000   (  8768 KB)
[    0.000000@0]     .rodata : 0xffffff8009910000 - 0xffffff8009b80000   (  2496 KB)
[    0.000000@0]       .init : 0xffffff8009b80000 - 0xffffff8009f10000   (  3648 KB)
[    0.000000@0]       .data : 0xffffff8009f10000 - 0xffffff800a03aa00   (  1195 KB)
[    0.000000@0]        .bss : 0xffffff800a03aa00 - 0xffffff800a139534   (  1019 KB)
[    0.000000@0]     fixed   : 0xffffffbefe7fb000 - 0xffffffbefec00000   (  4116 KB)
[    0.000000@0]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000@0]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000@0]               0xffffffbf00000000 - 0xffffffbf00400000   (     4 MB actual)
[    0.000000@0]     memory  : 0xffffffc000000000 - 0xffffffc010000000   (   256 MB)
[    0.000000@0] can't find symbol:arm_dma_alloc
[    0.000000@0] can't find symbol:__alloc_from_contiguous
[    0.000000@0] can't find symbol:cma_allocator_alloc
[    0.000000@0]  0, addr:ffffff800971cff0 +  140, aml_cma_alloc_post_hook
[    0.000000@0]  1, addr:ffffff800951f258 +   78, dma_alloc_from_contiguous
[    0.000000@0]  2, addr:ffffff80091fdd50 +  388, cma_alloc
[    0.000000@0]  3, addr:ffffff80091f76c8 +  2d0, __kmalloc_track_caller
[    0.000000@0]  4, addr:ffffff80091f4a70 +  2d0, __kmalloc
[    0.000000@0]  5, addr:ffffff80091f4750 +  258, kmem_cache_alloc_trace
[    0.000000@0]  6, addr:ffffff80091f4500 +  250, kmem_cache_alloc
[    0.000000@0]  7, addr:ffffff80091f4490 +   70, __slab_alloc.isra.24.constprop.28
[    0.000000@0]  8, addr:ffffff80091f4108 +  388, ___slab_alloc.constprop.29
[    0.000000@0]  9, addr:ffffff80091f1e70 +  420, new_slab
[    0.000000@0] 10, addr:ffffff80091e52f8 +   b0, vzalloc
[    0.000000@0] 11, addr:ffffff80091e5248 +   b0, vmalloc
[    0.000000@0] 12, addr:ffffff80091e4b00 +  2e0, __vmalloc_node_range
[    0.000000@0] 13, addr:ffffff80091ca410 +  110, kmalloc_order_trace
[    0.000000@0] 14, addr:ffffff80091ca2a0 +  170, kmalloc_order
[    0.000000@0] 15, addr:ffffff80091ab5a8 +  168, __alloc_page_frag
[    0.000000@0] 16, addr:ffffff80091ab540 +   68, alloc_pages_exact
[    0.000000@0] 17, addr:ffffff80091ab510 +   30, get_zeroed_page
[    0.000000@0] 18, addr:ffffff80091ab4b8 +   58, __get_free_pages
[    0.000000@0] 19, addr:ffffff80091aa800 +  cb8, __alloc_pages_nodemask
[    0.000000@0] 20, addr:ffffff800909c6e8 +  2a8, __dma_alloc
[    0.000000@0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000@0] Preemptible hierarchical RCU implementation.
[    0.000000@0] 	Build-time adjustment of leaf fanout to 64.
[    0.000000@0] 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000@0] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
[    0.000000@0] 
[    0.000000@0] **********************************************************
[    0.000000@0] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[    0.000000@0] **                                                      **
[    0.000000@0] ** trace_printk() being used. Allocating extra memory.  **
[    0.000000@0] **                                                      **
[    0.000000@0] ** This means that this is a DEBUG kernel and it is     **
[    0.000000@0] ** unsafe for production use.                           **
[    0.000000@0] **                                                      **
[    0.000000@0] ** If you see this message and you are not debugging    **
[    0.000000@0] ** the kernel, report this immediately to your vendor!  **
[    0.000000@0] **                                                      **
[    0.000000@0] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[    0.000000@0] **********************************************************
[    0.000000@0] NR_IRQS:64 nr_irqs:64 0
[    0.000000@0] irq_meson_gpio: 100 to 8 gpio interrupt mux initialized
[    0.000000@0] axg_aoclkc_init: register ao clk ok!
[    0.000000@0] axg_amlogic_init_sdemmc: register amlogic sdemmc clk
[    0.000000@0] axg_amlogic_init_sdemmc: register amlogic sdemmc clk
[    0.000000@0] axg_amlogic_init_media: register meson media clk
[    0.000000@0] axg_amlogic_init_misc: register amlogic axg misc clks
[    0.000000@0] axg_amlogic_init_misc: register amlogic sdemmc clk
[    0.000000@0] axg_clkc_init initialization complete
[    0.000000@0] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000000@0] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004@0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008253@0] meson_bc_timer: mclk->mux_reg =ffffff800800a190,mclk->reg =ffffff800800c194
[    0.016907@0] Console: colour dummy device 80x25
[    0.021107@0] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.031586@0] pid_max: default: 32768 minimum: 301
[    0.036442@0] thread_stack_cache_init, vmap:ffffffc00edaf600, bitmap:ffffffc00eda3000, cache page:ede0
[    0.045772@0] thread_stack_cache_init, allocation vm area:ffffffc00edd94c0, addr:ffffff8020000000, size:20001000
[    0.056005@0] cpu 0, vmap_stack:[ffffffc00f75c960-ffffffc00f760950]
[    0.062304@0] cpu 0, irq_stack: [ffffffc00f753060-ffffffc00f757050]
[    0.068604@0] cpu 1, vmap_stack:[ffffffc00f775960-ffffffc00f779950]
[    0.074904@0] cpu 1, irq_stack: [ffffffc00f76c060-ffffffc00f770050]
[    0.081203@0] cpu 2, vmap_stack:[ffffffc00f78e960-ffffffc00f792950]
[    0.087503@0] cpu 2, irq_stack: [ffffffc00f785060-ffffffc00f789050]
[    0.093803@0] cpu 3, vmap_stack:[ffffffc00f7a7960-ffffffc00f7ab950]
[    0.100103@0] cpu 3, irq_stack: [ffffffc00f79e060-ffffffc00f7a2050]
[    0.106465@0] Security Framework initialized
[    0.110697@0] SELinux:  Initializing.
[    0.114387@0] SELinux:  Starting in permissive mode
[    0.114427@0] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.121108@0] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.128871@0] ftrace: allocating 30089 entries in 118 pages
[    0.184480@0] sched-energy: CPU device node has no sched-energy-costs
[    0.185292@0] CPU0: update cpu_capacity 1024
[    0.189619@0] ASID allocator initialised with 32768 entries
[    0.227595@0] secmon: can't fine clear_range
[    0.227807@0] EFI services will not be available.
[    0.231075@0] Meson chip version = RevC (25:C - 23:0)
[    0.264946@1] Detected VIPT I-cache on CPU1
[    0.265005@1] CPU1: update cpu_capacity 1024
[    0.265007@1] CPU1: Booted secondary processor [410fd034]
[    0.293008@2] Detected VIPT I-cache on CPU2
[    0.293062@2] CPU2: update cpu_capacity 1024
[    0.293064@2] CPU2: Booted secondary processor [410fd034]
[    0.321072@3] Detected VIPT I-cache on CPU3
[    0.321125@3] CPU3: update cpu_capacity 1024
[    0.321128@3] CPU3: Booted secondary processor [410fd034]
[    0.321220@0] Brought up 4 CPUs
[    0.360439@0] SMP: Total of 4 processors activated.
[    0.365348@0] CPU features: detected feature: 32-bit EL0 Support
[    0.371383@0] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.381951@0] CPU: All CPU(s) started at EL2
[    0.383123@0] alternatives: patching kernel code
[    0.388453@1] addr:ffffff802007be10 is in kernel, size fix 4096->10, data:mode=0755
[    0.395652@0] devtmpfs: initialized
[    0.411078@0] DMI not present or invalid.
[    0.411439@0] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.419457@0] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.426019@0] pinctrl core: initialized pinctrl subsystem
[    0.432443@0] NET: Registered protocol family 16
[    0.451955@0] cpuidle: using governor menu
[    0.452442@0] vdso: 2 pages (1 code @ ffffff8009917000, 1 data @ ffffff8009f14000)
[    0.458062@0] hw-breakpoint: found 6 breakpoint and 2 watchpoint registers.
[    0.465475@0] DMA: preallocated 256 KiB pool for atomic allocations
[    0.471666@0] clkmsr: clkmsr: driver init
[    0.475674@0] aml_watch_point_probe, in, wp:2
[    0.480265@0] pstore: using zlib compression
[    0.484605@0] console [pstore-1] enabled
[    0.487944@0] pstore: Registered ramoops as persistent store backend
[    0.494356@0] ramoops: attached 0x100000@0x7400000, ecc: 0/0
[    0.508742@0] aml_iomap: amlogic iomap probe done
[    0.515720@0] clkmsr: msr_clk_reg0=ffffff800817e004,msr_clk_reg2=ffffff80081d100c
[    0.517647@0] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.614282@0] usbcore: registered new interface driver usbfs
[    0.614448@0] usbcore: registered new interface driver hub
[    0.620073@0] usbcore: registered new device driver usb
[    0.625387@0] pps_core: LinuxPPS API ver. 1 registered
[    0.630296@0] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.639697@0] PTP clock support registered
[    0.644046@0] dmi: Firmware registration failed.
[    0.652838@0] secmon: reserve_mem_size:0x300000
[    0.653004@0] secmon secmon: assigned reserved memory node linux,secmon
[    0.660015@0] secmon: get page:ffffffbf00140000, 5000
[    0.664664@0] secmon: share in base: 0xffffffc0050fe000, share out base: 0xffffffc0050ff000
[    0.673060@0] secmon: phy_in_base: 0x50fe000, phy_out_base: 0x50ff000
[    0.680965@0] NetLabel: Initializing
[    0.683098@0] NetLabel:  domain hash size = 128
[    0.687703@0] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.692918@0] NetLabel:  unlabeled traffic allowed by default
[    0.699520@0] clocksource: Switched to clocksource arch_sys_counter
[    0.828799@0] VFS: Disk quotas dquot_6.6.0
[    0.828945@0] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.855875@1] NET: Registered protocol family 2
[    0.856955@1] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.862140@1] TCP bind hash table entries: 2048 (order: 3, 32768 bytes)
[    0.868795@1] TCP: Hash tables configured (established 2048 bind 2048)
[    0.875391@1] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.881346@1] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.888079@1] NET: Registered protocol family 1
[    0.893044@1] RPC: Registered named UNIX socket transport module.
[    0.898476@1] RPC: Registered udp transport module.
[    0.903362@1] RPC: Registered tcp transport module.
[    0.908251@1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.917495@1] Unpacking initramfs...
[    1.417786@0] Initramfs unpacking failed: junk in compressed archive
[    1.424650@0] Freeing initrd memory: 6536K
[    1.425526@0] hw perfevents: clusterb_enabled = 0
[    1.427907@0] hw perfevents: cpumasks 0xf, 0x0
[    1.432373@0] hw perfevents: cluster A irq = 7
[    1.436937@0] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.447098@0] audit: initializing netlink subsys (disabled)
[    1.450448@0] audit: type=2000 audit(1.264:1): initialized
[    1.457843@0] workingset: timestamp_bits=62 max_order=16 bucket_order=0
[    1.482594@0] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.485673@0] NFS: Registering the id_resolver key type
[    1.488318@0] Key type id_resolver registered
[    1.492637@0] Key type id_legacy registered
[    1.497272@0] fuse init (API version 7.26)
[    1.502730@0] SELinux:  Registering netfilter hooks
[    1.509014@0] NET: Registered protocol family 38
[    1.509074@0] Key type asymmetric registered
[    1.512328@0] Asymmetric key parser 'x509' registered
[    1.517824@0] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    1.525023@0] io scheduler noop registered (default)
[    1.530075@0] io scheduler deadline registered
[    1.534811@0] io scheduler cfq registered
[    1.556153@2] random: fast init done
[    1.556251@2] random: crng init done
[    1.556716@0] Unable to detect cache hierarchy for CPU 0
[    1.588305@0] loop: module loaded
[    1.589804@0] zram: Added device: zram0
[    1.590237@0] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.597078@0] libphy: Fixed MDIO Bus: probed
[    1.601719@0] tun: Universal TUN/TAP device driver, 1.6
[    1.606057@0] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.614231@0]  ee eth reset:Addr = ffffff80081fd008
[    1.621768@0] meson6-dwmac ff3f0000.ethernet: no reset control found
[    1.623727@0] stmmac - user ID: 0x11, Synopsys ID: 0x37
[    1.628958@0]  Ring mode enabled
[    1.632198@0]  DMA HW capability register supported
[    1.636919@0]  Normal descriptors
[    1.640242@0]  RX Checksum Offload Engine supported
[    1.645143@0] 	COE Type 2
[    1.647766@0]  TX Checksum insertion supported
[    1.652228@0]  Wake-Up On Lan supported
[    1.656173@0]  Enable RX Mitigation via HW Watchdog Timer
[    1.669751@0] libphy: stmmac: probed
[    1.669803@0] eth%d: PHY ID 0007c0f1 at 0 IRQ POLL (stmmac-0:00) active
[    1.676350@0] PPP generic driver version 2.4.2
[    1.679213@0] PPP BSD Compression module registered
[    1.683752@0] PPP Deflate Compression module registered
[    1.688991@0] PPP MPPE Compression module registered
[    1.693953@0] NET: Registered protocol family 24
[    1.699455@0] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.705358@0] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.712392@0] usbcore: registered new interface driver cdc_acm
[    1.717608@0] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.726054@0] usbcore: registered new interface driver usbserial
[    1.732787@0] mousedev: PS/2 mouse device common for all mice
[    1.738160@0] usbcore: registered new interface driver xpad
[    1.743574@0] i2c /dev entries driver
[    1.748358@0] cpu cpu0: bL_cpufreq_init: CPU 0 initialized
[    1.752564@0] arm_big_little: bL_cpufreq_register: Registered platform driver: scpi
[    1.763565@0] ff803000.serial: clock gate not found
[    1.765096@0] meson_uart ff803000.serial: ==uart0 reg addr = ffffff800830d000
[    1.772298@0] ff803000.serial: ttyS0 at MMIO 0xff803000 (irq = 13, base_baud = 1500000) is a meson_uart
[    1.787213@0] meson_uart ff803000.serial: ttyS0 use xtal(24M) 24000000 change 0 to 115200
[    1.789914@0] console [ttyS0] enabled
[    1.797144@0] bootconsole [aml_uart0] disabled
[    1.806817@3] ff804000.serial: clock gate not found
[    1.810923@3] meson_uart ff804000.serial: ==uart3 reg addr = ffffff8008321000
[    1.818037@3] ff804000.serial: ttyS3 at MMIO 0xff804000 (irq = 14, base_baud = 1500000) is a meson_uart
[    1.828469@2] meson_uart ffd24000.serial: ==uart1 reg addr = ffffff8008323000
[    1.834544@2] ffd24000.serial: ttyS1 at MMIO 0xffd24000 (irq = 25, base_baud = 1500000) is a meson_uart
[    1.844705@0] meson_uart ffd23000.serial: ==uart2 reg addr = ffffff8008325000
[    1.851003@0] ffd23000.serial: ttyS2 at MMIO 0xffd23000 (irq = 26, base_baud = 1500000) is a meson_uart
[    1.862004@3] amlogic-new-usb2 ffe09000.usb2phy: USB2 phy probe:phy_mem:0xffe09000, iomap phy_base:0xffffff8008348000
[    1.871265@3] amlogic-new-usb3 ffe09080.usb3phy: This phy has no usb port
[    1.877746@3] amlogic-new-usb3 ffe09080.usb3phy: USB3 phy probe:phy_mem:0xffe09080, iomap phy_base:0xffffff800834c080
[    1.892834@0] i2c i2c-1: of_i2c: modalias failure on /soc/aobus@ff800000/i2c@5000/mcu6350@40
[    1.896588@0] i2c i2c-1: Failed to create I2C device for /soc/aobus@ff800000/i2c@5000/mcu6350@40
[    1.909095@0] aml_dma ff63e000.aml_dma: Aml dma
[    1.912081@0] aml_aes_dma ff63e000.aml_dma:aml_aes: Aml AES_dma
[    1.917082@0] aml_sha_dma ff63e000.aml_dma:aml_sha: Aml SHA1/SHA224/SHA256 dma
[    1.923424@0] efusekeynum: 4
[    1.925799@0] efusekeyname:             mac	offset:     0	size:     6
[    1.932212@0] efusekeyname:          mac_bt	offset:     6	size:     6
[    1.938611@0] efusekeyname:        mac_wifi	offset:    12	size:     6
[    1.945021@0] efusekeyname:            usid	offset:    18	size:    16
[    1.951882@3] efuse efuse: probe OK!
[    1.957326@3] meson-mmc: mmc driver version: 3.02, 2017-05-15: New Emmc Host Controller
[    1.964568@3] meson-mmc: >>>>>>>>hostbase ffffff8008358000, dmode 
[    1.969600@3] meson-mmc: actual_clock :400000, HHI_nand: 0x80
[    1.974821@3] meson-mmc: [meson_mmc_clk_set_rate_v3] after clock: 0x1000033c
[    2.023662@3] meson-mmc: meson_mmc_probe() : success!
[    2.023925@3] amlogic mtd driver init
[    2.028014@3] prase_get_dtb_nand_parameter:128,parse dts start
[    2.032730@3] bl mode descrete
[    2.035609@3] fip_copies 4
[    2.038274@3] fip_size 0x200000
[    2.041412@3] nand_clk_ctrl 0xffe07000
[    2.045136@3] prase_get_dtb_nand_parameter:234,parse dts end
[    2.050803@3] nand_clk_ctrl 0xffe07000
[    2.054526@3] nand register base ffffff80083df800, nand clock register ffffff80083e1000
[    2.063270@3] plat->aml_nand_device ffffff800a005a90
[    2.067448@3] m3_nand_probe() aml_nand_device ffffff800a005a90
[    2.073502@3] NAND device id: 2c da 90 95 6 0
[    2.077575@3] NAND device: Manufacturer ID: 
[    2.081631@3]  0x2c, Chip ID: 0x2c (Micron A revision NAND 2Gib MT29F2G08-A)
[    2.088673@3] oob_fill_cnt =32 oob_size =64, bch_bytes =14
[    2.094104@3] ecc mode:6 ecc_page_num=2 eep_need_oobsize=16
[    2.099653@3] plane_num=1 writesize=0x800 ecc.size=0x200 bch_mode=1
[    2.105898@3] mtd->oobavail: 0x8
[    2.109397@3] aml_nand_init 2119: plat-name:bootloader
[    2.114217@3] Creating 1 MTD partitions on "bootloader":
[    2.119521@3] 0x000000000000-0x000000200000 : "bootloader"
[    2.128621@2] bootloader initialized ok
[    2.128764@2] plat->aml_nand_device ffffff800a005a90
[    2.133760@2] m3_nand_probe() aml_nand_device ffffff800a005a90
[    2.139872@2] NAND device id: 2c da 90 95 6 0
[    2.143865@2] NAND device: Manufacturer ID: 
[    2.147930@2]  0x2c, Chip ID: 0x2c (Micron A revision NAND 2Gib MT29F2G08-A)
[    2.154972@2] oob_fill_cnt =32 oob_size =64, bch_bytes =14
[    2.160406@2] ecc mode:6 ecc_page_num=2 eep_need_oobsize=16
[    2.165954@2] plane_num=1 writesize=0x800 ecc.size=0x200 bch_mode=1
[    2.172199@2] mtd->oobavail: 0x8
[    2.175672@2] aml_nand_init 2119: plat-name:nandnormal
[    2.180568@2] bbt_start=20
[    2.183179@2] env_start=24
[    2.185886@2] key_start=32
[    2.188570@2] dtb_start=40
[    2.191238@2] ddr_start=44
[    2.193948@2] nbbt: info size=0x800 max_scan_blk=24, start_blk=20
[    2.200442@2] get_free_node 43: bitmap=0
[    2.203913@2] get_free_node 55: bitmap=1
[    2.208004@2] get_free_node 43: bitmap=1
[    2.211712@2] get_free_node 55: bitmap=3
[    2.215804@2] get_free_node 43: bitmap=3
[    2.219493@2] get_free_node 55: bitmap=7
[    2.223395@2] nbbt : phy_blk_addr=20, ec=0, phy_page_addr=0, timestamp=1
[    2.230082@2] nbbt free list:
[    2.233030@2] blockN=21, ec=-1, dirty_flag=0
[    2.237276@2] blockN=22, ec=-1, dirty_flag=0
[    2.241523@2] blockN=23, ec=-1, dirty_flag=0
[    2.245770@2] aml_nand_scan_rsv_info 1141: page_num=1
[    2.251182@2] nbbt valid addr: 280000
[    2.254439@2] aml_nand_bbt_check 1306 bbt is valid, reading.
[    2.260081@2] aml_nand_read_rsv_info:423,read nbbt info at 280000
[    2.266333@2] nenv: info size=0x10000 max_scan_blk=32, start_blk=24
[    2.272762@2] get_free_node 43: bitmap=7
[    2.276278@2] get_free_node 55: bitmap=f
[    2.280370@2] get_free_node 43: bitmap=f
[    2.284078@2] get_free_node 55: bitmap=1f
[    2.288257@2] get_free_node 43: bitmap=1f
[    2.292051@2] get_free_node 55: bitmap=3f
[    2.296230@2] get_free_node 43: bitmap=3f
[    2.300025@2] get_free_node 55: bitmap=7f
[    2.304203@2] get_free_node 43: bitmap=7f
[    2.307998@2] get_free_node 55: bitmap=ff
[    2.312177@2] get_free_node 43: bitmap=ff
[    2.315971@2] get_free_node 55: bitmap=1ff
[    2.320238@2] get_free_node 43: bitmap=1ff
[    2.324118@2] get_free_node 55: bitmap=3ff
[    2.328191@2] nenv : phy_blk_addr=24, ec=0, phy_page_addr=0, timestamp=1
[    2.334862@2] nenv free list:
[    2.337809@2] blockN=25, ec=-1, dirty_flag=0
[    2.342056@2] blockN=26, ec=-1, dirty_flag=0
[    2.346302@2] blockN=27, ec=-1, dirty_flag=0
[    2.350549@2] blockN=28, ec=-1, dirty_flag=0
[    2.354796@2] blockN=29, ec=-1, dirty_flag=0
[    2.359042@2] blockN=30, ec=-1, dirty_flag=0
[    2.363289@2] blockN=31, ec=-1, dirty_flag=0
[    2.367537@2] aml_nand_scan_rsv_info 1141: page_num=32
[    2.384881@2] nenv valid addr: 310000
[    2.384915@2] nkey: info size=0x8000 max_scan_blk=40, start_blk=32
[    2.389274@2] get_free_node 43: bitmap=3ff
[    2.393157@2] get_free_node 55: bitmap=7ff
[    2.397422@2] get_free_node 43: bitmap=7ff
[    2.401303@2] get_free_node 55: bitmap=fff
[    2.405569@2] get_free_node 43: bitmap=fff
[    2.409450@2] get_free_node 55: bitmap=1fff
[    2.413801@2] get_free_node 43: bitmap=1fff
[    2.417770@2] get_free_node 55: bitmap=3fff
[    2.422123@2] get_free_node 43: bitmap=3fff
[    2.426090@2] get_free_node 55: bitmap=7fff
[    2.430443@2] get_free_node 43: bitmap=7fff
[    2.434409@2] get_free_node 55: bitmap=ffff
[    2.438762@2] get_free_node 43: bitmap=ffff
[    2.442730@2] get_free_node 55: bitmap=1ffff
[    2.447168@2] get_free_node 43: bitmap=1ffff
[    2.451223@2] get_free_node 55: bitmap=3ffff
[    2.455468@2] nkey : phy_blk_addr=-1, ec=0, phy_page_addr=0, timestamp=0
[    2.462141@2] nkey free list:
[    2.465088@2] blockN=32, ec=-1, dirty_flag=0
[    2.469334@2] blockN=33, ec=-1, dirty_flag=0
[    2.473581@2] blockN=34, ec=-1, dirty_flag=0
[    2.477828@2] blockN=35, ec=-1, dirty_flag=0
[    2.482074@2] blockN=36, ec=-1, dirty_flag=0
[    2.486321@2] blockN=37, ec=-1, dirty_flag=0
[    2.490567@2] blockN=38, ec=-1, dirty_flag=0
[    2.494814@2] blockN=39, ec=-1, dirty_flag=0
[    2.499061@2] aml_nand_scan_rsv_info 1141: page_num=16
[    2.504174@2] nkey valid addr: fffffffffffe0000
[    2.508681@2] aml_nand_key_check 1251 NO key exist
[    2.513449@2] ndtb: info size=0x20000 max_scan_blk=44, start_blk=40
[    2.520107@2] get_free_node 43: bitmap=3ffff
[    2.523937@2] get_free_node 55: bitmap=7ffff
[    2.528376@2] get_free_node 43: bitmap=7ffff
[    2.532430@2] get_free_node 55: bitmap=fffff
[    2.536868@2] get_free_node 43: bitmap=fffff
[    2.540923@2] get_free_node 55: bitmap=1fffff
[    2.545256@2] ndtb : phy_blk_addr=40, ec=0, phy_page_addr=0, timestamp=1
[    2.551927@2] ndtb free list:
[    2.554858@2] blockN=41, ec=-1, dirty_flag=0
[    2.559121@2] blockN=42, ec=-1, dirty_flag=0
[    2.563368@2] blockN=43, ec=-1, dirty_flag=0
[    2.567615@2] aml_nand_scan_rsv_info 1141: page_num=64
[    2.584915@2] ndtb valid addr: 500000
[    2.584950@2] nddr: info size=0x20000 max_scan_blk=46, start_blk=44
[    2.589398@2] get_free_node 43: bitmap=1fffff
[    2.593539@2] get_free_node 55: bitmap=3fffff
[    2.598065@2] get_free_node 43: bitmap=3fffff
[    2.602205@2] get_free_node 55: bitmap=7fffff
[    2.606538@2] nddr : phy_blk_addr=-1, ec=0, phy_page_addr=0, timestamp=0
[    2.613209@2] nddr free list:
[    2.616156@2] blockN=44, ec=-1, dirty_flag=0
[    2.620402@2] blockN=45, ec=-1, dirty_flag=0
[    2.624650@2] aml_nand_scan_rsv_info 1141: page_num=64
[    2.629763@2] nddr valid addr: fffffffffffe0000
[    2.634270@2] aml_nand_ddr_check 1281 NO ddr exist
[    2.639040@2] tpl: off 8388608, size 8388608
[    2.773315@2] Creating 6 MTD partitions on "nandnormal":
[    2.773362@2] 0x000000800000-0x000001000000 : "tpl"
[    2.784855@1] 0x000001000000-0x000001200000 : "misc"
[    2.788201@3] 0x000001200000-0x000002200000 : "recovery"
[    2.800415@1] 0x000002200000-0x000004200000 : "boot"
[    2.819972@1] 0x000004200000-0x000004700000 : "config"
[    2.824703@1] 0x000004700000-0x000010000000 : "nvdata"
[    2.927595@0] nandnormal initialized ok
[    2.927709@0] aml_ubootenv_init: register env chardev
[    2.931587@0] aml_ubootenv_init: register env chardev OK
[    2.936287@0] amlnf_dtb_init: register dtb cdev
[    2.941230@0] amlnf_dtb_init: register dtd cdev OK
[    2.945465@0] mtd_nand_probe 267 , err = 0
[    2.950810@0] aml_vrtc rtc: rtc core: registered aml_vrtc as rtc0
[    2.956059@0] input: aml_vkeypad as /devices/platform/rtc/input/input0
[    2.963208@0] unifykey: storage in base: 0xffffffc005000000
[    2.967643@0] unifykey: storage out base: 0xffffffc005040000
[    2.973235@0] unifykey: storage block base: 0xffffffc005080000
[    2.979047@0] unifykey: probe done!
[    2.983241@0] unifykey: no efuse-version set, use default value: -1
[    2.988775@0] unifykey: key unify config unifykey-num is 6
[    2.994294@0] unifykey: key unify fact unifykey-num is 6
[    2.999557@0] unifykey: unifykey_devno: f200000
[    3.004518@2] unifykey: device unifykeys created ok
[    3.009003@2] unifykey: aml_unifykeys_init done!
[    3.013897@2] sysled: module init
[    3.017387@2] meson_wdt ffd0f0d0.watchdog: start watchdog
[    3.022143@2] meson_wdt ffd0f0d0.watchdog: creat work queue for watch dog
[    3.029577@1] meson_wdt ffd0f0d0.watchdog: AML Watchdog Timer probed done
[    3.038288@3] dmc_monitor_probe
[    3.039133@3] page_trace_module_init, create sysfs failed
[    3.045009@3] defendkey defendkey: Reserved memory is not enough!
[    3.050254@3] defendkey: probe of defendkey failed with error -22
[    3.056584@3] GACT probability NOT on
[    3.059935@3] Mirror/redirect action on
[    3.063727@3] u32 classifier
[    3.066554@3]     Actions configured
[    3.070136@3] Netfilter messages via NETLINK v0.30.
[    3.075439@3] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    3.081624@3] ctnetlink v0.93: registering with nfnetlink.
[    3.087473@3] xt_time: kernel timezone is -0000
[    3.091191@3] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    3.097923@3] ip_tables: (C) 2000-2006 Netfilter Core Team
[    3.102546@3] arp_tables: arp_tables: (C) 2002 David S. Miller
[    3.108017@3] Initializing XFRM netlink socket
[    3.113583@3] NET: Registered protocol family 10
[    3.119213@3] mip6: Mobile IPv6
[    3.120123@3] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    3.126077@3] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.134087@3] NET: Registered protocol family 17
[    3.136351@3] NET: Registered protocol family 15
[    3.140923@3] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    3.154075@3] l2tp_core: L2TP core driver, V2.0
[    3.158461@3] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    3.163388@3] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[    3.169134@3] l2tp_netlink: L2TP netlink interface
[    3.173937@3] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    3.180002@3] l2tp_debugfs: L2TP debugfs support
[    3.184538@3] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[    3.191187@3] NET: Registered protocol family 35
[    3.196154@3] Key type dns_resolver registered
[    3.200671@3] Registered swp emulation handler
[    3.204576@3] Registered cp15_barrier emulation handler
[    3.209764@3] Registered setend emulation handler
[    3.214513@3] disable EAS feature
[    3.219308@1] registered taskstats version 1
[    3.236376@3] dwc3 ff500000.dwc3: Configuration mismatch. dr_mode forced to host
[    3.742850@3] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.742946@3] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.751248@3] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f664 hci version 0x100 quirks 0x02010010
[    3.759672@3] xhci-hcd xhci-hcd.0.auto: irq 22, io mem 0xff500000
[    3.767191@2] hub 1-0:1.0: USB hub found
[    3.769608@2] hub 1-0:1.0: 1 port detected
[    3.774253@2] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.779242@2] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.787147@2] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.796789@3] hub 2-0:1.0: USB hub found
[    3.799191@3] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    3.806531@3] usb usb2: Unsupported the hub
[    3.811339@3] aml_vrtc rtc: setting system clock to 2015-01-01 00:00:08 UTC (1420070408)
[    3.819345@3] dwc_otg ff400000.dwc2_a: dwc_otg_driver_probe(ffffffc00e15b000)
[    3.819421@3] dwc_otg: usb0: type: 2 speed: 0, config: 0, dma: 0, id: 0, phy: ffe09000, ctrl: 0
[    3.827319@3] dwc_otg ff400000.dwc2_a: base=0xffffff8008580000
[    3.827332@3] dwc_otg ff400000.dwc2_a: dwc_otg_device=0xffffffc00c3f2a00
[    3.927873@1] dwc_otg: Core Release: 3.10a
[    3.927930@1] dwc_otg: Setting default values for core params
[    3.932131@1] dwc_otg: curmode: 0, host_only: 0
[    3.936632@1] dwc_otg ff400000.dwc2_a: DMA config: BURST_DEFAULT
[    3.949164@1] dwc_otg: Using Buffer DMA mode
[    3.949202@1] dwc_otg: OTG VER PARAM: 1, OTG VER FLAG: 1
[    3.953105@1] dwc_otg: Working on port type = SLAVE
[    3.957963@1] dwc_otg: Dedicated Tx FIFOs mode
[    3.965059@0] thermal thermal_zone0: binding zone soc_thermal with cdev thermal-cpufreq-0 failed:-22
[    3.971724@0] cpucore_cooling_register, max_cpu_core_num:4
[    3.984269@0] gxbb_pm: enter meson_pm_probe!
[    3.984327@0] no vddio3v3_en pin
[    3.985976@0] pm-meson aml_pm: Can't get switch_clk81
[    3.991112@0] gxbb_pm: meson_pm_probe done
[    3.996038@0] meson_uart ff803000.serial: ttyS0 use xtal(24M) 24000000 change 115200 to 115200
[    4.002389@0] Freeing unused kernel memory: 3648K
[    4.016748@0] meson_uart ff803000.serial: ttyS0 use xtal(24M) 24000000 change 115200 to 115200
[    4.277915@1] ubi0: attaching mtd5
[    4.296783@1] ubi0: scanning is finished
[    4.301441@3] ubi0: attached mtd5 (name "config", size 5 MiB)
[    4.301574@3] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.308638@3] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.315545@3] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.322653@3] ubi0: good PEBs: 40, bad PEBs: 0, corrupted PEBs: 0
[    4.328711@3] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    4.336085@3] ubi0: max/mean erase counter: 13/6, WL threshold: 4096, image sequence number: 3362079202
[    4.345491@3] ubi0: available PEBs: 0, total reserved PEBs: 40, PEBs reserved for bad PEB handling: 4
[    4.354658@1] ubi0: background thread "ubi_bgt0d" started, PID 1075
[    4.367777@0] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 1079
[    4.384329@3] UBIFS (ubi0:0): recovery needed
[    4.420296@3] UBIFS (ubi0:0): recovery completed
[    4.420600@3] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "config_data"
[    4.427307@3] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    4.437344@3] UBIFS (ubi0:0): FS size: 2793472 bytes (2 MiB, 22 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
[    4.447565@3] UBIFS (ubi0:0): reserved for root: 131942 bytes (128 KiB)
[    4.454155@3] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID B381F50F-4ED2-44A4-BEBF-D138D5BC2291, small LPT model
[    4.478982@0] ubi2: attaching mtd6
[    5.158930@0] ubi2: scanning is finished
[    5.166074@1] ubi2: attached mtd6 (name "nvdata", size 185 MiB)
[    5.166377@1] ubi2: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.173490@1] ubi2: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.180354@1] ubi2: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.187447@1] ubi2: good PEBs: 1480, bad PEBs: 0, corrupted PEBs: 0
[    5.193695@1] ubi2: user volume: 1, internal volumes: 1, max. volumes count: 128
[    5.201055@1] ubi2: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 3917940917
[    5.210335@1] ubi2: available PEBs: 0, total reserved PEBs: 1480, PEBs reserved for bad PEB handling: 4
[    5.219716@0] ubi2: background thread "ubi_bgt2d" started, PID 1087
[    5.232820@3] UBIFS (ubi2:0): background thread "ubifs_bgt2_0" started, PID 1091
[    5.249437@1] UBIFS (ubi2:0): recovery needed
[    5.290289@2] UBIFS (ubi2:0): recovery completed
[    5.290600@2] UBIFS (ubi2:0): UBIFS: mounted UBI device 2, volume 0, name "nvdata_data"
[    5.297321@2] UBIFS (ubi2:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    5.307339@2] UBIFS (ubi2:0): FS size: 185384960 bytes (176 MiB, 1460 LEBs), journal size 9269248 bytes (8 MiB, 73 LEBs)
[    5.318169@2] UBIFS (ubi2:0): reserved for root: 4952683 bytes (4836 KiB)
[    5.324930@2] UBIFS (ubi2:0): media format: w4/r0 (latest is w4/r0), UUID BA7E6781-1356-4A44-A8AD-B533B5AD62E4, small LPT model
[    5.537611@0] eth0: device MAC address 02:b5:89:97:9c:ff
[    5.620528@3] meson6-dwmac ff3f0000.ethernet eth0: fail to init PTP.
[    5.621813@3] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    5.838223@0] uart_trans: loading out-of-tree module taints kernel.
[    5.840531@0] register uart_trans chrdev success.
[    5.844072@0] meson_uart ff804000.serial: ttyS3 use xtal(24M) 24000000 change 0 to 9600
[    5.851640@0] tty port open success [/dev/ttyS3]!
[    5.856378@0] meson_uart ff804000.serial: ttyS3 use xtal(24M) 24000000 change 9600 to 115200
[    5.864677@0] init sucess for tty struct (246:3)  [/dev/ttyS3]
[    5.870831@0] meson_uart ffd23000.serial: ttyS2 use xtal(24M) 24000000 change 0 to 9600
[    5.878465@0] tty port open success [/dev/ttyS2]!
[    5.883134@0] meson_uart ffd23000.serial: ttyS2 use xtal(24M) 24000000 change 9600 to 115200
[    5.891583@0] init sucess for tty struct (246:2)  [/dev/ttyS2]
[    5.897662@0] meson_uart ffd24000.serial: ttyS1 use xtal(24M) 24000000 change 0 to 9600
[    5.905331@0] tty port open success [/dev/ttyS1]!
[    5.910003@0] meson_uart ffd24000.serial: ttyS1 use xtal(24M) 24000000 change 9600 to 115200
[    5.918408@0] init sucess for tty struct (246:1)  [/dev/ttyS1]
[    5.924524@3] create workqueue success!
[    7.667839@3] meson6-dwmac ff3f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    7.671127@3] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   17.754948@0] uart trans dev open.
[   17.755057@0] uart_buf virt addr = 0xffffffc00bd40000
[   17.757963@0] uart_buf phys addr = 0x0bd40000
[   17.762159@0] uart_buf pfn       = 0x0000bd40
[   17.766859@0] uart trans stop send work timer.
[   17.771182@0] uart trans set chain exist bits:0x4.
[   17.775690@0] uart trans set work queue count 768.
[   30.404445@0] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.
[   76.512002@0] uart set baud to: 4098
[  114.793984@0] uart trans stop send work timer.
[  115.113094@0] uart trans stop send work timer.
[  126.170689@3] uart trans start send work timer.


===========================================Miner log===========================================
2015-01-01 00:00:15 Miner compile time: Tue Oct 19 21:30:41 CST 2021 type: Antminer S19j Pro
2015-01-01 00:00:16 This is fix-freq version
2015-01-01 00:00:16 Miner compile time: Tue Oct 19 21:30:41 CST 2021 type: Antminer S19j Pro
2015-01-01 00:00:16 commit version: ce69be1 2021-10-19 19:57:55, build by: jenkins 2021-10-19 21:46:16
2015-01-01 00:00:16 opt_multi_version     = 1
2015-01-01 00:00:16 opt_bitmain_ab        = 1
2015-01-01 00:00:16 mid_auto_gen          = 1
2015-01-01 00:00:16 opt_bitmain_work_mode = 0
2015-01-01 00:00:16 port 439 already exported
2015-01-01 00:00:16 port 454 already exported
2015-01-01 00:00:16 no board pluged in socket 439
2015-01-01 00:00:16 port 440 already exported
2015-01-01 00:00:16 port 455 already exported
2015-01-01 00:00:16 no board pluged in socket 440
2015-01-01 00:00:16 port 441 already exported
2015-01-01 00:00:16 port 456 already exported
2015-01-01 00:00:16 port 438 already exported
2015-01-01 00:00:16 port 453 already exported
2015-01-01 00:00:16 port 446 already exported
2015-01-01 00:00:16 port 445 already exported
2015-01-01 00:00:16 Note: front fan is power on!
2015-01-01 00:00:16 Note: rear fan is power on!
2015-01-01 00:00:16 start the http log.
2015-01-01 00:00:16 httpListenThread start ret=0
2015-01-01 00:00:16 start listen on 6060 ...
2015-01-01 00:00:16 load machine BHB42601 conf
2015-01-01 00:00:16 machine : BHB42601 
2015-01-01 00:00:16 chain_num 4, chain_domain_num 42, chain_asic_num 126, domain_asic_num 3
2015-01-01 00:00:16 bad chain id = 3
2015-01-01 00:00:19 bad chain id = 3
2015-01-01 00:00:21 ==========================capability start==========================
2015-01-01 00:00:21 board num = 1
2015-01-01 00:00:21 board id = 2, chain num = 1
2015-01-01 00:00:21 	chain id = 2
2015-01-01 00:00:21 ==========================capability end============================
2015-01-01 00:00:21 chain num = 1
2015-01-01 00:00:22 load chain 2 eeprom data
2015-01-01 00:00:22 fan_eft : 0  fan_pwm : 100
2015-01-01 00:00:22 create thread get_nonce_and_register_thread
2015-01-01 00:00:22 fixed working voltage = 1360
2015-01-01 00:00:22 Chain [2] PCB Version: 0x0130
2015-01-01 00:00:22 Chain [2] BOM Version: 0x0010
2015-01-01 00:00:22 bad chain id = 3
2015-01-01 00:00:22 Fan check passed.
2015-01-01 00:00:22 uart_trans addr:0xf6e43000.
2015-01-01 00:00:23 chain[2] PIC jump to app
2015-01-01 00:00:24 Check chain[2] PIC fw version=0x89
2015-01-01 00:00:24 create thread pic_heart_beat_thread
2015-01-01 00:00:24 max sensor num = 4
2015-01-01 00:00:24 STATUS_INITED: soc init done!
2015-01-01 00:00:24 temperature_monitor_thread start...
2022-08-10 13:24:17 start to init...
2022-08-10 13:24:17 i2c_sim_init start
2022-08-10 13:24:17 init gpio477
2022-08-10 13:24:17 init gpio476
2022-08-10 13:24:18 i2c_sim_init end
2022-08-10 13:24:19 power open power_version = 0x71
2022-08-10 13:24:20 power type version: 0x0071
2022-08-10 13:24:20 Enter sleep to make sure power release finish.
2022-08-10 13:24:51 Slept 30 seconds, diff = 1.
2022-08-10 13:24:52 set_voltage_by_steps to 1500.
2022-08-10 13:24:54 chain avg vol rise to 15.38
2022-08-10 13:24:56 start up min temp by 75a = 26
2022-08-10 13:25:02 chain avg vol drop to 0.78
2022-08-10 13:25:06 Chain[2]: find 0 asic, times 0
2022-08-10 13:25:09 chain avg vol rise to 15.36
2022-08-10 13:25:13 chain avg vol drop to 0.86
2022-08-10 13:25:17 Chain[2]: find 0 asic, times 1
2022-08-10 13:25:18 chain avg vol rise to 14.62
2022-08-10 13:25:18 chain avg vol drop to 0.73
2022-08-10 13:25:21 chain avg vol rise to 15.36
2022-08-10 13:25:25 chain avg vol drop to 0.86
2022-08-10 13:25:29 Chain[2]: find 0 asic, times 2
2022-08-10 13:25:30 chain avg vol rise to 14.77
2022-08-10 13:25:30 chain avg vol drop to 0.71
2022-08-10 13:25:31 Chain 2 only find 0 asic, will power off hash board 2
2022-08-10 13:25:31 ERROR_SOC_INIT: soc init failed!
2022-08-10 13:25:31 stop_mining: soc init failed!
2022-08-10 13:25:31 uninit_temp_info
2022-08-10 13:25:31 do not read temp anymore...
2022-08-10 13:25:31 cancel thread
2022-08-10 13:25:31 cancel thread
2022-08-10 13:25:31 ****power off hashboard****
2022-08-10 13:25:31 over max temp, pcb temp 255 (max 75), chip temp 255(max 95) pcb temp rise 0 chip temp rise 0, total_exit_failure 0
2022-08-10 13:25:31 Sweep error string = P:1.
2022-08-10 13:25:31 ERROR_TEMP_TOO_HIGH: over max temp
2022-08-10 13:25:31 stop_mining: over max temp
2022-08-10 13:25:31 ****power off hashboard****
2022-08-10 13:25:35 temp monitor thread exit
2022-08-10 13:25:46 Version num 65536
2022-08-10 13:25:46 Mask num 0x1fffe000
2022-08-10 13:25:46 Note: addrInterval or corenum is not initialized.


не тот лог приложил, правильный ло

===========================================Miner log===========================================
2015-01-01 00:00:15 Miner compile time: Tue Oct 19 21:30:41 CST 2021 type: Antminer S19j Pro
2015-01-01 00:00:16 This is fix-freq version
2015-01-01 00:00:16 Miner compile time: Tue Oct 19 21:30:41 CST 2021 type: Antminer S19j Pro
2015-01-01 00:00:16 commit version: ce69be1 2021-10-19 19:57:55, build by: jenkins 2021-10-19 21:46:16
2015-01-01 00:00:16 opt_multi_version     = 1
2015-01-01 00:00:16 opt_bitmain_ab        = 1
2015-01-01 00:00:16 mid_auto_gen          = 1
2015-01-01 00:00:16 opt_bitmain_work_mode = 0
2015-01-01 00:00:16 port 439 already exported
2015-01-01 00:00:16 port 454 already exported
2015-01-01 00:00:16 port 440 already exported
2015-01-01 00:00:16 port 455 already exported
2015-01-01 00:00:16 port 441 already exported
2015-01-01 00:00:16 port 456 already exported
2015-01-01 00:00:16 port 438 already exported
2015-01-01 00:00:16 port 453 already exported
2015-01-01 00:00:16 port 446 already exported
2015-01-01 00:00:16 port 445 already exported
2015-01-01 00:00:16 Note: front fan is power on!
2015-01-01 00:00:16 Note: rear fan is power on!
2015-01-01 00:00:16 start the http log.
2015-01-01 00:00:16 httpListenThread start ret=0
2015-01-01 00:00:16 start listen on 6060 ...
2015-01-01 00:00:16 load machine BHB42601 conf
2015-01-01 00:00:16 machine : BHB42601 
2015-01-01 00:00:16 chain_num 4, chain_domain_num 42, chain_asic_num 126, domain_asic_num 3
2015-01-01 00:00:16 bad chain id = 3
2015-01-01 00:00:19 bad chain id = 3
2015-01-01 00:00:21 ==========================capability start==========================
2015-01-01 00:00:21 board num = 3
2015-01-01 00:00:21 board id = 0, chain num = 1
2015-01-01 00:00:21 	chain id = 0
2015-01-01 00:00:21 board id = 1, chain num = 1
2015-01-01 00:00:21 	chain id = 1
2015-01-01 00:00:21 board id = 2, chain num = 1
2015-01-01 00:00:21 	chain id = 2
2015-01-01 00:00:21 ==========================capability end============================
2015-01-01 00:00:21 chain num = 3
2015-01-01 00:00:22 load chain 0 eeprom data
2015-01-01 00:00:23 load chain 1 eeprom data
2015-01-01 00:00:23 load chain 2 eeprom data
2015-01-01 00:00:23 fan_eft : 0  fan_pwm : 100
2015-01-01 00:00:23 create thread get_nonce_and_register_thread
2015-01-01 00:00:23 fixed working voltage = 1360
2015-01-01 00:00:23 Chain [0] PCB Version: 0x0130
2015-01-01 00:00:23 Chain [0] BOM Version: 0x0010
2015-01-01 00:00:23 Chain [1] PCB Version: 0x0130
2015-01-01 00:00:23 Chain [1] BOM Version: 0x0010
2015-01-01 00:00:23 Chain [2] PCB Version: 0x0130
2015-01-01 00:00:23 Chain [2] BOM Version: 0x0010
2015-01-01 00:00:23 bad chain id = 3
2015-01-01 00:00:23 Fan check passed.
2015-01-01 00:00:23 uart_trans addr:0xf747e000.
2022-08-10 13:40:48 chain[0] PIC jump to app
2022-08-10 13:40:49 Check chain[0] PIC fw version=0x89
2022-08-10 13:40:50 chain[1] PIC jump to app
2022-08-10 13:40:52 Check chain[1] PIC fw version=0x89
2022-08-10 13:40:53 chain[2] PIC jump to app
2022-08-10 13:40:54 Check chain[2] PIC fw version=0x89
2022-08-10 13:40:54 create thread pic_heart_beat_thread
2022-08-10 13:40:54 max sensor num = 4
2022-08-10 13:40:54 STATUS_INITED: soc init done!
2022-08-10 13:40:54 temperature_monitor_thread start...
2022-08-10 13:41:07 start to init...
2022-08-10 13:41:07 i2c_sim_init start
2022-08-10 13:41:07 init gpio477
2022-08-10 13:41:07 init gpio476
2022-08-10 13:41:07 i2c_sim_init end
2022-08-10 13:41:08 power open power_version = 0x71
2022-08-10 13:41:10 power type version: 0x0071
2022-08-10 13:41:10 Enter sleep to make sure power release finish.
2022-08-10 13:41:12 chain avg vol drop to 9.21
2022-08-10 13:41:41 Slept 30 seconds, diff = 1.
2022-08-10 13:41:42 set_voltage_by_steps to 1500.
2022-08-10 13:41:45 chain avg vol rise to 10.42
2022-08-10 13:41:46 chain avg vol rise to 15.34
2022-08-10 13:41:47 start up min temp by 75a = 27
2022-08-10 13:41:54 chain avg vol drop to 5.54
2022-08-10 13:41:57 Chain[0]: find 0 asic, times 0
2022-08-10 13:42:01 chain avg vol rise to 10.41
2022-08-10 13:42:02 chain avg vol rise to 15.35
2022-08-10 13:42:05 chain avg vol drop to 10.47
2022-08-10 13:42:06 chain avg vol drop to 0.56
2022-08-10 13:42:09 Chain[0]: find 0 asic, times 1
2022-08-10 13:42:13 chain avg vol rise to 15.34
2022-08-10 13:42:17 chain avg vol drop to 5.54
2022-08-10 13:42:21 Chain[0]: find 0 asic, times 2
2022-08-10 13:42:23 Chain 0 only find 0 asic, will power off hash board 0
2022-08-10 13:42:25 chain avg vol rise to 15.33
2022-08-10 13:42:30 chain avg vol drop to 0.56
2022-08-10 13:42:33 Chain[1]: find 0 asic, times 0
2022-08-10 13:42:37 chain avg vol rise to 15.33
2022-08-10 13:42:41 chain avg vol drop to 8.02
2022-08-10 13:42:45 Chain[1]: find 0 asic, times 1
2022-08-10 13:42:49 chain avg vol rise to 15.33
2022-08-10 13:42:53 chain avg vol drop to 8.06
2022-08-10 13:42:57 Chain[1]: find 0 asic, times 2
2022-08-10 13:42:59 Chain 1 only find 0 asic, will power off hash board 1
2022-08-10 13:43:00 chain avg vol rise to 15.36
2022-08-10 13:43:05 chain avg vol drop to 0.83
2022-08-10 13:43:09 Chain[2]: find 0 asic, times 0
2022-08-10 13:43:09 chain avg vol rise to 15.23
2022-08-10 13:43:10 chain avg vol drop to 0.64
2022-08-10 13:43:12 chain avg vol rise to 15.38
2022-08-10 13:43:17 chain avg vol drop to 0.78
2022-08-10 13:43:21 Chain[2]: find 0 asic, times 1
2022-08-10 13:43:24 chain avg vol rise to 15.36
2022-08-10 13:43:29 chain avg vol drop to 0.78
2022-08-10 13:43:33 Chain[2]: find 0 asic, times 2
2022-08-10 13:43:33 chain avg vol rise to 15.23
2022-08-10 13:43:34 chain avg vol drop to 0.54
2022-08-10 13:43:35 Chain 2 only find 0 asic, will power off hash board 2
2022-08-10 13:43:35 ERROR_SOC_INIT: soc init failed!
2022-08-10 13:43:35 stop_mining: soc init failed!
2022-08-10 13:43:35 uninit_temp_info
2022-08-10 13:43:35 do not read temp anymore...
2022-08-10 13:43:35 cancel thread
2022-08-10 13:43:35 cancel thread
2022-08-10 13:43:35 ****power off hashboard****
2022-08-10 13:43:35 over max temp, pcb temp 255 (max 75), chip temp 255(max 95) pcb temp rise 0 chip temp rise 0, total_exit_failure 0
2022-08-10 13:43:35 Sweep error string = P:1.
2022-08-10 13:43:35 ERROR_TEMP_TOO_HIGH: over max temp
2022-08-10 13:43:35 stop_mining: over max temp
2022-08-10 13:43:35 ****power off hashboard****
2022-08-10 13:43:38 temp monitor thread exit

We’ve all had miners fail (if you’re here that’s most likely why), it’s frustrating, maddening, but gosh darn-it, people like you. After you’re done staring in the mirror, it’s time to start figuring out what to do. The number one thing I tell everyone I’ve worked with is to save that kernel log! I mean don’t turn the miner off until you’ve gone into the settings and copied and pasted that log into a file you save. The answer to your question may be in there.

Why save the current log? Well, for one thing that’s the “black box” of what happened. All communications between the boards and the mining pool are there and you want to know what the last thing was that happened before things went awry. Most miners (at least ones I’ve worked with) don’t save the log if you power down and reboot, it will instead overwrite with a new one. There are ways to recover it however, but unless you’re a more advanced user that knows how to SSH in, that’s not something that is easy to walk through.

There are many things that the kernel log can tell us that will point directly to the issue at hand, below are just some of the more common ones (and some uncommon) that I’ve come across:

Chain X ASIC 0 !!!

0 ASICS isn’t always a death sentence.

Another very frustrating error with very little data. Luckily most of the time this is a rather simple fix for being such a vague error. This error essentially tells you that when the control board polls the hash board (via I2C bus) it gets either no response or an improper response from the hash boards PIC after it initializes. Sometimes it will even come back with a number like Chain 2 ASIC 23 !!! which points to ASIC 24 as the specific issue, however a ASIC 0 points to a few things we can try to fix.

CHECK VOLTAGES AT THE 10V BUCK CONVERTER AND 14.2V BOOST CIRCUIT.

Sometimes, more often than it should, the boost circuit on the hash board fails and subsequently asics show as missing or ‘xxxxxx’. Check out my walkthrough manual and scroll to the 14.2V Boost Circuit for more info. Furthermore insure the output of the 10V buck converter matches the voltage you’ve set in the firmware for that chain (i.e. common voltages like 9.5V, 9.8V, or stock voltage of 10.11V.)

CHECK VOLTAGES AT YOUR LDOS.

The  L3 has 12 voltage domains, each controlled by a single voltage regulator. Most recently Bitmain used an LN1134 but has used an SPX5205 and SGM2202 in the past. In the past these domains have failed when the 14.2V circuit failed so it’s a good idea to check the voltage at each domain. This can be done by checking the voltage between pin 2 (middle pin on LDO) and pin 1 (input ~2.4V) and pin 5 (output ~1.8V.) Check this at each LDO (i.e. U75, U76, U77…) Check out my walkthrough manual and scroll to power domains for more info.

COLD RESTART THE UNIT.

From time to time intermittent problems like this can be solved by shutting the unit down for 30 seconds and then rebooting. This isn’t a long term fix but may get your unit back up and running for the time being.

LOWER THE FREQUENCY AND INCREASE THE VOLTAGE.

Go into your advanced settings for the problem hash board and try lowering the frequency and upping the voltage to at least 9.8V. Tuning the hash boards to run on minimal speed and power can have the board operating at the edge of its ability to function. Resetting the PIC to a more normal operating condition may solve your problem. Likewise operating at too high a frequency and power can potentially shorten the life of components or operate on the edge of functionality.

RELOAD THE FIRMWARE.

Sometimes reloading the firmware, especially with one that allows autotune, can help isoloate or even fix the problem if it’s with the PIC.

REFLOW THOSE SOLDER JOINTS!

An intermittent connection can change with environmental conditions . Heat and cold can flex cold solder joints and ultimately lead to failures. I’ve found that reheating and reflowing the joints on the temp sensor, buck converter, and PIC have resolved problems I’ve had in the past with missing components.

Reflowing solves the problem (sometimes.)

Fan Errors

There are a couple errors that can be associated with fans and they’re pretty straight forward to troubleshoot. The first is below, some older versions of the L3 firmware had this error, most newer and after-market versions don’t however. This points to a failing or failed fan.

Fatal Error: Some Fan Lost or Fan Speed Low!

However as the fans do start to fail, below is the message you may get. For reference fan 1 is the fan plugged into the connector closest to the front of the unit.

Fan Err! Disable PIC! Fan1 speed is too low 390 pwm 44

Fan Err! Disable PIC! Fan1 speed is too low 0 pwm 100

Another thing that points to fan errors is no hashing as the firmware shuts down the hash board if there’s a fan failure to save a thermal runaway condition. Basically, change your fan, eBay is a gold mine for these!

Get Temp Data Failed

This is pretty straight forward and almost always points to a bad TMP451 on your hash board. This error tells you exactly which chain has the failure so you can first try and reflow the solder on the TMP451 (the quality varies) or replacing the chip. I have a link to replacement parts here. The caveat is that this doesn’t always affect hashing and some firmware versions will regularly report this error due to a firmware glitch (per Bitmain.)

Get [1]Temp Data Failed!

Network Errors

Net Err! Frustrating and generally means you’re not making $. Most of the time you may see an error like below:

Net Err! lastest job more than 2 mins! waiting …

This is most likely due to one of three common problems.

  1. You have a poor network connection
  2. Your network cables or router have failed
  3. Your stratum address is entered incorrectly

Number of “x” = 4 of Chain 0 Has Exceeded Threshold (on any Chain…)

This can point to a number of issues. Generally when you see this error in the kernel log that is the point at which the hash board shuts down or, if you have a hash rate watchdog enabled, it will reboot. This is generally due to boards overheating or running too “hot” of a frequency. These issues can generally be remedied by lowering the frequency you’re operating the hash board at.

Scanreg Error

The infamous scanreg/crc5 error can be quite frustrating, but know that the secret to this generally lies in the ASIC chips themselves. The problem generally starts by seeing a series of the following in your kernel log:

bitmain_scanreg,crc5 error,should be 00, but check as 01…..

This is essentially pointing to an ASIC failing its self test. Sadly I haven’t seen a way in the kernel log to point to a specific ASIC, but following my post on CRC5 errors will help you track it down using your multimeter.

Содержание

  1. Т17е 50тн
  2. FriD89
  3. skarm
  4. FriD89
  5. MaDSerg
  6. Numbric
  7. FriD89
  8. daddizz
  9. obelix13
  10. t17 нет инициализация хэш плат
  11. Demiansikora
  12. dyakoff
  13. Fredrik
  14. Demiansikora
  15. sagri
  16. mrcredovz

Т17е 50тн

FriD89

Пляшущий с бубном

Люди помогите, не могу запустить асик!

2021-05-23 18:48:07:driver-btm-api.c:486:check_chain_conf_same: Config are different, min = 1790, max = 1870, diff is too large.
2021-05-23 18:48:07:auto_adapt.c:273:is_sweep_failed_before: open sweep tag failed
2021-05-23 18:48:07:driver-btm-api.c:247:set_miner_status: ERROR_SOC_INIT
2021-05-23 18:48:07:driver-btm-api.c:176:stop_mining: stop mining: soc init failed!
2021-05-23 18:48:07:driver-btm-api.c:147:killall_hashboard: ****power off hashboard****

skarm

Люди помогите, не могу запустить асик!

2021-05-23 18:48:07:driver-btm-api.c:486:check_chain_conf_same: Config are different, min = 1790, max = 1870, diff is too large.
2021-05-23 18:48:07:auto_adapt.c:273:is_sweep_failed_before: open sweep tag failed
2021-05-23 18:48:07:driver-btm-api.c:247:set_miner_status: ERROR_SOC_INIT
2021-05-23 18:48:07:driver-btm-api.c:176:stop_mining: stop mining: soc init failed!
2021-05-23 18:48:07:driver-btm-api.c:147:killall_hashboard: ****power off hashboard****

Русский: 2021-05-23 18:48:07:драйвер-btm-api.c:486:check_chain_conf_same: Конфигурации разные, min = 1790, max = 1870, разница слишком велика.
2021-05-23 18:48:07:auto_adapt.c:273:is_sweep_failed_before: не удалось открыть тег развертки
2021-05-23 18:48:07:драйвер-btm-api.c:247:set_miner_status: ERROR_SOC_INIT
2021-05-23 18:48:07:драйвер-btm-api.c:176:stop_mining: остановка майнинга: сбой инициализации soc!
2021-05-23 18:48:07:драйвер-btm-api.c:147:killall_hashboard: ****отключение питания hashboard****

Я ж говорю, АСИКи — зло!

FriD89

Пляшущий с бубном

Русский: 2021-05-23 18:48:07:драйвер-btm-api.c:486:check_chain_conf_same: Конфигурации разные, min = 1790, max = 1870, разница слишком велика.
2021-05-23 18:48:07:auto_adapt.c:273:is_sweep_failed_before: не удалось открыть тег развертки
2021-05-23 18:48:07:драйвер-btm-api.c:247:set_miner_status: ERROR_SOC_INIT
2021-05-23 18:48:07:драйвер-btm-api.c:176:stop_mining: остановка майнинга: сбой инициализации soc!
2021-05-23 18:48:07:драйвер-btm-api.c:147:killall_hashboard: ****отключение питания hashboard****

Я ж говорю, АСИКи — зло!

MaDSerg

Бывалый

Numbric

Свой человек

Люди помогите, не могу запустить асик!

2021-05-23 18:48:07:driver-btm-api.c:486:check_chain_conf_same: Config are different, min = 1790, max = 1870, diff is too large.
2021-05-23 18:48:07:auto_adapt.c:273:is_sweep_failed_before: open sweep tag failed
2021-05-23 18:48:07:driver-btm-api.c:247:set_miner_status: ERROR_SOC_INIT
2021-05-23 18:48:07:driver-btm-api.c:176:stop_mining: stop mining: soc init failed!
2021-05-23 18:48:07:driver-btm-api.c:147:killall_hashboard: ****power off hashboard****

FriD89

Пляшущий с бубном

daddizz

Пляшущий с бубном

obelix13

Знающий

Доброго времени суток.
Подскажите кто решил такую проблему на Т17+?

Источник

t17 нет инициализация хэш плат

Demiansikora

Пляшущий с бубном

2021-10-14 05:13:23 driver-btm-api.c:663:init_freq_mode: This is scan-user version
2021-10-14 05:13:23 driver-btm-api.c:2028:bitmain_soc_init: opt_multi_version = 1
2021-10-14 05:13:23 driver-btm-api.c:2029:bitmain_soc_init: opt_bitmain_ab = 1
2021-10-14 05:13:23 driver-btm-api.c:2030:bitmain_soc_init: opt_bitmain_work_mode = 0
2021-10-14 05:13:23 driver-btm-api.c:2031:bitmain_soc_init: Miner compile time: Thu Apr 23 16:29:07 CST 2020 type: Antminer T17
2021-10-14 05:13:23 driver-btm-api.c:2032:bitmain_soc_init: commit version: 1c5be6f 2020-04-20 16:18:14, build by: lol 2020-04-23 16:35:04
2021-10-14 05:13:23 driver-btm-api.c:1844:show_sn: no SN got, please write SN to /nvdata/sn
2021-10-14 05:13:23 driver-btm-api.c:1167:miner_device_init: Detect 256MB control board of XILINX
2021-10-14 05:13:23 driver-btm-api.c:1115:init_fan_parameter: fan_eft : 0 fan_pwm : 0
2021-10-14 05:13:23 thread.c:885:create_read_nonce_reg_thread: create thread
2021-10-14 05:13:29 driver-btm-api.c:1099:init_miner_version: miner ID : 803cad482b10481c
2021-10-14 05:13:29 driver-btm-api.c:1105:init_miner_version: FPGA Version = 0xB013
2021-10-14 05:13:31 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-10-14 05:13:33 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-10-14 05:13:35 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-10-14 05:13:35 driver-btm-api.c:737:get_product_id: product_id[0] = 1
2021-10-14 05:13:35 driver-btm-api.c:737:get_product_id: product_id[1] = 1
2021-10-14 05:13:35 driver-btm-api.c:737:get_product_id: product_id[2] = 1
2021-10-14 05:13:35 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[0] = 1
2021-10-14 05:13:35 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[1] = 1
2021-10-14 05:13:35 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[2] = 1
2021-10-14 05:13:35 driver-btm-api.c:1919:bitmain_board_init: g_ccdly_opt = 1
2021-10-14 05:13:35 driver-btm-api.c:676:_set_project_type: project:2
2021-10-14 05:13:35 driver-btm-api.c:706:_set_project_type: Project type: Antminer T17
2021-10-14 05:13:35 driver-btm-api.c:717:dump_pcb_bom_version: Chain [0] PCB Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:718:dump_pcb_bom_version: Chain [0] BOM Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:717:dump_pcb_bom_version: Chain [1] PCB Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:718:dump_pcb_bom_version: Chain [1] BOM Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:717:dump_pcb_bom_version: Chain [2] PCB Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:718:dump_pcb_bom_version: Chain [2] BOM Version: 0x0100
2021-10-14 05:13:37 driver-btm-api.c:1939:bitmain_board_init: Fan check passed.
2021-10-14 05:13:38 board.c:36:jump_and_app_check_restore_pic: chain[0] PIC jump to app
2021-10-14 05:13:42 board.c:40:jump_and_app_check_restore_pic: Check chain[0] PIC fw version=0xb9
2021-10-14 05:13:43 board.c:36:jump_and_app_check_restore_pic: chain[1] PIC jump to app
2021-10-14 05:13:47 board.c:40:jump_and_app_check_restore_pic: Check chain[1] PIC fw version=0xb9
2021-10-14 05:13:49 board.c:36:jump_and_app_check_restore_pic: chain[2] PIC jump to app
2021-10-14 05:13:52 board.c:40:jump_and_app_check_restore_pic: Check chain[2] PIC fw version=0xb9
2021-10-14 05:13:52 thread.c:880:create_pic_heart_beat_thread: create thread
2021-10-14 05:13:52 power_api.c:55 ower_init: power init .
2021-10-14 05:13:52 driver-btm-api.c:1949:bitmain_board_init: Enter 30s sleep to make sure power release finish.
2021-10-14 05:13:52 power_api.c:46 ower_off: init gpio907
2021-10-14 05:14:24 power_api.c:232:set_iic_power_to_highest_voltage: setting to voltage: 17.00 .
2021-10-14 05:14:30 power_api.c:124:check_voltage_multi: retry time: 0
2021-10-14 05:14:32 power_api.c:86:get_average_voltage: chain[0], voltage is: 21.069404
2021-10-14 05:14:33 power_api.c:86:get_average_voltage: chain[1], voltage is: 20.346885
2021-10-14 05:14:35 power_api.c:86:get_average_voltage: chain[2], voltage is: 19.618242
2021-10-14 05:14:35 power_api.c:97:get_average_voltage: aveage voltage is: 20.344843
2021-10-14 05:14:35 power_api.c:110:check_voltage: target_vol = 17.00, actural_vol = 20.34, more than 1.0v diff.
2021-10-14 05:14:36 power_api.c:124:check_voltage_multi: retry time: 1
2021-10-14 05:14:38 power_api.c:86:get_average_voltage: chain[0], voltage is: 18.687539
2021-10-14 05:14:40 power_api.c:86:get_average_voltage: chain[1], voltage is: 18.105849
2021-10-14 05:14:43 power_api.c:86:get_average_voltage: chain[2], voltage is: 17.064931
2021-10-14 05:14:43 power_api.c:97:get_average_voltage: aveage voltage is: 17.952773
2021-10-14 05:14:43 power_api.c:182:set_iic_power_by_voltage: now set voltage to : 17.000000
2021-10-14 05:14:43 uart.c:80:set_baud: set fpga_baud = 115200, fpga_divider = 26
2021-10-14 05:14:53 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[0]: find 30 asic, times 0
2021-10-14 05:15:03 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[1]: find 30 asic, times 0
2021-10-14 05:15:13 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[2]: find 30 asic, times 0
2021-10-14 05:15:16 driver-btm-api.c:352:set_order_clock: chain[0]: set order clock, stragegy 3 clock_en=0x1
2021-10-14 05:15:16 driver-btm-api.c:352:set_order_clock: chain[1]: set order clock, stragegy 3 clock_en=0x1
2021-10-14 05:15:17 driver-btm-api.c:352:set_order_clock: chain[2]: set order clock, stragegy 3 clock_en=0x1
2021-10-14 05:15:17 driver-hash-chip.c:502:set_clock_delay_control: core_data = 0xb4
2021-10-14 05:15:17 uart.c:80:set_baud: set fpga_baud = 3000000, fpga_divider = 0
2021-10-14 05:15:17 driver-btm-api.c:1693:check_clock_counter: freq 50 clock_counter_limit 6
2021-10-14 05:15:18 uart.c:80:set_baud: set fpga_baud = 115200, fpga_divider = 26
2021-10-14 05:15:18 voltage[0] = 1690
2021-10-14 05:15:18 voltage[1] = 1690
2021-10-14 05:15:18 voltage[2] = 1730
2021-10-14 05:15:18 Voltage are different. Will exit.
2021-10-14 05:15:18 driver-btm-api.c:205:set_miner_status: ERROR_SOC_INIT
2021-10-14 05:15:18 driver-btm-api.c:146:stop_mining: stop mining: soc init failed!
2021-10-14 05:15:18 thread.c:930:cancel_read_nonce_reg_thread: cancel thread
2021-10-14 05:15:18 driver-btm-api.c:131:killall_hashboard: ****power off hashboard****

dyakoff

Бывалый

Не эксперт в асиках, но судя из лога, возможно в этом проблема:

no SN got, please write SN to /nvdata/sn

Fredrik

Свой человек

2021-10-14 05:13:23 driver-btm-api.c:663:init_freq_mode: This is scan-user version
2021-10-14 05:13:23 driver-btm-api.c:2028:bitmain_soc_init: opt_multi_version = 1
2021-10-14 05:13:23 driver-btm-api.c:2029:bitmain_soc_init: opt_bitmain_ab = 1
2021-10-14 05:13:23 driver-btm-api.c:2030:bitmain_soc_init: opt_bitmain_work_mode = 0
2021-10-14 05:13:23 driver-btm-api.c:2031:bitmain_soc_init: Miner compile time: Thu Apr 23 16:29:07 CST 2020 type: Antminer T17
2021-10-14 05:13:23 driver-btm-api.c:2032:bitmain_soc_init: commit version: 1c5be6f 2020-04-20 16:18:14, build by: lol 2020-04-23 16:35:04
2021-10-14 05:13:23 driver-btm-api.c:1844:show_sn: no SN got, please write SN to /nvdata/sn
2021-10-14 05:13:23 driver-btm-api.c:1167:miner_device_init: Detect 256MB control board of XILINX
2021-10-14 05:13:23 driver-btm-api.c:1115:init_fan_parameter: fan_eft : 0 fan_pwm : 0
2021-10-14 05:13:23 thread.c:885:create_read_nonce_reg_thread: create thread
2021-10-14 05:13:29 driver-btm-api.c:1099:init_miner_version: miner ID : 803cad482b10481c
2021-10-14 05:13:29 driver-btm-api.c:1105:init_miner_version: FPGA Version = 0xB013
2021-10-14 05:13:31 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-10-14 05:13:33 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-10-14 05:13:35 eeprom.c:425:check_pattern_test_level: invalid pattern test result. ignore
2021-10-14 05:13:35 driver-btm-api.c:737:get_product_id: product_id[0] = 1
2021-10-14 05:13:35 driver-btm-api.c:737:get_product_id: product_id[1] = 1
2021-10-14 05:13:35 driver-btm-api.c:737:get_product_id: product_id[2] = 1
2021-10-14 05:13:35 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[0] = 1
2021-10-14 05:13:35 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[1] = 1
2021-10-14 05:13:35 driver-btm-api.c:1666:get_ccdly_opt: ccdly_opt[2] = 1
2021-10-14 05:13:35 driver-btm-api.c:1919:bitmain_board_init: g_ccdly_opt = 1
2021-10-14 05:13:35 driver-btm-api.c:676:_set_project_type: project:2
2021-10-14 05:13:35 driver-btm-api.c:706:_set_project_type: Project type: Antminer T17
2021-10-14 05:13:35 driver-btm-api.c:717:dump_pcb_bom_version: Chain [0] PCB Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:718:dump_pcb_bom_version: Chain [0] BOM Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:717:dump_pcb_bom_version: Chain [1] PCB Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:718:dump_pcb_bom_version: Chain [1] BOM Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:717:dump_pcb_bom_version: Chain [2] PCB Version: 0x0100
2021-10-14 05:13:35 driver-btm-api.c:718:dump_pcb_bom_version: Chain [2] BOM Version: 0x0100
2021-10-14 05:13:37 driver-btm-api.c:1939:bitmain_board_init: Fan check passed.
2021-10-14 05:13:38 board.c:36:jump_and_app_check_restore_pic: chain[0] PIC jump to app
2021-10-14 05:13:42 board.c:40:jump_and_app_check_restore_pic: Check chain[0] PIC fw version=0xb9
2021-10-14 05:13:43 board.c:36:jump_and_app_check_restore_pic: chain[1] PIC jump to app
2021-10-14 05:13:47 board.c:40:jump_and_app_check_restore_pic: Check chain[1] PIC fw version=0xb9
2021-10-14 05:13:49 board.c:36:jump_and_app_check_restore_pic: chain[2] PIC jump to app
2021-10-14 05:13:52 board.c:40:jump_and_app_check_restore_pic: Check chain[2] PIC fw version=0xb9
2021-10-14 05:13:52 thread.c:880:create_pic_heart_beat_thread: create thread
2021-10-14 05:13:52 power_api.c:55 ower_init: power init .
2021-10-14 05:13:52 driver-btm-api.c:1949:bitmain_board_init: Enter 30s sleep to make sure power release finish.
2021-10-14 05:13:52 power_api.c:46 ower_off: init gpio907
2021-10-14 05:14:24 power_api.c:232:set_iic_power_to_highest_voltage: setting to voltage: 17.00 .
2021-10-14 05:14:30 power_api.c:124:check_voltage_multi: retry time: 0
2021-10-14 05:14:32 power_api.c:86:get_average_voltage: chain[0], voltage is: 21.069404
2021-10-14 05:14:33 power_api.c:86:get_average_voltage: chain[1], voltage is: 20.346885
2021-10-14 05:14:35 power_api.c:86:get_average_voltage: chain[2], voltage is: 19.618242
2021-10-14 05:14:35 power_api.c:97:get_average_voltage: aveage voltage is: 20.344843
2021-10-14 05:14:35 power_api.c:110:check_voltage: target_vol = 17.00, actural_vol = 20.34, more than 1.0v diff.
2021-10-14 05:14:36 power_api.c:124:check_voltage_multi: retry time: 1
2021-10-14 05:14:38 power_api.c:86:get_average_voltage: chain[0], voltage is: 18.687539
2021-10-14 05:14:40 power_api.c:86:get_average_voltage: chain[1], voltage is: 18.105849
2021-10-14 05:14:43 power_api.c:86:get_average_voltage: chain[2], voltage is: 17.064931
2021-10-14 05:14:43 power_api.c:97:get_average_voltage: aveage voltage is: 17.952773
2021-10-14 05:14:43 power_api.c:182:set_iic_power_by_voltage: now set voltage to : 17.000000
2021-10-14 05:14:43 uart.c:80:set_baud: set fpga_baud = 115200, fpga_divider = 26
2021-10-14 05:14:53 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[0]: find 30 asic, times 0
2021-10-14 05:15:03 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[1]: find 30 asic, times 0
2021-10-14 05:15:13 driver-btm-api.c:1042:check_asic_number_with_power_on: Chain[2]: find 30 asic, times 0
2021-10-14 05:15:16 driver-btm-api.c:352:set_order_clock: chain[0]: set order clock, stragegy 3 clock_en=0x1
2021-10-14 05:15:16 driver-btm-api.c:352:set_order_clock: chain[1]: set order clock, stragegy 3 clock_en=0x1
2021-10-14 05:15:17 driver-btm-api.c:352:set_order_clock: chain[2]: set order clock, stragegy 3 clock_en=0x1
2021-10-14 05:15:17 driver-hash-chip.c:502:set_clock_delay_control: core_data = 0xb4
2021-10-14 05:15:17 uart.c:80:set_baud: set fpga_baud = 3000000, fpga_divider = 0
2021-10-14 05:15:17 driver-btm-api.c:1693:check_clock_counter: freq 50 clock_counter_limit 6
2021-10-14 05:15:18 uart.c:80:set_baud: set fpga_baud = 115200, fpga_divider = 26
2021-10-14 05:15:18 voltage[0] = 1690
2021-10-14 05:15:18 voltage[1] = 1690
2021-10-14 05:15:18 voltage[2] = 1730
2021-10-14 05:15:18 Voltage are different. Will exit.
2021-10-14 05:15:18 driver-btm-api.c:205:set_miner_status: ERROR_SOC_INIT
2021-10-14 05:15:18 driver-btm-api.c:146:stop_mining: stop mining: soc init failed!
2021-10-14 05:15:18 thread.c:930:cancel_read_nonce_reg_thread: cancel thread
2021-10-14 05:15:18 driver-btm-api.c:131:killall_hashboard: ****power off hashboard****

Demiansikora

Пляшущий с бубном

sagri

Свой человек

это похоже частая проблема 17 серии. ERROR_SOC_INIT
2021-10-14 05:15:18 Voltage are different. Will exit.

или БП накрывается или в ремонт

попробуй по одной плате подключать.
как вариант нашел что возможно проблема в EEPROM на хэш плате.

mrcredovz

Бывалый

target_vol = 17.00, actural_vol = 20.34, more than 1.0v diff.

Вольтаж не совпадает оценочный и актуальный. Должно быть не более 0.5 разницы. Попробуй почистить асик, подтянуть клеммы, перезагрузи несколько раз, прошей последней прошивкой.

Источник

Коды ошибок асик майнера WhatsMiner

0 ErrSucc ОК ОК — обычный
21 ErrNotPlugged 1 или более хеш-плат не обнаружены Сигнал Hashboard PLUG не обнаружен Номер обнаруженной платы питания, если их более одной, разделенные пробелами 1. Проверьте правильность подключения кабеля SPI (по сравнению с обычной машиной) и снова подключите кабель. 2. Замените плату управления. 3. Замените проблемную доску хешрейта (переделайте доску головоломки).
22 ErrPsuI2cFail Аномальная связь по управлению питанием Неправильная связь I2C источника питания — 1. Заменить блок питания. 2. Замените плату управления.
23 ErrEncoreAllFail Все хэш-платы не могут быть включены SPI недоступен для всех плат хешрейта — 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Заменить блок питания. 3. Замените плату управления. 4. Отремонтируйте всю машину.
24 ErrEncoreFail Некоторые платы не включаются SPI недоступен на некоторых хэш-досках Номер хэшборда, для которого произошел сбой связи по SPI, если их несколько, разделенных пробелами 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Заменить блок питания. 3. Замените плату управления. 4. Замените проблемную хеш-доску (переделайте доску-головоломку).
25 ErrSetPllFail Не удалось поднять частоту хэш-платы Не удалось поднять частоту хэш-платы Номер хэшборда: частота ошибок 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Заменить блок питания. 3. Замените плату управления. 4. Замените проблемную хеш-доску (переделайте доску-головоломку).
26 ErrSetVolFail Не удалось установить напряжение Не удалось установить напряжение Номер хэшборда: 1/2 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Заменить блок питания. 3. Замените плату управления. 4. Заменить проблемную хеш-доску (присоединиться)
27 ErrBistFail Тест чипа BIST не пройден Тест чипа BIST не пройден Номер хэшборда: 1/2 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Заменить проблемную хеш-доску (присоединиться к плате)
28 ErrSpiFail Ненормальная связь платы хешрейта не может быть автоматически восстановлена ??во время работы Ненормальное соединение SPI платы хешрейта не может быть автоматически восстановлено во время работы Номер хэшборда 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Замените проблемную хеш-доску (переделайте доску-головоломку)
29 ErrI2cFail Ненормальная связь по питанию во время работы не может быть восстановлена ??автоматически Связь I2C с ненормальным источником питания не может быть автоматически восстановлена ??во время работы — 1. Заменить блок питания. 2. Замените плату управления.
30 ErrNetwork Подключение к майнинговому пулу прервано Подключение к майнинговому пулу прервано — Если эта проблема возникает на большом количестве или на всех майнинговых машинах с одним и тем же коммутатором: 1. Проверьте правильность настроек пула для майнинга. 2. Проверьте конфигурацию сетевой среды (например, конфигурацию DHCP, конфигурацию DNS, порт и т. Д.). Если проблемы возникают только на одной или нескольких машинах для майнинга: 1. Проверьте правильность настроек пула для майнинга. 2. Проверить подключения к сетевому порту майнера. 3. Замените сетевой кабель на работающую майнинговую машину. 4. Замените плату управления.
31 ErrBadChip Повреждение отдельных микросхем, что приводит к искусственно завышенной вычислительной мощности Повреждение отдельных микросхем, что приводит к искусственно завышенной вычислительной мощности Номер поврежденной микросхемы: номер хеш-платы, если их более одной, разделенные пробелами В ремонт
32 ErrOverheat Hashboard перегрелся Hashboard перегрелся Номер хэшборда 1. Проверьте, вращаются ли передний и задний вентиляторы, если они не вращаются, сначала замените вентиляторы, а затем замените плату управления / блок питания. 2. Убедитесь, что направление ветра спереди и сзади согласовано, согласуется ли оно с другими машинами, если нет, измените направление вентилятора. 3. Если температура воздуха на входе горной машины превышает 40 градусов, необходимо улучшить температурную среду в шахте. 4. Если определенная плата хешрейта часто перегревается, вы можете заменить проблемную плату хешрейта (переделайте головоломку).
33 ErrInvTemp Невозможно прочитать температуру чипа Невозможно прочитать температуру чипа Номер хэшборда 1. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 2. Заменить блок питания. 3. Замените плату управления. 4. Замените проблемную хеш-доску (переделайте доску-головоломку).
34 ErrMisPlugged Неправильное подключение кабеля связи платы управления Ненормальное подключение кабеля SPI платы управления Номер хэшборда 1. Проверьте, совместим ли метод (последовательность) подключения кабеля SPI хэш-платы с другими машинами той же модели. 2. Замените плату управления.
35 ErrPsuFail Аномальный источник питания Аномальный источник питания 1. Обратите внимание на то, что если нет явного отклонения от нормы вычислительной мощности всей машины (не отключается плата), то перезагрузить 2. Убедитесь, что винты на обоих концах клеммы питания и соединения кабеля SPI не ослаблены. 3. Заменить блок питания.
36 ErrInvCorenum Некоторые чипы не работают должным образом Количество хороших фишек ненормальное Номер хэшборда: номер чипа 1. Обратите внимание на то, что если нет явного отклонения от нормы вычислительной мощности всей машины (не отключается плата), то перезагрузить 2. Перезапустите майнер, чтобы увидеть, появляется ли по-прежнему та же ошибка. 3. Замените проблемную хеш-плату.
37 ErrInvVidtype Тип платы управления / версия прошивки / количество микросхем не совпадает Тип платы управления / версия прошивки / количество микросхем не совпадает vidtype, minertype, subtype, chipnum После накопления нескольких единиц (> 10) обратитесь в ремонт.
38 ErrBadRearChips Наконец, у некоторых чипов низкая вычислительная мощность. Последние несколько уровней чипов имеют низкую вычислительную мощность В ремонт
39 ErrInvTuneParam Аномальные параметры старения Напряжение начальной частоты старения неверно В ремонт

Errcode Scope of application Explanation Troubleshooting steps
0 Whole miner Normal Normal
21 hashboard one or more hashboards can’t be detected 1. check and see whether the SPI cables are firmly and correctly connected (compared the connection of cables with working miners), reconnect the SPI cables, don’t change sequence of connection
2. replace control board with other well functional one
3. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
22 Whole miner PSU communication is abnormal 1. replace PSU with other well functional one
2. replace control board with other well functional one
23 Whole miner All hashboards can’t be powered up 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace PSU with other well functional one
3. replace control board with other well functional one
4. whole miner should be returned for repair
24 hashboard one or more hashboards can’t be powered up 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace PSU with other well functional one
3. replace control board with other well functional one
4. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
25 hashboard frequency increase of hashboards fails 1. check hashrate of the miner, if there is nothing obviously abnormal (no missing hashboard), no action should be taken
2. check and see whether screws on the PSU side and SPI connection are loose
3. replace PSU with other well functional one
4. replace control board with other well functional one
5. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
26 hashboard voltage setting fails 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace PSU with other well functional one
3. replace control board with other well functional one
4. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
27 hashboard chip BIST test fails 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
28 hashboard abnormal communication of hashboard, it can’t be automatically recovered when running 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
29 Whole miner abnormal communication of PSU can’t be automatically recovered when running 1. replace PSU with other well functional one
2. replace control board with other well functional one
30 Whole miner pool disconnect If the problem occurs in a large number of miners or all of the mines under the same switch:
1. please first check whether pool setting is correct
2. then check network configuration (such as DHCP configuration, DNS configuration, ports, etc.)
If the problem occurs in only one or just a small number of miners under the same switch:
1. please first check whether pool setting is correct
2. then check whether network cable is firmly connected
3. replace network cable with other one from other well working miner
4. replace control board with other well functional one
31 hashboard damage of some individual chip causes inflated high hashrate of the miner no action should be taken
32 hashboard hashboard overheat 1. check and see whether both fans are spinning, if not, replace fan with other functional one, if still not, then replace control board or PSU
2. check and see whether wind direction of both fans are the same, whether wind direction are the same with other miners, if not, exchange fans
3. meter the inlet temperature of the miner, if above 40 °C, cooling system of the mining farm should be improved
4. if some hashboard is overheated frequently, that hashboard should be replaced (returned for repair)
33 hashboard chip temperature can’t be read 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace PSU with other well functional one
3. replace control board with other well functional one
4. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
34   cables of control board is connected incorrectly 1. check hashrate of the miner, if there is nothing obviously abnormal (no missing hashboard), no action should be taken
2. check whether hashboard SPI cables are conneted in the same way (sequence) as other miners of same model
3. replace control board with other well functional one
35 hashboard PSU voltage is too low 1. check hashrate of the miner, if there is nothing obviously abnormal (no missing hashboard), no action should be taken
2.check and see whether screws on the PSU side and SPI connection is loose
3. replace PSU with other well functional one
36 hashboard working or some chips is abnormal 1. check hashrate of the miner, if there is nothing obviously abnormal (no missing hashboard), no action should be taken
2. reboot the miner to see whether the same error is given
3. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
37 Whole miner mismatch of control board version/firmware version/quantity of chips if there are more than 10 miners with same error, please contact engineers
38 hashboard low hashrate of last few chips no action should be taken
39 hashboard testing parameter is abnormal no action should be taken
40 hashboard PSU load is insufficient 1. check and see whether screws on the PSU side and SPI connection are loose
2. replace PSU with other well functional one
3. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
41 hashboard startup voltage of PSU is too low 1. check hashrate of the miner, if there is nothing obviously abnormal (no missing hashboard), no action should be taken
2. check and see whether screws on the PSU side and SPI connection are loose
3. replace PSU with other well functional one
4. replace control board with other well functional one
42 hashboard implementation of plan B fails when hashboard frequency increases 1. check hashrate of the miner, if there is nothing obviously abnormal (no missing hashboard), no action should be taken
2. check and see whether screws on the PSU side and SPI connection are loose
3. replace PSU with other well functional one
4. replace control board with other well functional one
5. replace defective hashboard(s) with other well functional one(s) (defective one should be returned for repair/replacement)
       
      Attention:
1. The miner should be powered up again to see whether it is back to normal after every step is taken
2. If the problem is not solve after replacement the part, the part should go back to its original unit
3. Error code and brief description of the problem should be attached to the hashboard that is confirmed defective and that will be returned for repair

Error

code

Reason Processing method

110 Fanin detect speed error

Check whether the fan connection is normal,

or replace the power supply, or replace the

fan

111 Fanout detect speed error

Check whether the fan connection is normal,

or replace the power supply, or replace the

fan

130 Fanin speed error

Check whether the fan connection is normal,

or replace the power supply, or replace the

fan

131 Fanout speed error

Check whether the fan connection is normal,

or replace the power supply, or replace the

fan

140 Fan speed is too high Please check the environment temperature

200

Power probing error, no

power found

Detecting power output wiring, updating the

latest firmware, or replacing power supply

201

Power supply and

configuration file

mismatch

Replace the correct PSU

203 Power protecting Please check the environment temperature

204 Power current protecting Please check the environment temperature

205 Power current error Inspection of power supply in power grid

206 Power input voltage is low

Improve power supply conditions and input

voltage

207

Power input current

protecting

Improve power supply conditions and input

voltage

210 Power error status Check power failure code

213

Power input voltage and

current do not match the

power

Replace the PSU

233

Power output over

temperature protection

Please check the environment temperature

234

Power output over

temperature protection

Please check the environment temperature

235

Power output over

temperature protection

Please check the environment temperature

236

Overcurrent Protection of

Power Output

Please check the environment temperature,

check copper row screw

237

Overcurrent Protection of

Power Output

Please check the environment temperature,

check copper row screw

238

Overcurrent Protection of

Power Output

Please check the environment temperature,

check copper row screw

239

Overvoltage Protection of

Power Output

Inspection of power supply in power grid

240

Low Voltage Protection for

Power Output

Inspection of power supply in power grid

241

Power output current

imbalance

Replace the power

243

Over-temperature

Protection for Power Input

Please check the environment temperature

244

Over-temperature

Protection for Power Input

Please check the environment temperature

245

Over-temperature

Protection for Power Input

Please check the environment temperature

246

Overcurrent Protection for

Power Input

Please check the environment temperature

247

Overcurrent Protection for

Power Input

Please check the environment temperature

248

Overvoltage Protection for

Power Input

Inspection of input voltage in power grid

249

Overvoltage Protection for

Power Input

Inspection of input voltage in power grid

250

Undervoltage Protection

for Power Input

Inspection of input voltage in power grid

251

Undervoltage Protection

for Power Input

Inspection of input voltage in power grid

253 Power Fan Error Replace the PSU

254 Power Fan Error Replace the PSU

255

Protection of over power

output

Please check the environment temperature

256

Protection of over power

output

Please check the environment temperature

257

Input over current

protection of power supply

primary side

Try to power off and restart, no effect to

replace the power supply

263

Power communication

warning

Check whether the screws of the control

board are locked

264 Power communication error

Check whether the screws of the control

board are locked

267 Power watchdog protection Contact the technician in time

268

Power output over-current

protection

Check the ambient temperature, check the

copper bar screw

269

Power input over-current

protection

Improve power supply conditions and input

voltage

270

Power input over-voltage

protection

Inspection of input voltage in power grid

271

Power input under-voltage

protection

Inspection of input voltage in power grid

272

Warning of excessive power

output of power supply

Please check the environment temperature

273

Power input power too high

warning

Please check the environment temperature

274 Power fan warning

Check if the power fan is blocked and may

need to be replaced

275

Power over temperature

warning

Please check the environment temperature

300

SM0 temperature sensor

detection error

Check the connection of the hashboard

301

SM1 temperature sensor

detection error

Check the connection of the hashboard

302

SM2 temperature sensor

detection error

Check the connection of the hashboard

320

SM0 temperature reading

error

Check whether the control board screw is

locked properly, check the connection board

and the arrangement contact

321

SM1 temperature reading

error

Check whether the control board screw is

locked properly, check the connection board

and the arrangement contact

322

SM2 temperature reading

error

Check whether the control board screw is

locked properly, check the connection board

and the arrangement contact

329

Control board temperature

sensor communication error

Replace the power supply

350 SM0 temperature protecting Please check the environment temperature

351 SM1 temperature protecting Please check the environment temperature

352 SM2 temperature protecting Please check the environment temperature

410 SM0 detect eeprom error Check adapter board and wiring contact

411 SM1 detect eeprom error Check adapter board and wiring contact

412 SM2 detect eeprom error Check adapter board and wiring contact

420 SM0 parser eeprom error Contact the technician in time

421 SM1 parser eeprom error Contact the technician in time

422 SM2 parser eeprom error Contact the technician in time

430 SM0 chip bin type error Contact the technician in time

431 SM1 chip bin type error Contact the technician in time

432 SM2 chip bin type error Contact the technician in time

440

SM0 eeprom chip num X

error

Contact the technician in time

441

SM1 eeprom chip num X

error

Contact the technician in time

442

SM2 eeprom chip num X

error

Contact the technician in time

510 SM0 miner type error

The version and type of hashboard are

inconsistent, replace the correct hashboard

511 SM1 miner type error

The version and type of hashboard are

inconsistent, replace the correct hashboard

512 SM2 miner type error

The version and type of hashboard are

inconsistent, replace the correct hashboard

530 SM0 not found

Check the connection and arrangement of the

adapter board, or replace the control

board, check whether the hash board

connector is empty welded

531 SM1 not found

Check the connection and arrangement of the

adapter board, or replace the control

board, check whether the hash board

connector is empty welded

532 SM2 not found

Check the connection and arrangement of the

adapter board, or replace the control

board, check whether the hash board

connector is empty welded

540 SM0 reading chip id error

Check adapter board and wiring contact,

Clean the dust on the hashboard

541 SM1 reading chip id error

Check adapter board and wiring contact,

Clean the dust on the hashboard

542 SM2 reading chip id error

Check adapter board and wiring contact,

Clean the dust on the hashboard

550 SM0 have bad chips Replacement of bad chips

551 SM1 have bad chips Replacement of bad chips

552 SM2 have bad chips Replacement of bad chips

560 SM0 loss balance

Plug in the adapter plate, and then screw

in the power connection hashboard again

561 SM1 loss balance

Plug in the adapter plate, and then screw

in the power connection hashboard again

562 SM2 loss balance

Plug in the adapter plate, and then screw

in the power connection hashboard again

600

Environment temperature is

high

Please check the environment temperature

610

If the ambient temperature

is too high in high

performance mode, return

to normal mode

Check the ambient temperature, high

performance mode needs to be controlled

below 30 ?

710

Control board rebooted as

exception

Updating the latest firmware.Check whether

the control board screw is locked properly

800 cgminer checksum error Re-upgrade firmware

801

system-monitor checksum

error

Re-upgrade firmware

802

remote-daemon checksum

error

Re-upgrade firmware

2010 All pools are disable Please check the network or pools configure

2020 Pool0 connect failed Please check the network or pools configure

2021 Pool1 connect failed Please check the network or pools configure

2022 Pool2 connect failed Please check the network or pools configure

2030

High rejection rate of

pool

Please check the network or pools

configure.Setting of mining currency

2040

The pool does not support

the asicboost mode

Check pool configuration

5110 SM0 Frequency Up Timeout reboot

5111 SM1 Frequency Up Timeout reboot

5112 SM2 Frequency Up Timeout reboot

8410

Software version error

(M2x miner with M3x

firmware, or M3x with M2x

firmware).

Upgrade to the correct firmware version

PSU

Error

code

Reason processing method

0x0001 Input undervoltage Check the power supply

0x0002

Temperature sampling over

temperature protection of

power radiator

Power on again after 10 minutes of power

failure. If it occurs again, replace the

power supply

0x0004

Temperature sampling over

temperature protection of

power radiator

Power on again after 10 minutes of power

failure. If it occurs again, replace the

power supply

0x0008

Over temperature

protection of

environmental temperature

sampling in power supply

Power on again after 10 minutes of power

failure. If it occurs again, replace the

power supply

0x0010 Primary side over current

Power on again after 10 minutes of power

failure. If it occurs again, replace the

power supply

0x0020 Output undervoltage Check the power supply

0x0040

Output over current

(continuous load 320A for

more than 2S)

Tighten the copper bar screw again

0x0080 Primary side over current

Power on again after 10 minutes of power

failure. If it occurs again, replace the

power supply

0x0100

Single circuit overcurrent

(protection point 120a)

Check the PSU

0x0200

Single circuit overcurrent

(protection point 120a)

Check the PSU

0x0400

Single circuit overcurrent

(protection point 120a)

Check the PSU

0x0800 Fan failure Replace the PSU

0x1000

Output over current

(continuous load of 310A

for more than 5min)

Check the PSU

0x2000

Output over current

(continuous load 295A for

more than 10min)

Check the PS

Error code Reason Processing method 110 Fanin detect speed error Check whether the fan connection is normal, or replace the power supply, or replace the fan 111 Fanout detect speed error Check whether the fan connection is normal, or replace the power supply, or replace the fan 130 Fanin speed error Check whether the fan connection is normal, or replace the power supply, or replace the fan 131 Fanout speed error Check whether the fan connection is normal, or replace the power supply, or replace the fan 140 Fan speed is too high Please check the environment temperature 200 Power probing error, no power found Detecting power output wiring, updating the latest firmware, or replacing power supply 201 Power supply and configuration file mismatch Replace the correct PSU 203 Power protecting Please check the environment temperature 204 Power current protecting Please check the environment temperature 205 Power current error Inspection of power supply in power grid 206 Power input voltage is low Improve power supply conditions and input voltage 207 Power input current protecting Improve power supply conditions and input voltage 210 Power error status Check power failure code 213 Power input voltage and current do not match the power Replace the PSU 233 Power output over temperature protection Please check the environment temperature 234 Power output over temperature protection Please check the environment temperature 235 Power output over temperature protection Please check the environment temperature 236 Overcurrent Protection of Power Output Please check the environment temperature, check copper row screw 237 Overcurrent Protection of Power Output Please check the environment temperature, check copper row screw 238 Overcurrent Protection of Power Output Please check the environment temperature, check copper row screw 239 Overvoltage Protection of Power Output Inspection of power supply in power grid 240 Low Voltage Protection for Power Output Inspection of power supply in power grid 241 Power output current imbalance Replace the power 243 Over-temperature Protection for Power Input Please check the environment temperature 244 Over-temperature Protection for Power Input Please check the environment temperature 245 Over-temperature Protection for Power Input Please check the environment temperature 246 Overcurrent Protection for Power Input Please check the environment temperature 247 Overcurrent Protection for Power Input Please check the environment temperature 248 Overvoltage Protection for Power Input Inspection of input voltage in power grid 249 Overvoltage Protection for Power Input Inspection of input voltage in power grid 250 Undervoltage Protection for Power Input Inspection of input voltage in power grid 251 Undervoltage Protection for Power Input Inspection of input voltage in power grid 253 Power Fan Error Replace the PSU 254 Power Fan Error Replace the PSU 255 Protection of over power output Please check the environment temperature 256 Protection of over power output Please check the environment temperature 257 Input over current protection of power supply primary side Try to power off and restart, no effect to replace the power supply 263 Power communication warning Check whether the screws of the control board are locked 264 Power communication error Check whether the screws of the control board are locked 267 Power watchdog protection Contact the technician in time 268 Power output over-current protection Check the ambient temperature, check the copper bar screw 269 Power input over-current protection Improve power supply conditions and input voltage 270 Power input over-voltage protection Inspection of input voltage in power grid 271 Power input under-voltage protection Inspection of input voltage in power grid 272 Warning of excessive power output of power supply Please check the environment temperature 273 Power input power too high warning Please check the environment temperature 274 Power fan warning Check if the power fan is blocked and may need to be replaced 275 Power over temperature warning Please check the environment temperature 300 SM0 temperature sensor detection error Check the connection of the hashboard 301 SM1 temperature sensor detection error Check the connection of the hashboard 302 SM2 temperature sensor detection error Check the connection of the hashboard 320 SM0 temperature reading error Check whether the control board screw is locked properly, check the connection board and the arrangement contact 321 SM1 temperature reading error Check whether the control board screw is locked properly, check the connection board and the arrangement contact 322 SM2 temperature reading error Check whether the control board screw is locked properly, check the connection board and the arrangement contact 329 Control board temperature sensor communication error Replace the power supply 350 SM0 temperature protecting Please check the environment temperature 351 SM1 temperature protecting Please check the environment temperature 352 SM2 temperature protecting Please check the environment temperature 410 SM0 detect eeprom error Check adapter board and wiring contact 411 SM1 detect eeprom error Check adapter board and wiring contact 412 SM2 detect eeprom error Check adapter board and wiring contact 420 SM0 parser eeprom error Contact the technician in time 421 SM1 parser eeprom error Contact the technician in time 422 SM2 parser eeprom error Contact the technician in time 430 SM0 chip bin type error Contact the technician in time 431 SM1 chip bin type error Contact the technician in time 432 SM2 chip bin type error Contact the technician in time 440 SM0 eeprom chip num X error Contact the technician in time 441 SM1 eeprom chip num X error Contact the technician in time 442 SM2 eeprom chip num X error Contact the technician in time 510 SM0 miner type error The version and type of hashboard are inconsistent, replace the correct hashboard 511 SM1 miner type error The version and type of hashboard are inconsistent, replace the correct hashboard 512 SM2 miner type error The version and type of hashboard are inconsistent, replace the correct hashboard 530 SM0 not found Check the connection and arrangement of the adapter board, or replace the control board, check whether the hash board connector is empty welded 531 SM1 not found Check the connection and arrangement of the adapter board, or replace the control board, check whether the hash board connector is empty welded 532 SM2 not found Check the connection and arrangement of the adapter board, or replace the control board, check whether the hash board connector is empty welded 540 SM0 reading chip id error Check adapter board and wiring contact, Clean the dust on the hashboard 541 SM1 reading chip id error Check adapter board and wiring contact, Clean the dust on the hashboard 542 SM2 reading chip id error Check adapter board and wiring contact, Clean the dust on the hashboard 550 SM0 have bad chips Replacement of bad chips 551 SM1 have bad chips Replacement of bad chips 552 SM2 have bad chips Replacement of bad chips 560 SM0 loss balance Plug in the adapter plate, and then screw in the power connection hashboard again 561 SM1 loss balance Plug in the adapter plate, and then screw in the power connection hashboard again 562 SM2 loss balance Plug in the adapter plate, and then screw in the power connection hashboard again 600 Environment temperature is high Please check the environment temperature 610 If the ambient temperature is too high in high performance mode, return to normal mode Check the ambient temperature, high performance mode needs to be controlled below 30 ℃ 710 Control board rebooted as exception Updating the latest firmware.Check whether the control board screw is locked properly 800 cgminer checksum error Re-upgrade firmware 801 system-monitor checksum error Re-upgrade firmware 802 remote-daemon checksum error Re-upgrade firmware 2010 All pools are disable Please check the network or pools configure 2020 Pool0 connect failed Please check the network or pools configure 2021 Pool1 connect failed Please check the network or pools configure 2022 Pool2 connect failed Please check the network or pools configure 2030 High rejection rate of pool Please check the network or pools configure.Setting of mining currency 2040 The pool does not support the asicboost mode Check pool configuration 5110 SM0 Frequency Up Timeout reboot 5111 SM1 Frequency Up Timeout reboot 5112 SM2 Frequency Up Timeout reboot 8410 Software version error (M2x miner with M3x firmware, or M3x with M2x firmware). Upgrade to the correct firmware version PSU Error code Reason processing method 0x0001 Input undervoltage Check the power supply 0x0002 Temperature sampling over temperature protection of power radiator Power on again after 10 minutes of power failure. If it occurs again, replace the power supply 0x0004 Temperature sampling over temperature protection of power radiator Power on again after 10 minutes of power failure. If it occurs again, replace the power supply 0x0008 Over temperature protection of environmental temperature sampling in power supply Power on again after 10 minutes of power failure. If it occurs again, replace the power supply 0x0010 Primary side over current Power on again after 10 minutes of power failure. If it occurs again, replace the power supply 0x0020 Output undervoltage Check the power supply 0x0040 Output over current (continuous load 320A for more than 2S) Tighten the copper bar screw again 0x0080 Primary side over current Power on again after 10 minutes of power failure. If it occurs again, replace the power supply 0x0100 Single circuit overcurrent (protection point 120a) Check the PSU 0x0200 Single circuit overcurrent (protection point 120a) Check the PSU 0x0400 Single circuit overcurrent (protection point 120a) Check the PSU 0x0800 Fan failure Replace the PSU 0x1000 Output over current (continuous load of 310A for more than 5min) Check the PSU 0x2000 Output over current (continuous load 295A for more than 10min) Check the PS

#!/hive/sbin/bash # # Copyright (C) 2017 Hiveon Holding LTD # Distributed under Business Source License 1.1 # License information can be found in the LICENSE.txt file or at https://github.com/minershive/hiveos-asic/blob/master/LICENSE.txt # # Linted by shellcheck 0.7.0 (100%) # # shellcheck disable=SC2034 readonly script_mission=Client for ASICs: Routine controller readonly script_version=2.5.8 readonly script_basename=«${0##*/}« # readonly script_DEBUG=«${script_DEBUG:-0}« # use value from env if exists # !!! bash strict mode, no unbound variables set -o nounset # functions function print_script_usage { (( script_DEBUG )) && debugcho # code echo -e «Usage: ${CYAN-}${script_basename} [log [all]]${NOCOLOR-}« echo echo -e « ${WHITE-}log${NOCOLOR-} show only errors/warnings from log and exit« echo -e « ${WHITE-}log all${NOCOLOR-} show *all* last $log_lines_to_tail lines from log and exit« echo } function parse_arguments { (( script_DEBUG )) && debugcho «$@« # args local -r argument=«${1-}« local -r option=«${2-}« # code case «$argument« in log) print_script_version print_last_lines_from_own_log «$option« # shellcheck disable=SC2154 # bc defined in the library exit $(( exitcode_OK )) ;; ) : do nothing special ;; -h | —help) print_script_version print_script_usage exit $(( exitcode_OK )) ;; *) print_script_version print_script_usage # shellcheck disable=SC2154 # bc defined in the library exit $(( exitcode_ERROR_IN_ARGUMENTS )) ;; esac } function is_https_allowed { # code [[ -f «$https_semaphore_flag_FILE« ]] } function grab_exit_code_to_flag { local -r -i incoming_exitcode=«$?« # must be the first command in the function to appropriately catch the exit code # # Usage: grab_exit_code_to_flag ‘variable_by_ref’ # # args local -r -n variable_by_ref=«$1« # code if (( incoming_exitcode == 0 )); then variable_by_ref=1 else # shellcheck disable=SC2034 # bc by ref variable_by_ref=0 fi return «$incoming_exitcode« # pass on the exit code (let’s be completely exitcode-transparent like in pipes) } function get_curl_cmdline { if (( is_https_allowed_FLAG )); then printf %s «curl —cacert ${ca_cert_FILE} « else printf %s «curl —insecure « fi } function initialize_dictionaries { (( script_DEBUG )) && debugcho # local consts # assembling regexes for various date formats # named as strftime() conversion specifier characters local -r Y=[12][0-9]{3} m=[01][0-9] d=[0123][0-9] e=[ 123][0-9] # %e: space padded month’s day local -r a=(Mon|Tue|Wed|Thu|Fri|Sat|Sun) b=(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) local -r H=[012][0-9] M=[0-5][0-9] S=[0-5][0-9] local -r F=«$Y$m$d« T=«$H:$M:$S« # shellcheck disable=SC2034 local -r z=[+-][01][0-9]{3} # %z: +hhmm numeric time zone (e.g., -0400) local -r Z=«[A-Z][A-Za-z]*« # %Z: alphabetic time zone abbreviation (e.g., EDT) # global const hashtables # unsupported formats (yet): # # ISO_8601 2020-04-03T05:38:26 # RFC 3339 2020-04-03T05:38:26.123456-0000 # RFC 2822 Fri, 03 Apr 2020 05:38:26 GMT # Fri, 03 Apr 2020 05:38:26.123456 -0000 declare -r -A -g date_formats_dictionary=( [list_by_incidence]=ISO_8601_old perl syslog BusyBox [ISO_8601_old.RE]=«^ ?[?$F $T]?« # 2020-01-18 05:08:13 (19 chars) # [2020-01-18 05:08:13] (21 chars) note: a brand new timestamp format found in watchdog.log on L3+ # [2020-01-18 05:08:13] (22 chars) note: also with a leading whitespace [ISO_8601_old.pattern]=F T [perl.RE]=«^$a $b $e $T $Y« # Sun Jan 6 21:29:57 2020 (24 chars) [perl.pattern]=a b e T Y [syslog.RE]=«^$b $e $T« # Apr 3 20:44:01 (15 chars) [syslog.pattern]=b e T [BusyBox.RE]=«^$a $b $e $T $Z $Y« # Fri Apr 3 07:29:28 Europe 2020 (31 char) [BusyBox.pattern]=a b e T Z Y ) # in use in: split_log_line_to_date_and_message() declare -r -A -g translate_month_name_to_number_dictionary=( [Jan]=1 [Feb]=2 [Mar]=3 [Apr]=4 [May]=5 [Jun]=6 [Jul]=7 [Aug]=8 [Sep]=9 [Oct]=10 [Nov]=11 [Dec]=12 [unknown]=0 ) # in use in: split_log_line_to_date_and_message() # global var hashtables # shellcheck disable=SC2034 declare -A -g file_attribute # in use in: get_new_lines_from_log() declare -A -g checkup_counters # in use in: is_checkup_counter_set() # get_checkup_counter() # set_checkup_counter() # increment_checkup_counter() # reset_checkup_counter() # list_checkup_counters() # # print_checkup_summary_report() } # # all about hashtables # # generate_hash_key() # is_hash_key_set() # get_hash_value() # set_hash_value() # # TODO refactor underlying functions to be a more uniform? # # is_checkup_counter_set() # get_checkup_counter() # set_checkup_counter() # increment_checkup_counter() # reset_checkup_counter() # list_checkup_counters() # function generate_hash_key { (( script_DEBUG )) && debugcho «$@« # # Usage: generate_hash_key ‘key_name’ ‘method_name’ # # generate fully qualified hash key: «key<delimiter>method» # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r key_name=«${1-}« local -r method_name=«${2-}« # vars local key # code key=«${key_name}${unique_delimiter}${method_name}« echo «$key« } function is_hash_key_set { (( script_DEBUG )) && debugcho «$@« # # Usage: is_hash_key_set ‘hashtable_by_ref’ ‘key_name’ ‘method_name’ # # args (( $# != 3 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r -n hashtable_by_ref=«${1-}« # by ref local -r key_name=«${2-}« local -r method_name=«${3-}« # vars local key # code key=«$( generate_hash_key «$key_name« «$method_name« )« [[ -n «${hashtable_by_ref[${key}]-}« ]] } function get_hash_value { (( script_DEBUG )) && debugcho «$@« # # Usage: get_hash_value ‘hashtable_by_ref’ ‘key_name’ ‘method_name’ # # if key isn’t set, return exitcode_ERROR_NOT_FOUND # # args (( $# != 3 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r -n hashtable_by_ref=«${1-}« # by ref local -r key_name=«${2-}« local -r method_name=«${3-}« # vars local key # code key=«$( generate_hash_key «$key_name« «$method_name« )« if [[ -z «${hashtable_by_ref[${key}]-}« ]]; then # shellcheck disable=SC2154 # bc defined in the library return $(( exitcode_ERROR_NOT_FOUND )) else echo «${hashtable_by_ref[${key}]}« fi } function set_hash_value { (( script_DEBUG )) && debugcho «$@« # # Usage: set_hash_value ‘hashtable_by_ref’ ‘key_name’ ‘method_name’ [‘value_to_set'(DEFAULT=0)] # # !!! if value_to_set isn’t provided, set to ‘0’. should refactor later? # # args (( $# < 3 || $# > 4 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r -n hashtable_by_ref=«${1-}« # by ref local -r key_name=«${2-}« local -r method_name=«${3-}« local -r value_to_set_DEFAULT=0 local -r value_to_set=«${4-${value_to_set_DEFAULT}}« # vars local key # code key=«$( generate_hash_key «$key_name« «$method_name« )« hashtable_by_ref[«${key}«]=«$value_to_set« } function is_checkup_counter_set { (( script_DEBUG )) && debugcho «$@« # # Usage: is_checkup_counter_set ‘checkup_name’ ‘counter_name’ # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r checkup_name=«${1-}« local -r counter_name=«${2-}« # vars local key # code key=«$( generate_hash_key «$checkup_name« «$counter_name« )« [[ -n «${checkup_counters[${key}]-}« ]] } function get_checkup_counter { (( script_DEBUG )) && debugcho «$@« # # Usage: get_checkup_counter ‘checkup_name’ ‘counter_name’ # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r checkup_name=«${1-}« local -r counter_name=«${2-}« # vars local key # code key=«$( generate_hash_key «$checkup_name« «$counter_name« )« echo «${checkup_counters[${key}]:=0}« # take care of unbound var, hadn’t figured out a pretty way } function set_checkup_counter { (( script_DEBUG )) && debugcho «$@« # # Usage: set_checkup_counter ‘checkup_name’ ‘counter_name’ [‘value_to_set'(DEFAULT=1)] # # args (( $# < 2 || $# > 3 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r checkup_name=«${1-}« local -r counter_name=«${2-}« local -r -i value_to_set_DEFAULT=1 local -r value_to_set=«${3-${value_to_set_DEFAULT}}« # vars local key # code key=«$( generate_hash_key «$checkup_name« «$counter_name« )« checkup_counters[«${key}«]=«$value_to_set« } function increment_checkup_counter { (( script_DEBUG )) && debugcho «$@« # # Usage: increment_checkup_counter ‘checkup_name’ ‘counter_name’ # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r checkup_name=«${1-}« local -r counter_name=«${2-}« # vars local key # code key=«$( generate_hash_key «$checkup_name« «$counter_name« )« : «${checkup_counters[${key}]:=0}« # take care of unbound var, hadn’t figured out a pretty way (( checkup_counters[«${key}«]++ )) } function reset_checkup_counter { (( script_DEBUG )) && debugcho «$@« # # Usage: reset_checkup_counter ‘checkup_name’ ‘counter_name’ # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r checkup_name=«${1-}« local -r counter_name=«${2-}« # vars local key # code key=«$( generate_hash_key «$checkup_name« «$counter_name« )« : «${checkup_counters[${key}]:=0}« # take care of unbound var, hadn’t figured out a pretty way (( checkup_counters[«${key}«]=0 )) } function list_checkup_counters { (( script_DEBUG )) && debugcho # # Usage: list_checkup_counters # # print list of all checkups whose counters are set # list is unique by design # # vars local -A checkups_list_HASH=() local this_checkup_counter this_checkup_name # code # get unique keys to hashtable for this_checkup_counter in «${!checkup_counters[@]}«; do this_checkup_name=«${this_checkup_counter%%${unique_delimiter}*}« # cut all after delimiter (and delimiter too), leave only checkup name checkups_list_HASH[«$this_checkup_name«]= # …or any char you want, doesn’t matter done # print hashtable keys sorted #while read -r this_checkup_name; do # echo «$this_checkup_name» #done < <( printf ‘%sn’ «${!checkups_list_HASH[@]}» | sort ) # oh man, why so complex? printf %sn «${!checkups_list_HASH[@]}« | sort } # # logs processing: # # are_sorted_files_differ() # split_log_line_to_date_and_message() # filter_lines_send_messages() # get_new_lines_from_log() # print_last_lines_from_own_log() # print_controller_log_entry() # shrink_system_logs() # function are_sorted_files_differ { # # Usage: are_sorted_files_differ ‘first_FILE’ ‘second_FILE’ # # please use only on small files # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r first_FILE=«${1-}« local -r second_FILE=«${2-}« # vars local first_file_sorted_content second_file_sorted_content # code if [[ -s «$first_FILE« && -s «$second_FILE« ]]; then first_file_sorted_content=«$( sort «$first_FILE« )« second_file_sorted_content=«$( sort «$second_FILE« )« if [[ «$first_file_sorted_content« == «$second_file_sorted_content« ]]; then # shellcheck disable=SC2154 # bc defined in the library return $(( exitcode_NOT_OK )) # no, they are NOT differ fi fi return $(( exitcode_OK )) # yes, they are differ (or not found, the same outcome) } function split_log_line_to_date_and_message { (( script_DEBUG )) && debugcho «$@« # # split_log_line_to_date_and_message ‘log_line’ ‘date_var_by_ref’ ‘message_var_by_ref’ # # args (( $# != 3 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r log_line=«${1-}« local -r -n _log_date_by_ref=«${2-}« # get var by ref local -r -n _log_message_by_ref=«${3-}« # get var by ref # vars local a b d e m F T Z Y # code # _log_date_by_ref=’—empty-timestamp—‘ _log_date_by_ref=—no-time-stamp— _log_message_by_ref=«${log_line}« for this_format in ${date_formats_dictionary[‘list_by_incidence’]}; do if [[ «$log_line« =~ ${date_formats_dictionary[${this_format}.RE]} ]]; then # shellcheck disable=SC2086 read -r ${date_formats_dictionary[${this_format}.pattern]} message <<< «$log_line« # split line by pattern [[ -z «${F-}« && -z «${d-}« ]] && printf -v d %02u «$(( 10#$e ))« # drop any leading zeros before printf %u [[ -z «${F-}« && -z «${m-}« ]] && printf -v m %02u «${translate_month_name_to_number_dictionary[${b-unknown}]}« [[ -z «${F-}« && -z «${Y-}« ]] && printf -v Y %(%Y)T -1 [[ -z «${F-}« ]] && F=«$Y$m$d« # remove any square brackets F=«${F//[][]}« T=«${T//[][]}« # shellcheck disable=SC2034 printf -v _log_date_by_ref %-10.10s %-8.8s «$F« «$T« # shellcheck disable=SC2034 _log_message_by_ref=«${message}« break fi done } function filter_lines_send_messages { (( script_DEBUG )) && debugcho # # get lines from stdin -> deduplicate -> parse -> send a message, if necessary # # consts local -r -i send_messages_enabled=1 local -r message_body_template=Log: <strong>%b</strong>nDate: %snType: %s<hr><h3>%b</h3>%b # shellcheck disable=SC2154 # bc defined in the library local -r valid_chain_number_RE=«$positive_integer_RE« # arrays local -A lines_deduplicated_HASH=() # vars local log_line log_timestamp log_message_combined_with_log_name log_name event_type local message_header message_tip local parse_error_RE failed_chain= failed_chip= from_suspicious_IP= local log_line_raw IFS # code # deduplicate the input first # # beware, it’s very simply algo! # therefore, similar log lines but with different timestamps have not been deduplicated # while IFS= read -r log_line_raw || [[ -n «$log_line_raw« ]]; do if [[ -n «${log_line_raw-}« ]]; then lines_deduplicated_HASH[«$log_line_raw«]=1 # anything is good, the value doesn’t matter at all fi done # and then forEach line… for log_line in «${!lines_deduplicated_HASH[@]}«; do split_log_line_to_date_and_message «$log_line« log_timestamp log_message_combined_with_log_name # !! last two vars passed by a reference, not by value if [[ «$log_message_combined_with_log_name« =~ $unique_delimiter ]]; then # split log_message_combined_with_log_name to message and logname log_message=«${log_message_combined_with_log_name%%${unique_delimiter}*}« log_name=«${log_message_combined_with_log_name##*${unique_delimiter}}« else log_message=«$log_message_combined_with_log_name« log_name= fi event_type=skip message_header= message_tip= case «$log_name« in /var/log/log) # series 15/17 case «$log_message« in *Chain[*] PIC init failed!) # example: ‘driver/driver-btm-api.c:242:init_pic_one_chain: Chain[2] PIC init failed!’ event_type=error parse_error_RE=Chain[([0-9+])] PIC init failed [[ «$log_message« =~ $parse_error_RE ]] && failed_chain=«#${BASH_REMATCH[1]} « message_header=«Chain ${failed_chain}malfunction. Mining stopped. Click for details« message_tip=«It could be a bad connection between the chain and the control board. « message_tip+=«Please do examine closely the every ribbon and power cable, its connectors and sockets. Clean them out.« message_tip+=n message_tip+=«If that doesn’t help, please get the ASIC to the service or repair shop.« ;; *will power off hash board*) # example: ‘driver/driver-btm-api.c:1445:check_asic_number_with_power_on: Chain 0 only find 3 asic, will power off hash board 0’ event_type=error parse_error_RE=Chain ([0-9]+) only find [[ «$log_message« =~ $parse_error_RE ]] && failed_chain=«#${BASH_REMATCH[1]} « message_header=«Chain ${failed_chain}malfunction. Mining stopped. Click for details« message_tip=«There’s a chance that the chain is undervolted and cannot start due to a low voltage. « message_tip+=«Sometimes, switching an Overclocking profile to the more aggressive one resolves the issue.« message_tip+=n message_tip+=«It could be a bad connection between the chain and the control board. « message_tip+=«Please do examine closely the every ribbon and power cable, its connectors and sockets. Clean them out.« message_tip+=n message_tip+=«If that doesn’t help, please get the ASIC to the service or repair shop.« ;; *bad clock counter*) # 17 2.00 (not sure about version) # example: ‘driver/register.c:699:quick_dump_core_hash_clock_counter: bad clock counter. chain = 0, asic = 7, core = 2, found 1, clock counter 0x00000000’ event_type=error parse_error_RE=bad clock counter. chain = ([0-9]+), asic = ([0-9]+) if [[ «$log_message« =~ $parse_error_RE ]]; then failed_chain=« #${BASH_REMATCH[1]}« failed_chip=«#${BASH_REMATCH[2]} « fi message_header=«Chain${failed_chain} malfunction. Mining restarted. Click for details« message_tip=«Cannot set frequency on asic chip ${failed_chip}on chain${failed_chain}. Every start the miner does a check-up « message_tip+=«for each asic chip, trying to open its core at the minimum frequency. If there’s a chip damage, core won’t open.« message_tip+=n message_tip+=Please check the chain and then resold/replace the chip and its neighbors in that domain. message_tip+=n message_tip+=«If that doesn’t help, please get the ASIC to the service or repair shop.« ;; esac ;; /var/log/messages) # S9 only? Z11 too case «$log_message« in *Fan Err!*) event_type=error message_header=Fan error. Click for details ;; *Temp Err!*) event_type=error message_header=Temperature sensor error. Click for details ;; *No servers were found*) # example: # Jul 18 13:07:36 (none) local0.err cgminer[998]: No servers were found that could be used to get work from. # Jul 18 13:07:36 (none) local0.err cgminer[998]: Please check the details from the list below of the servers you have input # Jul 18 13:07:36 (none) local0.err cgminer[998]: Most likely you have input the wrong URL, forgotten to add a port, or have not set up workers # Jul 18 13:07:36 (none) local0.warn cgminer[998]: Pool: 0 URL: stratum+tcp://zec.ss.poolin.com:443 User: stoffel.S2101b Password: 123 # Jul 18 13:07:36 (none) local0.warn cgminer[998]: Pool: 1 URL: stratum+tcp://zec.ss.poolin.com:1883 User: stoffel.S2101b Password: 123 # Jul 18 13:07:36 (none) local0.warn cgminer[998]: Pool: 2 URL: stratum+tcp://zec.ss.poolin.com:25 User: stoffel.S2101b Password: 123 # Jul 18 13:07:36 (none) local0.err cgminer[998]: No servers could be used! Exiting. event_type=error message_header=Unable to connect to the pool. Click for details message_tip=«$( grep -iE pool|url|server /var/log/messages | grep -viE User: (devfee|hiveon) | tail )« ;; esac ;; /www/logs/lighttpd.error.log) case «$log_message« in *auth failed*) # example: ‘(http_auth.c.1148) digest: auth failed for root : wrong password, IP: 127.0.0.1 ‘ event_type=warning parse_error_RE=IP: (([0-9]{1,3}.){3}[0-9]{1,3}) if [[ «$log_message« =~ $parse_error_RE && «${BASH_REMATCH[1]}« != 127.0.0.1 ]]; then # ASICs with lighttpd-over-nginx do not log IP properly ^^^^^^^^^^^^^^ # only lighttpd alone does it from_suspicious_IP=« from IP ${BASH_REMATCH[1]}« fi message_header=Failed login attempt has been made to the ASIC web interface. Click for details message_tip=«Someone or something$from_suspicious_IP has tried to login to the ASIC web interface with « message_tip+=«a wrong login and/or password. If it wasn’t you — you MAY have a virus in the local network « message_tip+=«that trying to brute-force all ASICs in the vicinity. Please be advised.« message_tip+=n message_tip+=«Also, it could happen while scanning a network with BTC Tools. Open up your BTC Tools and check the ASIC password setting.« ;; esac ;; /nvdata/miner_status.log) case «$log_message« in ERROR_POWER_LOST*) # example: ‘ERROR_POWER_LOST: power set failed!’ event_type=error message_header=Power lost. Click for details message_tip=«It could be a problem with the miner PSU or the power transmission from the PSU to the hashboards. « message_tip+=«Please do examine closely the every power cable and its connectors and sockets. Clean them out.« message_tip+=n message_tip+=«If that doesn’t help, please get the ASIC to the service or repair shop.« ;; ERROR_PIC_LOST*) # example: ‘ERROR_PIC_LOST: PIC init failed’ event_type=error message_header=PIC init failed. Click for details message_tip=«PIC is a smart voltage regulator. On each hashboard there’s the only one PIC.« message_tip+=n message_tip+=«The easiest case could be a bad connection between the chain and the control board. « message_tip+=«Please do examine closely the every ribbon cable, connector and socket. Clean them out. « message_tip+=«Examine the hashboard.« message_tip+=n message_tip+=«If that doesn’t help, please get the ASIC to the service or repair shop.« ;; ERROR_SOC_INIT*) # example: ‘ERROR_SOC_INIT: soc init failed!’ event_type=error message_header=SOC init failed. Click for details message_tip=«It could be a bad connection between the chain and the control board. « message_tip+=«Please do examine closely the every ribbon cable, connector and socket. Clean them out.« message_tip+=n message_tip+=«If that doesn’t help, please get the ASIC to the service or repair shop.« ;; WARN_NET_LOST*) # example: ‘WARN_NET_LOST: network connection lost’ event_type=warning message_header=Network lost for a few seconds. Click for details message_tip=«The miner has lost a network connection for a few seconds. The cause could be: 1) Faulty RJ-45 socket, RJ-45 connector or Ethernet cable —> check connectors & cabling; 2) Hanging router —> reboot router; 3) Your ISP —> contact your service provider; 4) A random Internet glitch.« ;; ERROR_NET_LOST*) # example: ‘ERROR_NET_LOST: network connection lost’ event_type=error message_header=Network lost for a few minutes. Click for details message_tip=«The miner has lost a network connection for more than a minute. The cause could be: 1) Faulty RJ-45 socket, RJ-45 connector or Ethernet cable —> check connectors & cabling; 2) Hanging router —> reboot router; 3) Your ISP —> contact your service provider.« ;; ERROR_TEMP_TOO_LOW*) # example: ‘ERROR_TEMP_TOO_LOW: Environment temperature is too low!’ event_type=error message_header=The miner is frozen. Click for details message_tip=«The miner is unable to work at low temperatures. The environment temperature should be <strong>+20C at least</strong>. Possible solutions: 1) Warm the machine up before starting; 2) Put a few machines in some sort of heating chain: one’s exhaust to second’s intake and so forth; 2) Do install some pre-heating equipment.« ;; STATUS_* ) event_type=skip ;; ERROR_* ) event_type=error ;; WARN_* ) event_type=warning ;; * ) event_type=warning ;; esac ;; /config/watchdog.log) # Hiveon case «$log_message« in .*) # L3+ # originally it was like ‘started’ — a simple service notification # example: ‘. ‘ event_type=skip ;; Tune is in progress*) # S9 # example: ‘Tune is in progress, wait 30 seconds…’ event_type=skip ;; Found*red chips*) # S9 # example: ‘Found 1 red chips, restart’ event_type=info message_header=Auto-tune found a low hashrate chip, fixing ;; Chain *found *domains) # ST17 / ST19? # example: ‘Chain 1: found 1 bad domains’ event_type=info message_header=Auto-tune found a low hashrate domain, fixing ;; *domains fixed*) # ST17 / ST19? # example: ‘Red domains fixed, restart’ event_type=ok message_header=Auto-tune fixed a low hashrate domain, miner restarted ;; Activating profile *) # ST17 / ST19? # example: ‘Activating profile 11’ event_type=skip ;; Re-run cgminer to check temerature sensor type again!) # ST17 / ST19? event_type=skip ;; Possible manufacturing defects detected*) # ST17 Hiveon 2.00 / ST19? # example: ‘Possible manufacturing defects detected — enable safe mode to save chips and boards from overheating’ if [[ -s /config/stop-mining ]]; then failed_chain=«$( < /config/stop-mining )« [[ «$failed_chain« =~ $valid_chain_number_RE ]] && failed_chain=«#$(( failed_chain 1 )) « # chain numbers in the file are 1-based fi event_type=error message_header=«Chain ${failed_chain}malfunction. Safe mode activated, mining disabled. Click for details« message_tip=You see, hashboards are placed upright. Heatsinks are soldered to chips using a Low Melting Point solder paste. message_tip+=Sometimes the solder melts a bit and then a heatsink begins to slide down due to the Earth gravitation. It message_tip+=slides right to the next heatsink down south and then KA-BOOM! — a short-circuit that will ruin a whole message_tip+=hashboard. Be adviced to send the ASIC to the service. message_tip+=<hr>Despite the risk, you might consider to override the Safe mode and then resume a mining. You only have message_tip+=to send a command <code>miner start</code> ;; *) event_type=warning ;; esac # cut milliseconds from watchdog messages like # ST17: ‘Total rate is 0 after 1870.000000 seconds, restart’ # S9: ‘Total hashrate 0.000000 is less than 90 percents of 17112.42, stopping miner’ log_message=«${log_message//.000000 / }« ;; /tmp/auto-tune) # S9 case «$log_message« in Config parse:*) # example: ‘Config parse: freq_from=500, freq_to=756, voltage_from=830, voltage_to=890, ideal_percent=97’ event_type=ok message_header=Auto-tune is started. Click for details message_tip=Auto-tune is started. It will take 30-300 minutes. message_tip+=Please DO NOT power off, restart or apply another overclocking profile until the auto-tune is over. ;; # ‘Auto tune is done’*) # # ‘Auto tune is done, exit’ # event_type=’ok’ # message_header=’Tune done’ # ;; esac ;; /tmp/freq) # S9 case «$log_message« in Fee pools are *) # examples: # Fee pools are not alive! # Fee pools are not alive! 5 attempts has been performed # Fee pools are dead, restarting !!! should find a log with such message event_type=warning message_header=Devfee pools are not available. Click for details message_tip=«The miner cannot access a devfee pool to mine a developer’s fee. Mining stopped until this is resolved. « message_tip+=Please check your Internet connection. ;; Fatal Error: network connection lost!) # ‘Fatal Error: network connection lost!’ event_type=warning message_header=Network problem (or fan fault). Click for details message_tip=«The miner has lost a network connection. The cause could be: 1) Faulty RJ-45 socket, RJ-45 connector or Ethernet cable —> check connectors & cabling; 2) Hanging router —> reboot router; 3) Your ISP —> contact your service provider; 4) A random Internet glitch; 5) Fan speed sensor malfunction —> check fans, try to swap them« ;; esac ;; /tmp/tune_log.txt) case «$log_message« in Tune started*) event_type=ok message_header=Auto-tune is started. Click for details message_tip=Auto-tune is started. It will take 30-90 minutes. message_tip+=Please DO NOT power off, restart or apply another overclocking profile until the auto-tune is over. ;; # ‘All is ok’*) # # ‘All is ok, tune is done’ # event_type=’ok’ # ;; Achieved *) # example: ‘Achieved maximum number of restarts’ event_type=warning message_header=Auto-tune attempts are maxed out ;; esac ;; /tmp/fault.log) event_type=warning message_header=Miner program fault. Click for details message_tip=There was a miner program fault (due to bugs in the code and/or ASIC hardware). message_tip+=The miner has been restarted automatically. ;; *) # let’s do not frighten the user with ‘oh no, the error!’ event_type=warning ;; esac if [[ «$event_type« != skip ]]; then print_controller_log_entry «LOG_${event_type^^}« «${log_name}: $log_message« «$log_timestamp« if (( send_messages_enabled )); then [[ -z «$message_header« ]] && message_header=«$log_message« # shellcheck disable=SC2059 printf «$message_body_template« «$log_name« «$log_timestamp ${TZ-GMT}« «${event_type^^}« «$log_message« «${message_tip//$’t/}« | message «$event_type« «$message_header« —payload —silent fi fi done } function get_new_lines_from_log { (( script_DEBUG )) && debugcho «$@« # # get_new_lines_from_log ‘log_name’ [‘log_name’…] # # the function uses *global* hashtable for saving session data between calls # WARNING: it does not work in any pipes and subshells like | () $() <() # # args (( $# < 1 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r -a logs_list=( «$@« ) # vars local previous_lines_quantity current_lines_quantity this_log this_log_sanitized local -i previous_log_size=0 local -i current_log_size=0 local -i tail_from_line=0 local -i how_much_new_lines=0 local -i is_something_found=$(( exitcode_OK_NOTHING_HAPPENED )) # code for this_log in «${logs_list[@]}«; do current_lines_quantity= if [[ -s «$this_log« ]]; then # file is exist and not empty # don’t waste resources to count lines on every iteration, check file size first current_log_size=«$( get_file_size_in_bytes «$this_log« )« # is it a first time run? if ! previous_log_size=«$( get_hash_value file_attribute «$this_log« size )«; then # first run, init vars current_lines_quantity=«$( wc -l < «$this_log« )« previous_log_size=«$current_log_size« fi if (( current_log_size != previous_log_size )); then # log file was changed if (( current_log_size > previous_log_size )); then # a few lines was added previous_lines_quantity=«$( get_hash_value file_attribute «$this_log« lines )« # get previous lines count elif (( current_log_size < previous_log_size )); then # guess that file was truncated previous_lines_quantity=0 fi is_something_found=$(( exitcode_WARNING_SOMETHING_HAPPENED )) current_lines_quantity=«$( wc -l < «$this_log« )« # get current lines count if (( previous_lines_quantity > current_lines_quantity )); then # a wild guess that the file was truncated # !!! small debug errcho «$this_log was truncated? size ${previous_log_size}b -> ${current_log_size}b, lines $previous_lines_quantity -> $current_lines_quantity, tail_from_line: $tail_from_line, how_much_new_lines: $how_much_new_lines« previous_lines_quantity=0 fi (( tail_from_line = previous_lines_quantity + 1 )) (( how_much_new_lines = current_lines_quantity previous_lines_quantity )) printf -v this_log_sanitized %q «$this_log« if (( current_log_size > previous_log_size )); then # a few lines was added tail -n «+$tail_from_line« «$this_log« | head -n «$how_much_new_lines« || errcho «$this_log size ${previous_log_size}b -> ${current_log_size}b, lines $previous_lines_quantity -> $current_lines_quantity, tail_from_line: $tail_from_line, how_much_new_lines: $how_much_new_lines« elif (( current_log_size < previous_log_size )); then # a wild guess that the file was truncated # tail not cat — better be safe than sorry tail -n 100 «$this_log« || errcho «$this_log size ${previous_log_size}b -> ${current_log_size}b, lines $previous_lines_quantity -> $current_lines_quantity, tail_from_line: $tail_from_line, how_much_new_lines: $how_much_new_lines« fi | { sed s|$|«${unique_delimiter}${this_log_sanitized}«| — } fi # save current values set_hash_value file_attribute «$this_log« size «$current_log_size« if [[ -n «$current_lines_quantity« ]]; then set_hash_value file_attribute «$this_log« lines «$current_lines_quantity« fi else # file not found or empty set_hash_value file_attribute «$this_log« size 0 set_hash_value file_attribute «$this_log« lines 0 fi done return $(( is_something_found )) } function print_last_lines_from_own_log { (( script_DEBUG )) && debugcho «$@« # # print_last_lines_from_own_log [all] # # args (( $# > 1 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r filter=«${1-}« # consts local -r deprecated_controller_log=/config/hive-controller.log # RE local -r filter_RE=(error|warning|Shrink log|Truncate log|selfupgrade|updated from|New date) # | patterns from the legacy versions # vars local this_nvram_directory controller_log=«$deprecated_controller_log« # code # code for this_nvram_directory in /nvdata /opt /config; do if [[ -s «$this_nvram_directory/client-controller.log« ]]; then controller_log=«$this_nvram_directory/client-controller.log« break fi done if [[ -s «$controller_log« ]]; then case «$filter« in all) tail -n «$log_lines_to_tail« «$controller_log« ;; |*) grep -Ev -e ^[[:space:]]«$controller_log« | grep -Fv -e > Sending | grep -Ei -e «$filter_RE« — ;; esac else echo «$controller_log not found or empty« fi } function print_controller_log_entry { (( script_DEBUG )) && debugcho «$@« # # print_controller_log_entry ‘event_type’ ‘log_message’ [‘timestamp_in_plaintext’] # # args (( $# < 2 && $# > 3 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local event_type=«${1-<undefined>}« local log_message=«${2-<undefined>}« local timestamp_in_plaintext=«${3-}« # code event_type=«[${event_type^^}]« if [[ -z «$timestamp_in_plaintext« ]]; then printf %(%F %T)T %-13.13s %bn -1 «$event_type« «$log_message« else printf %-19.19s %-13.13s %bn «$timestamp_in_plaintext« «$event_type« «$log_message« fi return $(( exitcode_OK )) } function shrink_system_logs { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message= # error|warning|info|success # consts local -r -i log_lines_shrink_limit=1000 local -r -a logs_collection=( /var/log/* /tmp/*.log /hive-config/*.log /config/*.log /www/logs/*.log ) # vars local this_log local -i current_number_of_lines_in_log # code for this_log in «${logs_collection[@]}«; do if [[ -s «$this_log« ]]; then current_number_of_lines_in_log=«$( wc -l < «$this_log« )« if (( current_number_of_lines_in_log > log_lines_shrink_limit )); then print_controller_log_entry «$event_type_for_log« «Shrink log $this_log, $current_number_of_lines_in_log lines to $log_lines_shrink_limit lines« # shellcheck disable=SC2005,SC2094 echo «$( tail -n «$log_lines_shrink_limit« «$this_log« )« > «$this_log« # !!! there could be a race condition someday fi fi done } # # auxillary # function drop_caches { (( script_DEBUG )) && debugcho # # warning: frequent use of this function may increase NAND wear and tear # # code sync && echo 3 > /proc/sys/vm/drop_caches } function wipe_memory { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message= # error|warning|info|success # vars local -a files_greater_than_1mb_ARR=() local -i this_file_size local this_file # code readarray -t files_greater_than_1mb_ARR < <( LANG=C du -h /tmp/* /var/log/* | awk /^[0-9.]+[MG]/{ print $2 } ) for this_file in «${files_greater_than_1mb_ARR[@]}«; do this_file_size=«$( get_file_size_in_bytes «$this_file« )« print_controller_log_entry «$event_type_for_log« «Removing a large log file $this_file ($this_file_size bytes >= 1 Mb)« rm «$this_file« done drop_caches } function check_ntpd { (( script_DEBUG )) && debugcho # code # shellcheck disable=SC2009 # …bc there’s no pgrep if ! ps | grep -q [n]tpd; then if [[ -x /etc/init.d/ntpd ]]; then print_controller_log_entry warning ntpd daemon not running, starting it… /etc/init.d/ntpd start else print_controller_log_entry warning /etc/init.d/ntpd not found, trying to adjust the time by ntpdate… sync_time_with_ntpdate fi echo fi } function sync_time_with_ntpdate { (( script_DEBUG )) && debugcho # code if is_program_in_the_PATH ntpdate; then ntpdate -u -t 10 «$ntp_server« else # TODO use timedatectl (inno) print_controller_log_entry warning ntpdate not found fi } function set_time_source { # not used atm # vars local -i time_before time_after time_difference # code time_before=«$( get_current_system_time_in_seconds )« # shellcheck disable=SC2009 # …bc there’s no pgrep if is_program_in_the_PATH ntpdate && ntpdate -u -t 10 «$ntp_server«; then time_source=ntpdate elif ps | grep -q [n]tpd; then time_source=ntpd else time_source=hive fi print_controller_log_entry info «The correct time source set to ‘$time_source« time_after=«$( get_current_system_time_in_seconds )« (( time_difference = time_after >= time_before ? time_after time_before : time_before time_after )) # absolute difference if (( time_difference > (60 * 10) )); then print_controller_log_entry warning «Local time adjusted by $( seconds2dhms «$time_difference« )« fi } function sync_time_via_hive_server { # not used atm # vars local HIVE_HOST_URL server_answer local -i date_from_server_in_seconds local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code # shellcheck disable=SC1090 # just because HIVE_HOST_URL=«$( [[ -s «$RIG_CONF« ]] && source «$RIG_CONF« && echo «${HIVE_HOST_URL-}« )« if [[ -z ${HIVE_HOST_URL-} ]]; then HIVE_HOST_URL=http://api.hiveos.farm fi if server_answer=«$( ${curl_protocol} —silent —head «$HIVE_HOST_URL« 2>&1 )«; then date_from_server_in_seconds=«$( grep -F -m 1 Date: <<< «$server_answer« | cut -d -f3-6 | timetran )« echo «Setting actual date from API server: $( date -s «@$date_from_server_in_seconds« )« else echo «Network is lost? Cannot get actual date from API server ($server_answer)« is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi return $(( is_something_happened )) } # # routine functions executed by cron # # checkup:is_it_the_past() # checkup:is_NAND_has_enough_free_space() # checkup:is_RAM_full() # checkup:is_miner_config_in_sync_with_FS() # checkup:is_custom_fw_config_in_sync() # checkup:is_build_updated() # checkup:is_virus_found() # checkup:is_there_JFFS2_error() # checkup:is_NAND_in_RO_mode() # checkup:is_overclock_profile_exist() # checkup:are_logs_updated() # execute:cache_hive_ip() # execute:agent_screen_dontattach() # print_checkup_summary_report() # function checkup:is_it_the_past { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message= # error|warning|info|success # vars local HIVE_HOST_URL server_answer date_from_server_raw local -i current_year date_from_server_in_seconds local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code printf -v current_year %(%Y)T -1 if (( current_year < 2021 )); then is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) # shellcheck disable=SC1090 # just because HIVE_HOST_URL=«$( [[ -s «$RIG_CONF« ]] && source «$RIG_CONF« && echo «${HIVE_HOST_URL-}« )« if [[ -z ${HIVE_HOST_URL-} ]]; then HIVE_HOST_URL=http://api.hiveos.farm fi if server_answer=«$( ${curl_protocol} —silent —head «$HIVE_HOST_URL« 2>&1 )« && [[ -n «$server_answer« ]]; then if date_from_server_raw=«$( grep -F -m 1 Date: <<< «$server_answer« )« && [[ -n «$date_from_server_raw« ]]; then if date_from_server_in_seconds=«$( cut -d -f3-6 <<< «$date_from_server_raw« | timetran 2> /dev/null )« && [[ «$date_from_server_in_seconds« =~ positive_integer_RE ]]; then print_controller_log_entry «$event_type_for_log« «System date’s year is $current_year. Getting actual date from server: $( date -s «@$date_from_server_in_seconds« )« else print_controller_log_entry «$event_type_for_log« «System date’s year is $current_year. timetran failed ($server_answer)« fi else print_controller_log_entry «$event_type_for_log« «System date’s year is $current_year. Cannot get date from the server’s answer, ‘Date:’ keyword absent ($server_answer)« fi else print_controller_log_entry «$event_type_for_log« «System date’s year is $current_year. Network is lost, cannot get actual date from server ($server_answer)« fi fi return $(( is_something_happened )) } function checkup:is_NAND_has_enough_free_space { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=warning # error|warning|info|success # consts local -r -i NAND_low_space_limit_in_kb=100 # arrays local -a df_output_ARR=() local -a ls_output_ARR=() # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) local _ NAND_free_space_in_kb # code # root@antminer:/# df -k /config (T17) # Filesystem 1K-blocks Used Available Use% Mounted on # ubi0_0 572 40 468 8% /config # root@antminer:/# df -m /config # Filesystem 1M-blocks Used Available Use% Mounted on # /dev/mtdblock9 20 8 12 38% /config # [0] [1] [2] [3] [4] [5] readarray -t df_output_ARR < <( df -k /config ) readarray -t ls_output_ARR < <( ls -l /config/ ) read -r _ _ _ NAND_free_space_in_kb _ <<< «${df_output_ARR[-1]}« # parse the last line if [[ «$NAND_free_space_in_kb« =~ $positive_integer_RE ]]; then if (( NAND_free_space_in_kb < NAND_low_space_limit_in_kb )); then is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry «$event_type_for_log« «/config directory running out of space: $NAND_free_space_in_kb Kb« printf %sn «${df_output_ARR[@]}« | tee >( message «$event_type_for_message« /config directory running out of space. Click for technical details —payload —silent ) printf %sn «${ls_output_ARR[@]}« | tee >( message «$event_type_for_message« List of files /config. Click for technical details —payload —silent ) [[ -e /config/log ]] && rm /config/log else : ok good to go fi else is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry «$event_type_for_log« «df bad output ‘$NAND_free_space_in_kb« fi return $(( is_something_happened )) } function checkup:is_RAM_full { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=warning # error|warning|info|success # consts local -r -i low_memory_limit=5000 # 5 Mb local -r -i top_lines_count=10 # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) local free_memory print_top a # code free_memory=«$( grep -Fi memfree /proc/meminfo | sed s/[^0-9]//g )« if (( free_memory < low_memory_limit )); then is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry «$event_type_for_log« «Memory low: $free_memory Mb« print_top=«$( top -b -n1 | head -n «$top_lines_count« )« echo -e «$print_top« | tee >( message «$event_type_for_message« System memory low, tried to clean up the logs —payload —silent ) shrink_system_logs wipe_memory fi return $(( is_something_happened )) } function checkup:is_miner_config_in_sync_with_FS { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=warning # error|warning|info|success # consts local -r initial_crontab_entry=«*/5 * * * * ${FUNCNAME[0]}« local -r further_crontab_entry=«@hourly ${FUNCNAME[0]}« # vars local -i this_crontab_element local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) local compare_result # code asicminer-config —pools-only-compare —quiet # 0: compare ok # 1: something bad (no config etc.) # 2: compare NOT ok if (( $? == 2 )); then snore 2 # an average asicminer-config timing on S17 is 0.5s compare_result=«$( asicminer-config —pools-only-compare —verbose 2>&1 )« # 0: compare ok # 1: something bad (no config etc.) # 2: compare NOT ok if (( $? == 2 )); then is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry «$event_type_for_log« Miner config does not match the Flight Sheet config tee <<< «$compare_result« >( message «$event_type_for_message« Miner config does not match the Flight Sheet. Click for details —payload —silent ) # adjust crontab, get this checkup to run once in a hour for this_crontab_element in «${!crontab[@]}«; do case «${crontab[this_crontab_element]}« in «$initial_crontab_entry«) crontab[this_crontab_element]=«$further_crontab_entry« print_controller_log_entry info «Adjusting crontab for ‘${FUNCNAME[0]}‘ to run once in an hour« break ;; «$further_crontab_entry«) break ;; esac done fi fi return $(( is_something_happened )) } function checkup:is_custom_fw_config_in_sync { (( script_DEBUG )) && debugcho # templates #local -r event_type_for_log=’warning’ # error|warning|info # consts local -r HIVEON_CONF=/hive-config/hiveon.conf local -r ASIC_CONF=/config/config.conf local -r is_series_19_RE=Antminer [ST]19 # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code # quick assert for Custom FW version # shellcheck disable=SC2154 # bc defined in the asic-model (( ASIC_CUSTOM_FW_VERSION_MAJOR >= 2 )) || [[ «$ASIC_MODEL« =~ $is_series_19_RE ]] || return $(( exitcode_OK_NOTHING_HAPPENED )) # if [[ «$ASIC_MODEL» =~ $is_series_19_RE ]]; then # return $(( exitcode_OK_NOTHING_HAPPENED )) # fi # problem: # 1. we aren’t able to send config if RIG_ID isn’t set # 2. also we don’t want to waste a system resources to source RIG_CONF an every function call # solution: # 1. so we should source RIG_CONF every function call, but till RIG_ID becomes valid # 2. when it has become valid, we’re: # 3. setting the flag variable and # 4. use it all the times in the future if (( ! is_RIG_ID_ok_FLAG )); then # check RIG_ID # shellcheck disable=SC1090 # just because if [[ -s «$RIG_CONF« ]] && ( source «$RIG_CONF«; [[ -n «$RIG_ID« ]] ); then is_RIG_ID_ok_FLAG=1 fi fi if (( is_RIG_ID_ok_FLAG )); then if [[ ! -f «$HIVEON_CONF« ]]; then (( is_something_happened = exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry warning «$HIVEON_CONF not found (looks like the first start ever)« elif [[ ! -f «$ASIC_CONF« ]]; then (( is_something_happened = exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry warning «$ASIC_CONF not found, hmm« elif are_sorted_files_differ «$HIVEON_CONF« «$ASIC_CONF«; then print_controller_log_entry info «$HIVEON_CONF and $ASIC_CONF are different, wait 1s and check again« snore 1 if are_sorted_files_differ «$HIVEON_CONF« «$ASIC_CONF«; then (( is_something_happened = exitcode_WARNING_SOMETHING_HAPPENED )) print_controller_log_entry info «$ASIC_CONF changed« fi else (( is_something_happened = exitcode_OK_NOTHING_HAPPENED )) fi if (( is_something_happened )); then if [[ -s «$ASIC_CONF« ]]; then cp -f «$ASIC_CONF« «$HIVEON_CONF« print_controller_log_entry info «Copying $ASIC_CONF over $HIVEON_CONF and then sending it to the backend…« ant-functions.sh send_custom_fw_config_to_server else print_controller_log_entry warning «$ASIC_CONF is empty or not found« fi fi fi return $(( is_something_happened )) } function checkup:is_build_updated { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=success # error|warning|info|success # consts local -r actual_VERSION_file=/hive/etc/VERSION local -r saved_VERSION_file=/hive-config/VERSION local -r actual_build_file=/hive/etc/build local -r saved_build_file=/hive-config/build # vars local actual_VERSION= saved_VERSION= local actual_build= saved_build= local actual_Client_version= saved_Client_version= local message_header local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) local -i is_saved_build_file_exist=0 is_actual_build_file_exist=0 should_report_to_user=0 # code if [[ -f «$actual_VERSION_file« ]]; then actual_VERSION=«$( < «$actual_VERSION_file« )« if [[ -f «$saved_VERSION_file« ]]; then saved_VERSION=«$( < «$saved_VERSION_file« )« else saved_VERSION=«0.0-00« fi # 1. checking and comparing the builds if [[ -f «$actual_build_file« ]]; then actual_build=«$( < «$actual_build_file« )« # note ‘-‘ is_actual_build_file_exist=1 fi if [[ -f «$saved_build_file« ]]; then saved_build=«$( < «$saved_build_file« )« # note ‘-‘ is_saved_build_file_exist=1 fi if (( is_saved_build_file_exist && ! is_actual_build_file_exist )); then # only saved exists -> build degraded to release -> report to user, remove saved to reflect the changes should_report_to_user=1 rm -f «$saved_build_file« elif (( ! is_saved_build_file_exist && is_actual_build_file_exist )); then # only actual exists -> release updated to build -> report to user, save actual to saved_ should_report_to_user=1 cp -f «$actual_build_file« «$saved_build_file« elif (( ! is_saved_build_file_exist && ! is_actual_build_file_exist )); then # both not exist -> nothing happened -> nothing to do : elif (( is_saved_build_file_exist && is_actual_build_file_exist )); then if ! cmp -s «$actual_build_file« «$saved_build_file«; then # both exist and not equal -> build updated -> report to user, save actual to saved should_report_to_user=1 cp -f «$actual_build_file« «$saved_build_file« else # both exist and equal -> nothing happened -> nothing to do : fi fi # 2. and now the VERSIONs if [[ ! -f «$saved_VERSION_file« ]]; then # saved_ not found, let’s begin to store it cp -f «$actual_VERSION_file« «$saved_VERSION_file« else # compare VERSIONs if ! cmp -s «$actual_VERSION_file« «$saved_VERSION_file«; then # VERSIONs differ should_report_to_user=1 cp -f «$actual_VERSION_file« «$saved_VERSION_file« else # VERSIONs are the same : fi fi # final step if (( should_report_to_user )); then actual_Client_version=«${actual_VERSION}${actual_build}« saved_Client_version=«${saved_VERSION}${saved_build}« # shellcheck disable=SC2154 # bc defined in the library case «$( is_first_version_equal_to_second «$actual_Client_version« «$saved_Client_version«; echo $? )« in $(( exitcode_GREATER_THAN )) ) what_happened=updated ;; $(( exitcode_LESS_THAN )) ) what_happened=degraded ;; * ) what_happened=changed ;; # wtf? maybe is_first_version_equal_to_second() error esac message_header=«Client $what_happened from $saved_Client_version to $actual_Client_version« print_controller_log_entry «$event_type_for_log« «$message_header« message «$event_type_for_message« «$message_header« —silent is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi else if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘actual_VERSION_file_missed’ ) == 0 )); then # one time action message_header=«$actual_VERSION_file missed, please check« print_controller_log_entry warning «$message_header« # shellcheck disable=SC2012 ls -ALl /hive/etc /hive-config | message warning «$message_header« —payload —silent set_checkup_counter «${FUNCNAME[0]}« actual_VERSION_file_missed 1 fi is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi return $(( is_something_happened )) } function checkup:is_virus_found { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log_DANGER=error # error|warning|info local -r event_type_for_message_DANGER=error # error|warning|info|success local -r event_type_for_log_WARNING=warning # error|warning|info local -r event_type_for_message_WARNING=warning # error|warning|info|success # consts local -r message_header_WARNING=Vulnerability report. Click for details local -r message_header_DANGER=Virus signature found. Click for details local -r tag_label_WARNING=vulnerability found local -r tag_label_DANGER=virus found # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) local -i is_virus_found=0 local virus_report message_header tag_label event_type_for_log event_type_for_message # code if is_program_in_the_PATH virus-check; then if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘program_not_found’ ) > 0 )); then # one time action print_controller_log_entry info «‘virus-check’ program found again« set_checkup_counter «${FUNCNAME[0]}« program_not_found 0 fi else if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘program_not_found’ ) == 0 )); then # one time action print_controller_log_entry error «‘virus-check’ program not found« set_checkup_counter «${FUNCNAME[0]}« program_not_found 1 fi return $(( exitcode_ERROR_NOT_FOUND )) fi if is_script_exist_and_doing_fine virus-check; then if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘program_goes_bananas’ ) > 0 )); then # one time action print_controller_log_entry info «‘virus-check’ program back from bananaland« set_checkup_counter «${FUNCNAME[0]}« program_goes_bananas 0 fi else if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘program_goes_bananas’ ) == 0 )); then # one time action print_controller_log_entry error «‘virus-check’ program goes bananas« set_checkup_counter «${FUNCNAME[0]}« program_goes_bananas 1 fi return $(( exitcode_ERROR_NOT_FOUND )) fi virus_report=«$( virus-check )« is_virus_found=$? if (( is_virus_found )); then case $(( is_virus_found )) in 1) # warning event_type_for_message=«$event_type_for_message_WARNING« event_type_for_log=«$event_type_for_log_WARNING« message_header=«$message_header_WARNING« tag_label=«$tag_label_WARNING« ;; 2|3) # danger | warning+danger event_type_for_message=«$event_type_for_message_DANGER« event_type_for_log=«$event_type_for_log_DANGER« message_header=«$message_header_DANGER« tag_label=«$tag_label_DANGER« ;; esac if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘message_sent’ ) == 0 )); then # !!! flaw: if another virus will arise, no message will be sent till reboot # one time action print_controller_log_entry «$event_type_for_log« «$message_header« echo -e «$virus_report« | tee >( message «$event_type_for_message« «$message_header« —payload —silent ) if (( assign_tag_to_worker )); then message tag «$tag_label« —silent fi set_checkup_counter «${FUNCNAME[0]}« message_sent 1 fi is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi return $(( is_something_happened )) } function checkup:is_NAND_in_RO_mode { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=error # error|warning|info local -r event_type_for_message=error # error|warning|info|success # consts local -r -a directories_on_NAND=( /nvdata /config ) # vars local directory_to_check message_header temp_file local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) local -i is_write_failed_FLAG=0 # code if ! is_checkup_counter_set «${FUNCNAME[0]}« message_sent; then # one time action for directory_to_check in «${directories_on_NAND[@]}«; do # check is directory exist [[ ! -d «$directory_to_check« ]] && continue # 1st check, a simple ‘test -w’ if [[ ! -w «$directory_to_check« ]]; then is_write_failed_FLAG=1 else # 2nd check, create a temp file if ! temp_file=«$( mktemp -p «$directory_to_check« 2> /dev/null )«; then is_write_failed_FLAG=1 else # 3rd check, try to open a temp file for write if ! true >> «$temp_file«; then is_write_failed_FLAG=1 fi rm -rf «$temp_file« fi fi if (( is_write_failed_FLAG )); then message_header=«Cannot write to $directory_to_check. NAND is in the read-only state, the ASIC may need a service« print_controller_log_entry «$event_type_for_log« «$message_header« message «$event_type_for_message« «$message_header« —silent set_checkup_counter «${FUNCNAME[0]}« message_sent 1 is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi done else is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) # i’m not sure that’s right fi return $(( is_something_happened )) } function checkup:is_there_JFFS2_error { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=SKIP # error|warning|info|success|SKIP local -r message_header=NAND flash error detected. Click for technical details # consts local -r jffs2_errors_RE=jffs2.+(wrong|crc|fail) # vars local jffs2_errors_list message_body local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code if ! is_checkup_counter_set «${FUNCNAME[0]}« message_sent; then # one time action if jffs2_errors_list=«$( dmesg | grep -Ei «$jffs2_errors_RE« )« && [[ -n «$jffs2_errors_list« ]]; then printf -v message_body «Mining is not affected (most likely). It could be in connection with an unclean reboot OR, rarely, with a NAND wear and tear. The first is completely harmless, but the second does suggest that the ASIC’s control board may need a service or replacement in the very near future.nnErrors:nn%s« «$jffs2_errors_list« print_controller_log_entry «$event_type_for_log« «$message_header« if [[ «$event_type_for_message« != SKIP ]]; then message «$event_type_for_message« «$message_header« —silent —payload <<< «$message_body« fi set_checkup_counter «${FUNCNAME[0]}« message_sent 1 is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi else is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) # i’m not sure that’s right fi return $(( is_something_happened )) } function checkup:is_overclock_profile_exist { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=warning # error|warning|info|success local -r message_header=For maximum power efficiency you only have to apply an Overclocking profile # consts local -r oc_profile_file=/config/profile.txt local -r is_series_17_RE=Antminer [STX]17 local -r is_series_19_RE=Antminer [ST]19 # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code # quick assert for Custom FW # shellcheck disable=SC2154 # bc defined in the asic-model (( IS_ASIC_CUSTOM_FW )) || return $(( exitcode_OK_NOTHING_HAPPENED )) # ok, check the Series’ number if [[ «$ASIC_MODEL« =~ $is_series_17_RE || «$ASIC_MODEL« =~ $is_series_19_RE ]]; then if [[ ! -s «$oc_profile_file« ]]; then if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘oc_profile_not_found’ ) == 0 )); then # one time action print_controller_log_entry «$event_type_for_log« OC profile not found or empty message «$event_type_for_message« «$message_header« —silent set_checkup_counter «${FUNCNAME[0]}« oc_profile_not_found 1 is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi else if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘oc_profile_not_found’ ) > 0 )); then # one time action print_controller_log_entry info OC profile returns back set_checkup_counter «${FUNCNAME[0]}« oc_profile_not_found 0 fi fi fi return $(( is_something_happened )) } function checkup:is_fw_signed { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message=warning # error|warning|info|success local -r message_header=For maximum security you only have to install a signed firmware # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code if ! ant-functions.sh is_custom_fw_signed; then if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘fw_is_unsigned’ ) == 0 )); then # one time action print_controller_log_entry «$event_type_for_log« Firmware is unsigned message «$event_type_for_message« «$message_header« —silent set_checkup_counter «${FUNCNAME[0]}« fw_is_unsigned 1 is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi else if (( $( get_checkup_counter «${FUNCNAME[0]}» ‘fw_is_unsigned’ ) > 0 )); then # one time action print_controller_log_entry info Firmware is signed now set_checkup_counter «${FUNCNAME[0]}« fw_is_unsigned 0 fi fi return $(( is_something_happened )) } function checkup:is_miner_niceness_ok { (( script_DEBUG )) && debugcho # consts local -r is_series_17_RE=Antminer [STX]17 local -r is_series_19_RE=Antminer [ST]19 # vars local this_pid local -i this_pid_niceness local -a proc_stat_parsed_ARR=() # flags local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code # quick assert for Custom FW # shellcheck disable=SC2154 # bc defined in the asic-model (( IS_ASIC_CUSTOM_FW )) || return $(( exitcode_OK_NOTHING_HAPPENED )) # ok, check the Series’ number if [[ «$ASIC_MODEL« =~ $is_series_17_RE || «$ASIC_MODEL« =~ $is_series_19_RE ]]; then for this_pid in $( pidof bmminer cgminer ); do if read -r -a proc_stat_parsed_ARR < «/proc/$this_pid/stat«; then this_pid_niceness=«${proc_stat_parsed_ARR[18]}« if (( this_pid_niceness != 10 )); then renice -10 «$this_pid« is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi fi done fi return $(( is_something_happened )) } function checkup:are_logs_updated { (( script_DEBUG )) && debugcho # consts local -r -a logs_to_check=( /config/watchdog.log # Hiveon 9/15/17/19 /nvdata/miner_status.log # Hiveon 15/17/19 /tmp/auto-tune # Hiveon 9 /tmp/freq # Hiveon 9 (awfully organized log without any timestamps) /tmp/fault.log # Hiveon 15/17/19 /tmp/tune_log.txt # Hiveon 15/17/19 /var/log/log # Hiveon 15/17/19 /var/log/messages # all Antminers ??? /www/logs/lighttpd.error.log # all Antminers ??? ) # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code get_new_lines_from_log «${logs_to_check[@]}« > >( filter_lines_send_messages ) # ??? could that be the exitcode will come from the last command in chain? I think not, there’s a simple redirection # shellcheck disable=SC2181 # bc it’s more suitable to check an exit code separately if (( $? != 0 )); then is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) fi return $(( is_something_happened )) } function execute:cache_hive_ip { (( script_DEBUG )) && debugcho # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code /hive/bin/cache-hive-ip > /dev/null || is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) return $(( is_something_happened )) } function execute:agent_screen_dontattach { (( script_DEBUG )) && debugcho # vars local -i is_something_happened=$(( exitcode_OK_NOTHING_HAPPENED )) # code /hive/bin/agent-screen dontattach || is_something_happened=$(( exitcode_WARNING_SOMETHING_HAPPENED )) return $(( is_something_happened )) } function print_checkup_summary_report { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=info # error|warning|info local -r event_type_for_message= # error|warning|info|success # vars local -a checkups_list_ARR=() local this_checkup local -i alarm_counter idle_counter total_counter local -i number_of_alarmed_checkups=0 total_number_of_checkups=0 # code readarray -t checkups_list_ARR < <( list_checkup_counters ) # you know, <<< $() operator is slower than < <() # get number_of_alarmed_checkups for this_checkup in «${checkups_list_ARR[@]}«; do alarm_counter=«$( get_checkup_counter «$this_checkup« alarm )« if (( alarm_counter != 0 )); then (( number_of_alarmed_checkups++ )) fi done total_number_of_checkups=«${#checkups_list_ARR[@]}« if (( number_of_alarmed_checkups == 0 )); then print_controller_log_entry «$event_type_for_log« Controller daily report: everything was OK over the past 24h else print_controller_log_entry «$event_type_for_log« «Controller daily report, $number_of_alarmed_checkups/$total_number_of_checkups checkups involved:« #printf ‘%33.33s %-35.35s %7.7s %7.7sn’ » ‘Checkup’ ‘Alarms’ ‘Total’ for this_checkup in «${checkups_list_ARR[@]}«; do alarm_counter=«$( get_checkup_counter «$this_checkup« alarm )« if (( alarm_counter != 0 )); then idle_counter=«$( get_checkup_counter «$this_checkup« idle )« (( total_counter = alarm_counter + idle_counter )) printf %33.33s %-35.35s %u/%u eventsn «$this_checkup« «$alarm_counter« «$total_counter« fi reset_checkup_counter «${this_checkup}« alarm reset_checkup_counter «${this_checkup}« idle done fi return $(( exitcode_OK )) # FIX: should not affect checkup_counters in any way } # # cron # # populate_array_with_actual_cron_jobs() # wait_for_next_minute() # do_cron_jobs_indefinitely() # function populate_array_with_actual_cron_jobs { (( script_DEBUG )) && debugcho «$@« # # Usage: populate_array_with_actual_cron_jobs ‘crontab_array_name’ ‘jobs_to_do_array’ # # Get crontab array, put command(s) to run atm to jobs_to_do_array # # crontab array example: # # +————- minute (0 — 59) # | +————- hour (0 — 23) # | | +————- day of the month (1 — 31) # | | | +————- month (1 — 12) # | | | | +————- day of week (1..7); 1 is Monday # | | | | | # * * * * * command to execute # # crontab=( # ‘* * * * * every-minute-job’ # ‘*/2 * * * * every-2-minute-job’ # ’13 * * * * 13th-minute-of-every-hour-job’ # ‘@hourly hourly-job’ # ‘* * * * */2 tuesday-thursday-saturday-job’ # ) # # cron fields should be delimited by space(s) or tab(s) # supports @hourly, @daily, @midnight and @weekly specials # # args (( $# != 2 )) && { errcho invalid number of arguments; return $(( exitcode_ERROR_IN_ARGUMENTS )); } local -r -n _crontab_ARR=«${1-}« # by ref local -r -n _jobs_to_do_ARR=«${2-}« # by ref # consts local -r -i M=0 H=1 d=2 m=3 u=4 CMD=5 # field order local -r -a cron_fields_dictionary=( [M]=%-M [H]=%-H [d]=%-d [m]=%-m [u]=%-u [CMD]=CMD ) # field strftime() format local -r asterisk_RE=^[*]/[0-9]{1,2}$ local -r number_RE=^[0-9]{1,2}$ local -r valid_crontab_line_RE=^((([*]|[0-9]{1,2})(/[0-9]{1,2})?[[:space:]]+){5}|(@hourly|@daily|@midnight|@weekly)[[:space:]]+)[^[:space:]]+ # ^((( | )( ) ) |( | | | ) ) # vars local -a crontab_line_splitted_ARR local -i start_time line_iterator field_iterator this_field_time_value local crontab_line_raw cmd_to_exec this_field # code start_time=«$( get_current_system_time_in_seconds )« _jobs_to_do_ARR=() # reset jobs_to_do # for each crontab line for (( line_iterator=0; line_iterator < ${#_crontab_ARR[@]}; line_iterator++ )); do crontab_line_raw=«${_crontab_ARR[line_iterator]}« if [[ ! «$crontab_line_raw« =~ $valid_crontab_line_RE ]]; then errcho «invalid crontab line ‘$crontab_line_raw« continue fi read -r -a crontab_line_splitted_ARR <<< «$crontab_line_raw« # transform the specials case «${crontab_line_splitted_ARR[0]}« in @hourly) crontab_line_splitted_ARR=( 0 * * * * «${crontab_line_splitted_ARR[@]:$H}« );; @daily | @midnight) crontab_line_splitted_ARR=( 0 0 * * * «${crontab_line_splitted_ARR[@]:$H}« );; @weekly) crontab_line_splitted_ARR=( 0 0 * * 0 «${crontab_line_splitted_ARR[@]:$H}« );; @monthly) crontab_line_splitted_ARR=( 0 0 1 * * «${crontab_line_splitted_ARR[@]:$H}« );; esac # for each field in line for (( field_iterator=0; field_iterator <= CMD; field_iterator++ )); do if (( field_iterator == CMD )); then # add a command to array cmd_to_exec=«${crontab_line_splitted_ARR[*]:$CMD}« # note: *, not @ _jobs_to_do_ARR+=( «$cmd_to_exec« ) break fi this_field=«${crontab_line_splitted_ARR[field_iterator]}« this_field_time_value=«$( format_date_in_seconds «$start_time« «${cron_fields_dictionary[field_iterator]}« )« if [[ «$this_field« =~ $asterisk_RE ]] && (( this_field_time_value % ${this_field##*/} != 0 )); then # handle * and */num break elif [[ «$this_field« =~ $number_RE ]] && (( this_field_time_value != this_field )); then # handle numbers break fi done done } function wait_for_next_minute { (( script_DEBUG )) && debugcho # vars local -i current_seconds # code printf -v current_seconds «%(%-S)T« -1 snore $(( 60 current_seconds )) # if seconds is 00 at the start, wait for a full minute } function do_cron_jobs_indefinitely { (( script_DEBUG )) && debugcho # templates local -r event_type_for_log=warning # error|warning|info local -r event_type_for_message= # error|warning|info|success # consts local -r -i loop_duration_in_s=60 # 60 seconds for production. you can change it for the debug purposes local -r is_installation_running_RE=(selfupgrade|firmware-upgrade) local -r is_Client_starting_RE=(S69hive|/hive/bin/hive|hive_autorun) # vars local -a jobs_to_do_ARR=() local -i time_before_execution_in_s time_after_execution_in_s execution_time_in_s job_iterator local current_process_list job_to_execute # code while true; do time_before_execution_in_s=«$( get_current_system_time_in_seconds )« current_process_list=«$( ps w )« if [[ «$current_process_list« =~ $is_installation_running_RE ]]; then # do wait for Client installation to be finished bc we don’t have /hive atm and this could fire a false positive print_controller_log_entry «$event_type_for_log« «Upgrade running, skipping checks…« increment_checkup_counter upgrade_running alarm elif [[ «$current_process_list« =~ $is_Client_starting_RE ]]; then print_controller_log_entry «$event_type_for_log« «The Client starting, skipping checks…« else # do cron work populate_array_with_actual_cron_jobs crontab jobs_to_do_ARR for (( job_iterator=0; job_iterator < ${#jobs_to_do_ARR[@]}; job_iterator++ )); do job_to_execute=«${jobs_to_do_ARR[job_iterator]}« # !!! possible flaw: we have no any time limits here eval «$job_to_execute« # shellcheck disable=SC2181 # bc it’s more suitable to check an exit code separately if (( $? == 0 )); then increment_checkup_counter «$job_to_execute« idle else increment_checkup_counter «$job_to_execute« alarm fi done fi time_after_execution_in_s=«$( get_current_system_time_in_seconds )« (( execution_time_in_s = time_after_execution_in_s time_before_execution_in_s )) if (( execution_time_in_s > $( calculate_percent_from_number 80 «$loop_duration_in_s» ) )); then print_controller_log_entry «$event_type_for_log« «Controller lagging? Routine checkup took ${execution_time_in_s}s ( > 80% of an idle time which is ${loop_duration_in_s}s )« increment_checkup_counter controller_lagging alarm fi wait_for_next_minute done } # global consts declare -r RIG_CONF_default=/hive-config/rig.conf declare -r RIG_CONF=«${RIG_CONF:-$RIG_CONF_default}« # for ASIC emulator: set to default only if RIG_CONF variable is empty declare -r -i assign_tag_to_worker=1 # could be in a config file? declare -r -i log_lines_to_tail=200 declare -r unique_delimiter=«d${RANDOM}e${RANDOM}l${RANDOM}i${RANDOM}m« declare -r -i exitcode_OK_NOTHING_HAPPENED=0 declare -r -i exitcode_WARNING_SOMETHING_HAPPENED=1 declare -r ntp_server=pool.ntp.org declare -r https_semaphore_flag_FILE=«/run/hive/https-supported.flag« declare -r ca_cert_FILE=/etc/ssl/certs/ca-certificates.crt # global sources # shellcheck disable=SC1091 # just because { source /hive/bin/asic-model || echo ERROR: /hive/bin/asic-model not found source /hive/bin/colors || echo ERROR: /hive/bin/colors not found source /hive/bin/hive-functions.sh || { echo ERROR: /hive/bin/hive-functions.sh not found; exit 1; } } # global exports [[ ! «$PATH« =~ (^|:)/hive/bin:/hive/sbin(:|$) ]] && export PATH=«$PATH:/hive/bin:/hive/sbin« # add only if not exist [[ ! «$LD_LIBRARY_PATH« =~ (^|:)/hive/lib(:|$) ]] && export LD_LIBRARY_PATH=«${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/hive/lib« # save $LD_LIBRARY_PATH:/hive/share/S9/lib for hiveon # global vars declare time_source # ntpd|ntpdate|hive declare -i is_RIG_ID_ok_FLAG=0 # means NOT OK at the start, will check this (and set to OK) in is_custom_fw_config_in_sync() later declare -i is_https_allowed_FLAG=0 # crontab # shellcheck disable=SC2034 declare -a crontab=( */5 * * * * checkup:is_miner_config_in_sync_with_FS */2 * * * * checkup:are_logs_updated * * * * * checkup:is_overclock_profile_exist */2 * * * * checkup:is_custom_fw_config_in_sync */2 * * * * checkup:is_miner_niceness_ok */2 * * * * checkup:is_build_updated */5 * * * * execute:agent_screen_dontattach */10 * * * * checkup:is_it_the_past */10 * * * * checkup:is_virus_found @hourly checkup:is_RAM_full @hourly checkup:is_NAND_has_enough_free_space @hourly checkup:is_there_JFFS2_error @hourly execute:cache_hive_ip @midnight checkup:is_NAND_in_RO_mode @midnight print_checkup_summary_report ) # ‘* * * * * checkup:is_fw_signed’ # forging ahead # main() #TODO: #watchdog alert #DNS checks #wd # extended virus checks # check https, set flag is_https_allowed; grab_exit_code_to_flag is_https_allowed_FLAG curl_protocol=«$( get_curl_cmdline )« parse_arguments «$@« initialize_dictionaries print_controller_log_entry info «Controller $script_version started« check_ntpd do_cron_jobs_indefinitely # shellcheck disable=SC2154 # bc defined in the library exit $(( exitcode_ERROR_SOMETHING_WEIRD )) # you should never see that, they’ve said

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error the forest
  • Fatal error the dynamic library rld dll failed to load please confirm that симс средневековье
  • Fatal error the dynamic library rld dll failed to load fifa 13
  • Fatal error occurred omsi will be closed
  • Fatal error the dynamic library rld dll failed to load crysis 3

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии