I have a modem connected to a computer. Where are the statistics collected? How to check if it uses 3g or LTE? maybe some script in python or bash?
If your Internet connection working via 4G LTE or 3G modem, you can check stats simply with the ifconfig command. To store daily, weekly, monthly stats, use the vnstat command. You need to install the vnstat command on your Linux device.
Do you know where statistics on the modem’s power in the system are stored?
No idea. You question is not clear. Do you want to see how much bytes transfer in or out in particular day or session? If so use vnstat command for modem interface.
yes, you are right. I mainly care about the information below:
Every modem has for example:
- signal strength: 3/5 (range lines) what can i see in the web: http://192.168.8.1/html/home.html
- lte now my modem use lte not 3g what can i see in the web: http://192.168.8.1/html/home.html
Does linux remember this information somewhere?which network is used(3g or lte) or what signal strength does the modem have?
Those are stored on 3G/LTE modem stick or router. You can’t access them from Windows or macOS or Ubuntu/CentOS Linux. The only way to access it using a web browser. How do you connect to your this deice? USB port? Wifi? Ethernet?
name of modem usb: e3372h-153
i’m connect via usb port. i found a solution, but it’s problem with python code, can’t work.
Traceback (most recent call last):
File “./hstatus.py”, line 272, in
File “./hstatus.py”, line 220, in print_device_info
d = call_api(device_ip, token, ‘/api/device/information’)
File “./hstatus.py”, line 59, in call_api
raise Exception('Received error code ’ + d[‘error’][‘code’] + ’ for URL ’ + r.url)
Exception: Received error code 125002 for URL http://192.168.8.1/api/device/information