项目背景:
我们需要一个简单的基于网页的流量监控软件,有自己的http服务器。有web界面!
实验环境:
vmware workstation 11
服务器:ip:192.168.0.19 关闭iptables
SecureCRT (ssh远程连接软件
实验过程:
一、软件下载、编译安装
1、软件下载
[root@Varnish-server ~]# wget http://down1.chinaunix.net/distfiles/darkstat-2.6.tar.gz
2、软件编译安装
解压:[root@Varnish-server ~]# tar zxvf darkstat-2.6.tar.gz
编译安装:
[root@Varnish-server ~]# cd darkstat-2.6
[root@Varnish-server darkstat-2.6]# ls
ABOUT-NLS config.guess configure darkstat.1 ISSUES missing python
aclocal.m4 config.h.in configure.ac depcomp m4 mkinstalldirs README
AUTHORS config.rpath contrib INSTALL Makefile.am NEWS src
ChangeLog config.sub COPYING install-sh Makefile.in po
[root@Varnish-server darkstat-2.6]# ./configure
[root@Varnish-server darkstat-2.6]# make && make install
二、软件使用
1:在命令行里面输入darkstat
[root@Varnish-server ~]# darkstat
darkstat v2.6 using libpcap v2.4 (x86_64-unknown-linux-gnu)
Firing up threads...
DNS: Thread is awake.
Sniffing on device eth0, local IP is 192.168.0.19WWW: Thread is awake and awaiting connections.
WWW: You are using the English language version.
GRAPH: Starting at 0 secs, 17 mins, 22 hrs, 14 days.
Can't load db from darkstat.db, starting from scratch.
ACCT: Capturing traffic...
Point your browser at http://localhost:666/ to see the stats.
2:在浏览器里面打开 http://localhost:666/
可以感觉到,这个软件特别小巧!!!
总结:Darkstat作为一款简易的,基于网页的流量分析程序,可以在主流的操作系统如Linux、Solaris、MAC、AIX上工作,同时以进程的形式持续后台工作,不断地嗅探网络数据,以简单易懂的形式展现网页上。希望对于大家能有帮助,谢谢大家!!!