易截截图软件、单文件、免安装、纯绿色、仅160KB

linux上c语言 获得网络接口的统计值

这个东东,蛮好玩的。其实就是读取了/proc/net/dev 文件。
struct netdev_stats {
    unsigned long long rx_packets_m;    /* total packets received       */
    unsigned long long tx_packets_m;        /* total packets transmitted    */
    unsigned long long rx_bytes_m;  /* total bytes received         */
    unsigned long long tx_bytes_m;  /* total bytes transmitted      */
    unsigned long rx_errors_m;      /* bad packets received         */
    unsigned long tx_errors_m;      /* packet transmit problems     */
    unsigned long rx_dropped_m;     /* no space in linux buffers    */
    unsigned long tx_dropped_m;     /* no space available in linux  */
    unsigned long rx_multicast_m;   /* multicast packets received   */
    unsigned long rx_compressed_m;
    unsigned long tx_compressed_m;
    unsigned long collisions_m;
    /* detailed rx_errors: */
    unsigned long rx_length_errors_m;
    unsigned long rx_over_errors_m; /* receiver ring buff overflow  */
    unsigned long rx_crc_errors_m;  /* recved pkt with crc error    */
    unsigned long rx_frame_errors_m;        /* recv'd frame alignment error */
    unsigned long rx_fifo_errors_m; /* recv'r fifo overrun          */
    unsigned long rx_missed_errors_m;&nb


相关文档:

如何实现Linux与windows的文件传输?

如何实现Linux与windows的文件传输?
2007年05月22日 星期二 20:54
 一.概述   
  本文讲述了在Linux主机与windows主机之间如何互传文件的方法。因为有的时候,linux主机中的一些文件可能会在windows环境下用到。例如在linux主机中抓了一些图片,想把它们传到windows主机上以作为word文档的插图。又或者从Windows ......

Linux 没有定义的符号 调试方法 nm命令


nm命令
[
在GNU C语言库提供的内容中,有接口可以用来做这件事。用下面的命令查看:
nm -D /lib/libc.so.6 | grep log
]
nm命令还是比较简单而且强大的。它用来列出一个目标文件中的各种符号。符号的种类很多,以下是一些常见的符号类型
nm输出字符
含义
R
Read only symbol. 比如在代码中有一个const MAXDATA ......

linux rhel5 DNS 详解5


(七)DNS服务器配置实例
举例一:
使用view语句搭建具有内外视图功能的DNS服务器,并能够根椐不同的客户端地址实现不同的解析结果,假设局域网地址为192.168.255.0/24,局域网内各主机分别为rhel1:192.168.255.128; rhel2:192.168.255.12;  rhel3:192.168.255.129; rhel4:192.168.255.120; rhel5:192.168.255.4为 ......

怎么在Linux中添加新的系统调用

      系统调用是应用程式和操作系统内核之间的功能接口。其主要目的是使得用户
能使用操作系统提供的有关设备管理、输入/输入系统、文件系统和进程控制、
通信及存储管理等方面的功能,而不必了解系统程式的内部结构和有关硬件细
节,从而起到减轻用户负担和保护系统及提高资源利用率的作用。 ......

linux获取系统时间

1.时间表示
在程序当中,我们经常要输出系统当前的时间,比如我们使用date命令的输出结果。这个时候我们可以使用下面两个函数
time_t time(time_t *tloc);                    //时间精度为秒
char *ctime(const time_ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号