> Thanks a lot for the help. I did read the description, but somehow the
> explanation was not too clear for me! Perhaps because I am a non-native.
> 
> What I am asking about is perhaps "What is the meaning of the returned 
>rows
> from these 2 queries" ?
> select distinct ip_src from acct_v2;
> select distinct ip_dst from acct_v2;

    By SQL syntax i can say that you see not sorted list of not repeated
(distinct) ip addresses (source for first select, and destination for
second). I think this is not very useful information.
    Enrico describe another select command.
    Do you know SQL language?

  
> Thanks and best regards
> 
> 
>>    Hello Ahmed,
>>    Sorry but you NEED to read with attention description those parameters
>> that you use.
>>
>>
>> > Oh sweat, I was only recording the last 10minutes, and was wondering why
>> > mysql was blazing fast :)
>> > Changed line to be:
>> > sql_history: 3M
>> >
>> > This records last 3 months, I will generally query for only last 30 days
>>
>>     'sql_history' not limited period for gathering information. "The
>> supplied value defines the time slot width during which 
>>bytes/packets/flows
>> counters for each entry are accumulated." Now all data fields will be
>> summarized during a three month (for your config). And you can't select
>> values for each day. Do you want that?
>>    I am usung following settings:
>>
>> sql_history: 1d
>> sql_history_roundoff: h
>>
>>
>> > Now, if I could understand why ip_src and ip_dst count are different I
>> >would be happier
>>
>>     Sorry but i don't understand what do you mean "ip_src and ip_dst 
>>count"
>> and why it must be equal (see Enrico answer with attention)?
>>
>>    Alex
>>
>>
>> > Thanks and best regards
>> >
>> >>
>> >> Um, sorry one more basic question. My config is below (straight from
>> >> examples), and the v2 table I have has a "bytes" column. I am not so
>> sure
>> >>if
>> >> this bytes column is for download or upload or both. In my sql query I
>> >>need
>> >> to get the download and upload bytes per host IP address in last 30
>> days,
>> >>a
>> >> la
>> >>
>> >> IP    DOWN    UP
>> >> 1.2.3.4  600M 100M
>> >> 5.6.7.8  800M  80M
>> >>
>> >> Is it possible to get this info, from this config:
>> >>
>> >> interface: eth1
>> >> daemonize: true
>> >> aggregate: src_host,dst_host
>> >> ! aggregate: src_net,dst_net
>> >> ! plugins: pgsql
>> >> plugins: mysql
>> >> sql_db: pmacct
>> >> sql_table: acct_v2
>> >> sql_table_version: 2
>> >> sql_passwd: xxxxx
>> >> sql_user: pmacct
>> >> sql_refresh_time: 90
>> >> ! sql_optimize_clauses: true
>> >> sql_history: 10m
>> >> sql_history_roundoff: mh
>> >> ! sql_preprocess: qnum=1000, minp=5
>> >> !
>> >> networks_file: /etc/pmacct/pmacct-networks
>> >>
>> >>
>> >>  yes,
>> >>
>> >> query  download:
>> >>  SELECT sum( bytes )
>> >> FROM `table`
>> >> WHERE ip_dst = '1.2.3.4'
>> >>
>> >> query  upload:
>> >>  SELECT sum( bytes )
>> >> FROM `table`
>> >> WHERE ip_src = '1.2.3.4'
>> >>
>> >> another way: mahe this changes in the script
>> >> !download
>> >> aggregate[in]: src_host, dst_host
>> >> aggregate_filter[in]: dst host 1.2.3.4
>> >>
>> >> !upload
>> >> aggregate[out]: src_host, dst_host
>> >> aggregate_filter[out]: src host 1.2.3.4
>> >>
>> >> !you need data per mounth
>> >> sql_history: 30m
>> >> sql_refresh_time: 300
>> >>
>> >> then you can make a sum per column
               


------
Тарифный план 'ПРОНТО' от 'БеСТ': бесплатные внутрисетевые разговоры
со второй минуты общения. Подключайся до 30 июня. 
Подробнее: http://www.best.by. ПРОНТО: Cвои – не платят! Cвои – общаются!

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

Reply via email to