linux - 试图了解 wwan0 上传输的数据量?
问题描述
我有一个通过 lte 调制解调器连接到互联网的 linux 系统,我通过 modemManager 与它通信。所以我在理解消耗的数据字节数方面有点困难。
root@raspberrypi-cm3:~# mmcli -b 0
-------------------------
Status | connected : 'yes'
| suspended : 'no'
| interfaces: 'wwan0'
| IP timeout: '20'
-------------------------
Properties | apn: 'myapn'
| roaming: 'allowed'
| IP type: 'none'
| user: 'none'
| password: 'none'
| number: 'none'
-------------------------
Stats | Duration: '105060'
| Bytes received: '6300'
| Bytes transmitted: '6209'
root@raspberrypi-cm3:~# ping -c 1 -s 0 www.opendns.com
8 bytes from ****.****.****.*** seq =0 ttl=50
1 packet transmitted, 1 packet received, 0% packet loss
root@raspberrypi-cm3:~# mmcli -b 0
-------------------------
Status | connected : 'yes'
| suspended : 'no'
| interfaces: 'wwan0'
| IP timeout: '20'
-------------------------
Properties | apn: 'myapn'
| roaming: 'allowed'
| IP type: 'none'
| user: 'none'
| password: 'none'
| number: 'none'
-------------------------
Stats | Duration: '105090'
| Bytes received: '6512'
| Bytes transmitted: '6359'
所以根据调制解调器管理器。我正在消耗 150 字节的数据来向 opendns 发送 ping 并且我正在接收 212 字节的数据?
但这怎么可能。我正在传输 8 个字节并使用 ICMP 标头接收 8 个字节,总共将收到 16 个字节的数据。
有人能解释一下这些附加数据字节来自哪里吗?当我与我的名称服务器通信时,它们只是一种开销吗?如果那是开销,是否有某种公式可以用来计算消耗的近似数据?
我的最终目标只是交叉验证消耗的总数据字节数
解决方案
我通过使用tcpdump
创建 pcap 文件找到了答案。感谢您对我的问题投了反对票,但没有提供任何答案。对于像我这样的其他初学者。如果您面临类似的问题。请使用tcpdump
它会给您详细解释您的设备发送和接收的数据包。
推荐阅读
- java - @JsonIgnoreProperties(value = "items" , allowGetters = true) 的替代品
- android - java.net.UnknownHostException:无法解析主机“domain.com”:没有与主机名关联的地址
- python - 需要安装 PyOpenGL (Windows)
- pine-script - 如何为使用 stop、trail_points 和 trail_offset 的 strategy.exit 设置交易视图 pine 脚本警报通知
- java - 将数字列表合并到低于和最接近上限数字的算法
- .net - 在 vb.net 中使用 RGB 整数检测图片中的颜色
- c - 如何修复 fftw3 库的“sincos@@GLIBC_2.2.5”未定义参考
- flutter - 如何将sha256的摘要添加到颤动的字符串中?
- javascript - 打开层 6.1。- 具有多点功能的弹出窗口
- microsoft-graph-api - MSGraph 日历事件 多个通知