易截截图软件、单文件、免安装、纯绿色、仅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 rehl 5 dns 详解3


RHEL5搭建DNS服务器实现名称解析 三
 
 
(二)named.conf文件说明:
此文件需用户自己创建,可从/usr/share/doc/bind-9.3.3/sample/etc中复制到/var/named/chroot/etc/目录下
// Sample named.conf BIND DNS server 'named' configuration file
// for the Red Hat BIND distribution.
// See the BIND ......

简单的Linux服务器监控脚本

#!/bin/bash
cpu=`top -b -n 1 | grep -w Cpu | awk '{print$5}'| awk -F '%' '{printf"%d",$1}'`
if [ $cpu -le 50 ]
then
echo "cpu: $((100 - cpu))%" > test.txt
mail -s "服务器紧急, CPU占用率过高!" yourmail@domail.com < test.txt
fi
mem=`top -b -n 1 | grep -w Me ......

Samba 安装及简单配置、windows访问linux的简单例子


由于在安装rhel5的时候没哟安装到好Samba,现在只能从新安装了。郁闷啊!(在init.d中没有发现smb和nmb这两个文件)
还好在安装盘里能够找到安装文件。这里就不说了(一堆samba开头的文件。一阵狂点就行了。呵呵……)
Samba 两个服务器相关启动程序、客户端及服务器配置文件
Samba 有两个服务器,一个是s ......

Linux字符设备驱动程序开发

Linux下的设备驱动程序被组织为一组完成不同任务的函数的集合,通过这些函数使得Windows的设备操作犹如文件一般。在应用程序看来,硬件设备只是一个设备文件,应用程序可以象操作普通文件一样对硬件设备进行操作,如open ()、close ()、read ()、write () 等。
Linux主要将设备分为二类:字符设备和块设备。字符设备是指设 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号