如何從 vmcore 取得 /proc/net/dev?

如何從 vmcore 取得 /proc/net/dev?

我的系統(CentOS6)崩潰了,我得到了一個 vmcore。

現在我想知道如何進入/proc/net/devvmcore,或如何取得網路統計計數器資料(例如netstat -s)?

我在CentOS7上觸發崩潰,運行netstruct命令後我可以找到一些計數器:

crash> net
   NET_DEVICE     NAME   IP ADDRESS(ES)
ffff881053f97000  lo     127.0.0.1
ffff88084ece0000  eth0   xxx.xxx.xxx.xxx
ffff88084e480000  eth1   xxx.xxx.xxx.xxx
crash> struct net_device ffff88084ece0000
......
stats = {
    rx_packets = 122192214759, 
    tx_packets = 122785688757, 
    rx_bytes = 140670240738618, 
    tx_bytes = 136965095362827, 
    rx_errors = 0, 
    tx_errors = 0, 
    rx_dropped = 0, 
......

但這在 CentOS6 中沒有意義,我只是得到所有計數器 0:

crash> net
   NET_DEVICE     NAME   IP ADDRESS(ES)
ffff881028a10020  lo     127.0.0.1
ffff8820253a4020  eth0   xxx.xxx.xxx.xxx
ffff8820253a8020  eth1   xxx.xxx.xxx.xxx
......
stats = {
    rx_packets = 0, 
    tx_packets = 0, 
    rx_bytes = 0, 
    tx_bytes = 0, 
    rx_errors = 0, 
    tx_errors = 0, 
    rx_dropped = 0, 
......

這是否意味著 CentOS6 上的網路計數器不會儲存在記憶體中?

謝謝!

相關內容