Hello everybody,

First i would like to thanks all those people that developed pmacct, 
it's a great tool.


I am having some Questions about the "sum_host" - directive.

My system ist currently a Debian Sarge on x86 with pmacct-0.11.3, 
libpcap and a Mysql-Server.
I want to show the Traffic per IP-Address, but only in the range of 
192.168.178.x.

If i start with

    shell>   pmacctd -c sum_host -i eth0 -P print

i get something like this:

ID  CLASS    SRC_MAC            DST_MAC            VLAN   SRC_AS  DST_AS  
SRC_IP           DST_IP  SRC_PORT  DST_PORT  PROTOCOL    TOS    PACKETS     
FLOWS       BYTES
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
192.168.178.20           0         0         ip          0      164         0   
        23416
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
85.25.61.84              0         0         ip          0      11          0   
        674
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
217.72.192.135           0         0         ip          0      23          0   
        3139
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
141.55.192.84            0         0         ip          0      10          0   
        824
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
151.189.21.114           0         0         ip          0      24          0   
        3448
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
213.165.64.22            0         0         ip          0      58          0   
        6538
0   unknown  00:00:00:00:00:00  00:00:00:00:00:00  0      0       0       
134.109.132.178          0         0         ip          0      38          0   
        8793


If i use the src_host, dst_host -directive, i see the 192.x.x.x - IP 
everytime ether in SRC_IP or in DST_IP. Is there any idea, how i can get 
only the Traffic for the 192.x.x.x.x-IP ?

My idea was to write a bash-script which do a mysql-query like this:
      shell>   echo "USE pmacct; SELECT ip_src,ip_dst, sum(bytes) FROM 
table_dynamic GROUP BY ip_src;" | mysql -uroot -ppassword

I want to store this output in a new table, so i can drop the old (much 
bigger) table. After that i want to process this data to a single file 
or a webbased interface, so i can see the Traffic ( sum(bytes)) per 
IP-address.


Can everybody help me with this problem? I also know that there are some 
solutions like BWStat, but this program don't like dynamic tables 
(because i need a table per day).



Cheers and thanks for your help,
Mirko

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to