Results 1 to 6 of 6

Thread: Proxy and cumulative airtime

  1. #1
    Join Date
    Nov 2009
    Posts
    446

    Proxy and cumulative airtime

    Hi,
    I have a Debian server configured as an application server and web proxy (Squid / squidGuard) with WIS for forming connections. With this I created a web application to execute shell commands on the server to allow or deny access to users. I must ensure that a user can connect an hour a day. Not just one hour of a stroke but cumulation. I thought retrieve logs from the early connection of the day and the last. Then by a calculation to recover the time and why not store it in my MySQL database. The problem is that I am not sure if this is possible. Someone has already done it? Or an alternative solution that can respond to this problem please? Thank you in advance.

  2. #2
    Join Date
    May 2008
    Posts
    3,516

    Re: Proxy and cumulative airtime

    Hi
    You can simply edit the conf squid to use a date format more appropriate this choice is made in / etc / squid / squid.conf. Example:
    logformat squid% tl% 6TR%> a% Ss /% 03Hs% <st% rm% ru% un% Sh /% <A% mt
    and assure you that this is the format (by squid) that is used
    access_log / var / log / squid / access.log squid
    Hope this information will help you. Any more help needed please do post it.

  3. #3
    Join Date
    Nov 2009
    Posts
    446

    Re: Proxy and cumulative airtime

    Hi
    I make the rounds of various tools for formatting the log file SQUID: access.log:

    - WIS: Well, but does not insert into a database.

    - MySAR: Seemed match since the tool can retrieve the file information and inserts into a MySQL database. The worry is that it is not possible to retrieve the connection time or combine them for the simple reason that we have time to connect but not disconnect. So hard to see the difference and difficult not to do something rough and wobbly.

    - Squid2Mysql: It looks interesting because it handles the concept of connection time (as what is possible from access.log ") but from my side prog is planted in, and this is not very convenient.
    Any help on this. Please

  4. #4
    Join Date
    May 2008
    Posts
    3,516

    Re: Proxy and cumulative airtime

    Hi
    With this format, you have the duration of each connection. Please check it.
    Code:
    05/Sep/2009: 18:02:42 +0000    191 x.x.x.x TCP_MISS/200 484 ...
    For the combination, I think you can do this with awk command. Try it, if not then post back here, and we will help you.

  5. #5
    Join Date
    Nov 2009
    Posts
    446

    Re: Proxy and cumulative airtime

    Hi
    Thank you for your reply. I was not gone in that direction here. I changed the perl script so that it injects data am interested in my MySQL DB and it works very well. The disadvantage is that it's very hard given my knowledge of PERL. So I am very pleased with your solution. I'm making a PHP script that will give me the job automatically every few minutes via cron. Small question the "484" in your example corresponds to what? The worry is that the "191" is the connection time to view the page is not it? So once the user who will stay 2 hours on the same page without refreshing or click on a link will not be counted (2 hours), Am I wrong? Please guide.

  6. #6
    Join Date
    May 2008
    Posts
    3,516

    Re: Proxy and cumulative airtime

    Hi
    Small question the "484" in your example corresponds to what?
    Indeed, 191 is the response time if the user does not query. Further, it will not recognized the important thing is that it does not occupy the bandwidth.
    The worry is that the "191" is the connection time to view the page is not it?
    The second number, 484, corresponds to the number of bytes transferred (you could also impose a limit on the above ).

Similar Threads

  1. Proxy connection: internal error during proxy evaluation
    By Pandya in forum Software Development
    Replies: 3
    Last Post: 19-08-2009, 02:25 PM
  2. Unable to install cumulative update for windows vista
    By Rixwel in forum Networking & Security
    Replies: 3
    Last Post: 03-06-2009, 09:42 AM
  3. Voip Via proxy
    By Holt in forum Networking & Security
    Replies: 4
    Last Post: 04-04-2009, 02:00 PM
  4. Replies: 7
    Last Post: 22-09-2008, 05:16 PM
  5. Replies: 11
    Last Post: 03-12-2007, 09:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,246,517.63059 seconds with 17 queries