[modem-stats-telnet-broadcom] Prometheus howto or other?

This package is not available anymore and i get package not found but it is available on GitHub

Can someone please help me install this package on my own?

Thank you, :hugs:

And one more question This package uses telnet to get stats from modem connected in bridge mode?

 local fd = io.popen("/etc/init.d/dsl_control lucistat")

= local scraper ( not telnet )

what modem?

My modem is vdsl2 and it has Broadcom's chip BCM63381 in it. This modem is from my ISP and has ISP name printed on it.
It is from FiberHome and model number is HG150-UB

as mentioned Rpi4 < $(community_build)

first gain/confirm basic access the modem... then find the relavent script samples on the forum that poll the modem stats into luci-app-statistics...

it requires getting your hands a little dirty... mostly just to test the fundamental connectivity / command operation... if your modem command set is different... then you/we need to re-assess... get more input...

i'm not aware of simpler methods for 'aggregated graphical output'... unless you perhaps can poll the modem via SNMP...

1 Like

sorry for my stupidity
I was suppose to run that command, I am so sorry :astonished:
here is the output

echo "********"; sleep 1; echo "*****"; sleep 1; echo "xdslctl info --stats"; sleep 2 | nc ******
3 2>&1
*****
*****
xdslctl info --stats
!BCM963381 Broadband Router

ok good... thats 1/3 of the setup... looks like you have basic telnet access ok...

i don't like the look of the output... but I have no idea about exactly what should display / is available etc...

i'd suggest you telnet in manually... and run the command / s again... and try to use '?' etc... to work out what works...

i.e.;

xdslcmd info --state

telnetd:error:285.199:processInput:386:unrecognized command xdslcmd info --state

adsl info --show
adsl info --stats
xdsl info --show
xdsl info --stats
xdsl info --state
?

or try running 'sh' before or proceeding the above commands...

here is the output of help command

 > help
?
help
logout
exit
quit
reboot
adsl
xdslctl
xtm
brctl
cat
virtualserver
ddns
df
loglevel
logdest
dumpcfg
dumpmdm
dumpeid
mdm
meminfo
kill
dumpsysinfo
exitOnIdle
dnsproxy
syslog
echo
ifconfig
ping
ps
pwd
seclog
sntp
sysinfo
tftp
wlctl
arp
defaultgateway
dhcpserver
dns
lan
lanhosts
passwd
ppp
restoredefault
route
save
swversion
uptime
cfgupdate
swupdate
wan
mcpctl
btrmcfg
flashsize
> adsl info --show
adsl: ADSL driver and PHY status
Status: Showtime
Last Retrain Reason:    0
Last initialization procedure status:   0
Max:    Upstream rate = 41153 Kbps, Downstream rate = 77152 Kbps
Bearer: 0, Upstream rate = 10742 Kbps, Downstream rate = 23597 Kbps

Link Power State:       L0
Mode:                   VDSL2 Annex B
VDSL2 Profile:          Profile 17a
TPS-TC:                 PTM Mode(0x0)
Trellis:                U:ON /D:ON
Line Status:            No Defect
Training Status:        Showtime
                Down            Up
SNR (dB):        31.2            29.7
Attn(dB):        17.7            0.0
Pwr(dBm):        13.7            9.4

                        VDSL2 framing
                        Bearer 0
MSGc:           24              36
B:              31              31
M:              1               1
T:              64              64
R:              10              2
S:              0.0431          0.0947
L:              7792            2873
D:              187             9
I:              42              34
N:              42              34

                        Counters
                        Bearer 0
OHF:            2527791         991106
OHFErr:         0               0
RS:             970579729               443932622
RSCorr:         0               0
RSUnCorr:       0               0

                        Bearer 0
HEC:            0               0
OCD:            0               0
LCD:            0               0
Total Cells:    476701990               0
Data Cells:     33872115                0
Drop Cells:     0
Bit Errors:     0               0

ES:             0               0
SES:            0               0
UAS:            35              35
AS:             10508

                        Bearer 0
INP:            0.50            0.00
INPRein:        0.00            0.00
delay:          2               0
PER:            4.15            10.64
OR:             57.75           31.56
AgR:            23654.64        10773.91

Bitswap:        1020/1020               72/72

 > adsl info --stats
adsl: ADSL driver and PHY status
Status: Showtime
Last Retrain Reason:    0
Last initialization procedure status:   0
Max:    Upstream rate = 41153 Kbps, Downstream rate = 77168 Kbps
Bearer: 0, Upstream rate = 10742 Kbps, Downstream rate = 23597 Kbps

Link Power State:       L0
Mode:                   VDSL2 Annex B
VDSL2 Profile:          Profile 17a
TPS-TC:                 PTM Mode(0x0)
Trellis:                U:ON /D:ON
Line Status:            No Defect
Training Status:        Showtime
                Down            Up
SNR (dB):        31.2            29.6
Attn(dB):        17.7            0.0
Pwr(dBm):        13.7            9.4

                        VDSL2 framing
                        Bearer 0
MSGc:           24              36
B:              31              31
M:              1               1
T:              64              64
R:              10              2
S:              0.0431          0.0947
L:              7792            2873
D:              187             9
I:              42              34
N:              42              34

                        Counters
                        Bearer 0
OHF:            2535491         994125
OHFErr:         0               0
RS:             973536561               445284918
RSCorr:         0               0
RSUnCorr:       0               0

                        Bearer 0
HEC:            0               0
OCD:            0               0
LCD:            0               0
Total Cells:    478154107               0
Data Cells:     33932875                0
Drop Cells:     0
Bit Errors:     0               0

ES:             0               0
SES:            0               0
UAS:            35              35
AS:             10540

                        Bearer 0
INP:            0.50            0.00
INPRein:        0.00            0.00
delay:          2               0
PER:            4.15            10.64
OR:             57.75           31.56
AgR:            23654.64        10773.91

Bitswap:        1029/1029               72/72

Total time = 2 hours 56 min 15 sec
FEC:            0               0
CRC:            0               0
ES:             0               0
SES:            0               0
UAS:            35              35
LOS:            0               0
LOF:            0               0
LOM:            0               0
Retr:           0
Latest 15 minutes time = 11 min 15 sec
FEC:            0               0
CRC:            0               0
ES:             0               0
SES:            0               0
UAS:            0               0
LOS:            0               0
LOF:            0               0
LOM:            0               0
Retr:           0
Previous 15 minutes time = 15 min 0 sec
FEC:            0               0
CRC:            0               0
ES:             0               0
SES:            0               0
UAS:            0               0
LOS:            0               0
LOF:            0               0
LOM:            0               0
Retr:           N/A
Latest 1 day time = 2 hours 56 min 15 sec
FEC:            0               0
CRC:            0               0
ES:             0               0
SES:            0               0
UAS:            35              35
LOS:            0               0
LOF:            0               0
LOM:            0               0
Retr:           0
Previous 1 day time = 0 sec
FEC:            0               0
CRC:            0               0
ES:             0               0
SES:            0               0
UAS:            0               0
LOS:            0               0
LOF:            0               0
LOM:            0               0
Retr:           0
Since Link time = 2 hours 55 min 39 sec
FEC:            0               0
CRC:            0               0
ES:             0               0
SES:            0               0
UAS:            0               0
LOS:            0               0
LOF:            0               0
LOM:            0               0
Retr:           0
NTR: mipsCntAtNtr=0 ncoCntAtNtr=0
1 Like
> xdsl info --show
telnetd:error:740.593:processInput:386:unrecognized command xdsl info --show
 > xdsl info --stats
telnetd:error:757.519:processInput:386:unrecognized command xdsl info --stats
 > xdsl info --state
telnetd:error:765.924:processInput:386:unrecognized command xdsl info --state
 >

all good... you got the commands above... it's adsl...

adsl info --show
adsl info --stats

the sample collectd exec script in the linked thread is for xdsl but i'm pretty sure there is an adsl one or two on the forum so you can search around for it...

while you wait to see if other people can to help advise on the format of the output... etc. etc.

1 Like

yes, the script in the linked thread mostly works... you'll have to change maybe two lines;

###################### 1

#FROM xdslinfo=$( ( sleep 2; echo "$MODEM_LOGIN"; sleep 1; echo "$MODEM_PASSWORD"; sleep 1; echo "xdslctl info --stats"; sleep 2) | nc $MODEM_ADDR 23 2>&1 )
#TO xdslinfo=$( ( sleep 2; echo "$MODEM_LOGIN"; sleep 1; echo "$MODEM_PASSWORD"; sleep 1; echo "adsl info --stats"; sleep 2) | nc $MODEM_ADDR 23 2>&1 )


##################### 2
#FROM if [ "$line_status" == "Showtime" ]; then
#TO if [ "$line_status" = "Showtime" ]; then

etc. etc.

follow the rest of the guide / setup in that thread...

Do i need to follow similar procedure to make it work?

How:

- Install collectd-mod-exec
- Place the files below in their respective location:
  /usr/sbin/collectd-get-lantiqdsl-values
  /usr/bin/stat-lantiqdsl
  /usr/lib/lua/luci/statistics/rrdtool/definitions/exec.lua
- make the data collection script executable:
  # chmod +x /usr/sbin/collectd-get-lantiqdsl-values
- have the data collection script run via cronjob every minute:
  * * * * * /usr/sbin/collectd-get-lantiqdsl-values
- configure collectd-mod-exec to run the data entry script:
  in LuCI: Statistics > Setup > General plugins > Exec
  - Enable this plugin [x]
  - Add a command:
    Script: /usr/bin/stat-lantiqdsl
    User:   nobody
    Group:  nogroup
- (maybe) update LuCI's module cache:
  # rm /tmp/luci-modulecache/* /tmp/luci-indexcache

Please do help me whenever you are free. :hugs:

Thank you,

I cannot help you with the proceedure above...

  • master probably operates differently now
  • the process is probably a tad difficult for regular users

what you can do...

  • is edit the script as described above...
  • test it manually
  • setup a cron job '/path/to/script.sh >> /www/modemstats.txt' to run every say 15-45mins
    ( direct to www above as I know your running on sdcard and not router flash... no real need to worry about ware/space )

you can then see the results at http://IPADDRESS/modemstats.txt

implementing this would be a good indicator that you are ready for the next level / statistics integration...

NOTE: you should also add them both to your /etc/sysupgrade.conf so they are copied across on upgrade...

/path/to/script.sh
/www/modemstats.txt
1 Like