Re: [PHP] how to calculate how much data does each ip address use ?

2013-02-06 Thread Sean Greenslade
On Wed, Feb 6, 2013 at 11:15 AM, Aaron Holmes  wrote:
> No one has mentioned Cacti yet? It does exactly what Bulent is looking for.
>
> http://cacti.net/
>
>
> On 2/5/13 6:46 PM, Sean Greenslade wrote:
>>
>> On Tue, Feb 5, 2013 at 10:13 AM, Bulent  Malik 
>> wrote:
>>>
>>>
> This task is not really suited for php. I would suggest looking into
>>>
>>> Ntop.
>
> It does exactly what you described.
>>
>> Hello
>>
>> I have  a freebsdbox firewall . also I have some internet customers.
>> I want to save how much data they used in a table ( such as mysql
>> table ) for each ip address.
>> Apache2, php5 and mysql5.5 work on the box.
>>
>> How can I do it ?  any script or tool.
>>
>> Thanks

 How can i save in table using ntop ?  is there any document ?


 --
 PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
 http://www.php.net/unsub.php

 Read the man pages. There are sql export options that you can specify on
 run.
>>>
>>> I could not see any sql options on  the man file of ntop.
>>> Where is it?
>>>
>>>
>>>
>> Whoops, my mistake. I was reading the NetFlow documentation and going
>> off vague memories of older versions of Ntop.
>>
>> Ntop saves data in RRD files. There are PHP libraries to parse this
>> data [1]. You could theoretically scrape the RRDs and put them in a
>> SQL DB, but they may be useful enough on their own if you can parse
>> them correctly. (Note: I have never personally parsed RRDs manually.
>> This info was pulled from a simple Google search. YMMV.)
>>
>> [1]
>> http://www.ioncannon.net/system-administration/59/php-rrdtool-tutorial/
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Neat, I'd never heard of that package before.

-- 
--Zootboy

Sent from some sort of computing device.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to calculate how much data does each ip address use ?

2013-02-06 Thread Aaron Holmes

No one has mentioned Cacti yet? It does exactly what Bulent is looking for.

http://cacti.net/

On 2/5/13 6:46 PM, Sean Greenslade wrote:

On Tue, Feb 5, 2013 at 10:13 AM, Bulent  Malik  wrote:



This task is not really suited for php. I would suggest looking into

Ntop.

It does exactly what you described.

Hello

I have  a freebsdbox firewall . also I have some internet customers.
I want to save how much data they used in a table ( such as mysql
table ) for each ip address.
Apache2, php5 and mysql5.5 work on the box.

How can I do it ?  any script or tool.

Thanks

How can i save in table using ntop ?  is there any document ?


--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

Read the man pages. There are sql export options that you can specify on run.

I could not see any sql options on  the man file of ntop.
Where is it?




Whoops, my mistake. I was reading the NetFlow documentation and going
off vague memories of older versions of Ntop.

Ntop saves data in RRD files. There are PHP libraries to parse this
data [1]. You could theoretically scrape the RRDs and put them in a
SQL DB, but they may be useful enough on their own if you can parse
them correctly. (Note: I have never personally parsed RRDs manually.
This info was pulled from a simple Google search. YMMV.)

[1] http://www.ioncannon.net/system-administration/59/php-rrdtool-tutorial/




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to calculate how much data does each ip address use ?

2013-02-05 Thread Sean Greenslade
On Tue, Feb 5, 2013 at 10:13 AM, Bulent  Malik  wrote:
>
>
>> >This task is not really suited for php. I would suggest looking into
> Ntop.
>> >It does exactly what you described.
>>
>> >> Hello
>> >>
>> >> I have  a freebsdbox firewall . also I have some internet customers.
>> >> I want to save how much data they used in a table ( such as mysql
>> >>table ) for each ip address.
>> >>Apache2, php5 and mysql5.5 work on the box.
>> >>
>> >> How can I do it ?  any script or tool.
>> >>
>> >> Thanks
>>
>> How can i save in table using ntop ?  is there any document ?
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
>> http://www.php.net/unsub.php
>>
>
>>Read the man pages. There are sql export options that you can specify on run.
>
> I could not see any sql options on  the man file of ntop.
> Where is it?
>
>
>

Whoops, my mistake. I was reading the NetFlow documentation and going
off vague memories of older versions of Ntop.

Ntop saves data in RRD files. There are PHP libraries to parse this
data [1]. You could theoretically scrape the RRDs and put them in a
SQL DB, but they may be useful enough on their own if you can parse
them correctly. (Note: I have never personally parsed RRDs manually.
This info was pulled from a simple Google search. YMMV.)

[1] http://www.ioncannon.net/system-administration/59/php-rrdtool-tutorial/

-- 
--Zootboy

Sent from some sort of computing device.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to calculate how much data does each ip address use ?

2013-02-05 Thread Peet Grobler
On 2013/02/01 4:58 PM, Sean Greenslade wrote:
> This task is not really suited for php. I would suggest looking into Ntop.
> It does exactly what you described.

That's one option.

I use a custom system, with perl and bash scripts collecting data and
saving to rrd databases. php script displaying the images.

Using this on a box with 5 interfaces (3 ethernet, 1 openvpn tunnel, 1
ppp session).


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] how to calculate how much data does each ip address use ?

2013-02-05 Thread Bulent Malik


> >This task is not really suited for php. I would suggest looking into
Ntop.
> >It does exactly what you described.
>
> >> Hello
> >>
> >> I have  a freebsdbox firewall . also I have some internet customers.
> >> I want to save how much data they used in a table ( such as mysql  
> >>table ) for each ip address.
> >>Apache2, php5 and mysql5.5 work on the box.
> >>
> >> How can I do it ?  any script or tool.
> >>
> >> Thanks
>
> How can i save in table using ntop ?  is there any document ?
>
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php
>

>Read the man pages. There are sql export options that you can specify on run.

I could not see any sql options on  the man file of ntop.
Where is it? 




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Mike Mackintosh


 Original message 
From: Sean Greenslade  
Date:  
To: Bulent Malik  
Cc: php-general@lists.php.net 
Subject: RE: [PHP] how to calculate how much data does each ip address use ? 
 
On Feb 1, 2013 10:25 AM, "Bulent Malik"  wrote:
>
>
>
> >This task is not really suited for php. I would suggest looking into
Ntop.
> >It does exactly what you described.
>
> >> Hello
> >>
> >> I have  a freebsdbox firewall . also I have some internet customers.
> >> I want to save how much data they used in a table ( such as mysql
> >> table ) for each ip address.
> >>Apache2, php5 and mysql5.5 work on the box.
> >>
> >> How can I do it ?  any script or tool.
> >>
> >> Thanks
>
> How can i save in table using ntop ?  is there any document ?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


Look at www.highonphp.com/regex-pattern-parsing-ifconfig

You can use exec to run ifconfig and parse the output using the above.

RE: [PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Sean Greenslade
On Feb 1, 2013 10:25 AM, "Bulent Malik"  wrote:
>
>
>
> >This task is not really suited for php. I would suggest looking into
Ntop.
> >It does exactly what you described.
>
> >> Hello
> >>
> >> I have  a freebsdbox firewall . also I have some internet customers.
> >> I want to save how much data they used in a table ( such as mysql
> >> table ) for each ip address.
> >>Apache2, php5 and mysql5.5 work on the box.
> >>
> >> How can I do it ?  any script or tool.
> >>
> >> Thanks
>
> How can i save in table using ntop ?  is there any document ?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Read the man pages. There are sql export options that you can specify on
run.


RE: [PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Bulent Malik


>This task is not really suited for php. I would suggest looking into Ntop.
>It does exactly what you described.

>> Hello
>>
>> I have  a freebsdbox firewall . also I have some internet customers.  
>> I want to save how much data they used in a table ( such as mysql 
>> table ) for each ip address.
>>Apache2, php5 and mysql5.5 work on the box.
>>
>> How can I do it ?  any script or tool.
>>
>> Thanks

How can i save in table using ntop ?  is there any document ? 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Sean Greenslade
This task is not really suited for php. I would suggest looking into Ntop.
It does exactly what you described.
On Feb 1, 2013 9:40 AM, "Bulent Malik"  wrote:

> Hello
>
> I have  a freebsdbox firewall . also I have some internet customers.  I
> want
> to save how much data they used in a table ( such as mysql table ) for each
> ip address.
> Apache2, php5 and mysql5.5 work on the box.
>
> How can I do it ?  any script or tool.
>
> Thanks
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Bulent Malik
Hello

I have  a freebsdbox firewall . also I have some internet customers.  I want
to save how much data they used in a table ( such as mysql table ) for each
ip address.
Apache2, php5 and mysql5.5 work on the box.

How can I do it ?  any script or tool.

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php