[root@centos5 ~]# tail -f /var/log/squid/access.log 1268775759.455 351 192.168.55.21 TCP_MISS/200 4864 GET http://www.google.hu/ hrobi DIRECT/74.125.87.106 text/html 1268775759.577 3 192.168.55.21 TCP_NEGATIVE_HIT/204 293 GET http://clients1.google.hu/generate_204 hrobi NONE/- text/html |
[root@centos5 ~]# chmod 755 squidlog.scp [root@centos5 ~]# cat ./squidlog.scp #!/usr/bin/perl -p s/^\d+\.\d+/localtime $&/e; |
[root@centos5 ~]# tail -f /var/log/squid/access.log | /root/squidlog.scp Tue Mar 16 22:44:54 2010 625 192.168.55.21 TCP_MISS/304 239 GET http://www.google.hu/extern_chrome/2e2a706fb6752efb.js hrobi DIRECT/74.125.87.99 - Tue Mar 16 22:44:55 2010 117 192.168.55.21 TCP_REFRESH_HIT/304 379 GET http://www.google.hu/images/nav_logo7.png hrobi DIRECT/74.125.87.99 - |
[root@centos5 ~]# yum --enablerepo=rpmforge install sarg |
Alias /sarg /var/www/sarg <Directory /var/www/sarg> DirectoryIndex index.html Order deny,allow Deny from all Allow from 127.0.0.1 Allow from ::1 # Allow from your-workstation.com Allow from 192.168.55.101 </Directory> |
[root@centos5 ~]# service httpd restart httpd leállítása: [ OK ] httpd indítása: [ OK ] [root@centos5 ~]# |
[root@centos5 ~]# yum install mrtg [root@centos5 ~]# yum install net-snmp |
[root@centos5 ~]# cp /etc/snmp/snmpd.conf /root/conf.orig/ |
com2sec user1 default user1 group user1 v1 user1 group user1 v2c user1 group user1 usm user1 view all included .1 80 access user1 "" any noauth exact all none none syslocation SULI syscontact admin@suli.uz.ua |
[root@centos5 ~]# service snmpd start snmpd indítása: [ OK ] [root@centos5 ~]# chkconfig --levels 235 snmpd on |
[root@centos5 ~]# cfgmaker user1@192.168.55.1 >> /etc/mrtg/mrtg.cfg |
Options[_]: growright, bits |
[root@centos5 ~]# indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html |
Alias /mrtg /var/www/mrtg <Location /mrtg> Order deny,allow Deny from all Allow from 127.0.0.1 Allow from ::1 # Allow from .example.com Allow from 127.0.0.1 Allow from 192.168.55.0/24 </Location> |
[root@centos5 ~]# service httpd restart httpd leállítása: [ OK ] httpd indítása: [ OK ] [root@centos5 ~]# |
[root@centos5 ~]# yum install iptraf ... [root@centos5 ~]# iptraf |