Package: hxtools
Version: 20251011-1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

root@debian:~# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    
packets errs drop fifo colls carrier compressed
    lo: 315689499 3749706    0    0    0     0          0         0 315689499 
3749706    0    0    0     0       0          0
enp7s0:       0       0    0    0    0     0          0         0        0      
 0    0    2    0     0       0          0
enp8s0:       0       0    0    0    0     0          0         0        0      
 0    0    2    0     0       0          0
enp65s0f0np0: 31502150911179 21726017179  594 76357    0     0          0   
6132709 28152066122932 18975690995    0    0    0     0       0          0
enp65s0f1np1:       0       0    0    0    0     0          0         0        
0       0    0    2    0     0       0          0
lxcbr0:       0       0    0    0    0     0          0         0        0      
 0    0 1826    0     0       0          0
docker0:       0       0    0    0    0     0          0         0        0     
  0    0  815    0     0       0          0



But running with `/usr/libexec/hxtools/hxnetload enp65s0f0np0` nothing happens.

This is because regexp on line 28 is incorrect.

    cat "$COMPAT_PROC/proc/net/dev" | grep " $1" | cut -f 2 -d:;


should be:


    cat "$COMPAT_PROC/proc/net/dev" | grep "^ *$1:" | cut -f 2 -d:;


instead

And while at it, optimize a little:

    grep "^ *$1:" "$COMPAT_PROC/proc/net/dev" | cut -f 2 -d:;



Cheers,
Witold

-- System Information:
Debian Release: forky/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.19.0-rc1 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages hxtools depends on:
ii  libc6                   2.42-6
ii  libfile-find-rule-perl  0.35-1
ii  libgcc-s1               15.2.0-12
ii  libhx43t64              5.2-1.1
ii  libstdc++6              15.2.0-12
ii  perl                    5.40.1-7

hxtools recommends no packages.

hxtools suggests no packages.

-- no debconf information

Reply via email to