zoukankan      html  css  js  c++  java
  • Linux中目录proc/net/dev详解【转】

    转自:https://blog.csdn.net/yzy1103203312/article/details/77848192

    版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yzy1103203312/article/details/77848192
    在Linux系统中,系统调用是操作系统提供给应用程序使用操作系统服务的重要接口,但同时也正是通过系统调用机制,操作系统屏蔽了用户直接访问系统内核的可能性。幸运的是Linux提供了LKM机制可以使我们在内核空间工作,在LKM机制中一个重要的组成部分就是proc伪文件系统,它为用户提供了动态操作Linux内核信息的接口,是除系统调用之外另一个重要的Linux内核空间与用户空间交换数据的途径。

    而proc/net/dev就是提供给用户读取或更改网络适配器及统计信息的途径。

    根据http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html,proc/net/dev中每一项的含义是:

    bytes: The total number of bytes of data transmitted or received by the interface.(接口发送或接收的数据的总字节数)
    packets: The total number of packets of data transmitted or received by the interface.(接口发送或接收的数据包总数)
    errs: The total number of transmit or receive errors detected by the device driver.(由设备驱动程序检测到的发送或接收错误的总数)
    drop: The total number of packets dropped by the device driver.(设备驱动程序丢弃的数据包总数)
    fifo: The number of FIFO buffer errors.(FIFO缓冲区错误的数量)
    frame: The number of packet framing errors.(分组帧错误的数量)
    colls: The number of collisions detected on the interface.(接口上检测到的冲突数)
    compressed: The number of compressed packets transmitted or received by the device driver. (This appears to be unused in the 2.2.15 kernel.)(设备驱动程序发送或接收的压缩数据包数)
    carrier: The number of carrier losses detected by the device driver.(由设备驱动程序检测到的载波损耗的数量)
    multicast: The number of multicast frames transmitted or received by the device driver.(设备驱动程序发送或接收的多播帧数)
    ---------------------
    作者:为幸福写歌
    来源:CSDN
    原文:https://blog.csdn.net/yzy1103203312/article/details/77848192
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    LeetCode OJ-- Count and Say
    3dContactPointAnnotationTool开发日志(二)
    如何将PDF的背景色设置为保护眼睛的苹果绿色
    3dContactPointAnnotationTool开发日志(一)
    随便测测
    360浏览器重新打开不小心关闭的网页
    Unity3d学习日记(四)
    Unity3d学习日记(三)
    Unity3d学习日记(二)
    新的目标ヾ(◍°∇°◍)ノ゙
  • 原文地址:https://www.cnblogs.com/sky-heaven/p/10438866.html
Copyright © 2011-2022 走看看