LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2011, 04:33 AM   #1
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Rep: Reputation: 0
Maintain Uploading record in squid


Hi

I have Squid Cache: Version 2.6.STABLE21, installed on RHEL5. as well as configured SARG. It provides downloading detail of squid users. but does not provide uploading detail.

I want to maintain uploading record of my users.(e.g which user upload which file/data)

Plz help me in this regard.
 
Old 05-04-2011, 07:55 AM   #2
jadrevenge
Member
 
Registered: Mar 2011
Location: Manchester,UK
Distribution: OpenIndiana/Ubuntu
Posts: 36

Rep: Reputation: 2
you can tell _if_ a user has uploaded, and how much (i.e. how big the file is) but not _what_ the file is ... it's all "PUT" data.
 
Old 05-06-2011, 01:21 AM   #3
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jadrevenge View Post
you can tell _if_ a user has uploaded, and how much (i.e. how big the file is) but not _what_ the file is ... it's all "PUT" data.
but how to? waiting..........
 
Old 05-09-2011, 10:24 AM   #4
jadrevenge
Member
 
Registered: Mar 2011
Location: Manchester,UK
Distribution: OpenIndiana/Ubuntu
Posts: 36

Rep: Reputation: 2
answer: no you can't ...

"you can tell _if_ a user has uploaded, and how much"

...

"but not _what_ the file is"
 
Old 05-10-2011, 04:11 AM   #5
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jadrevenge View Post
answer: no you can't ...

"you can tell _if_ a user has uploaded, and how much"

...

"but not _what_ the file is"
Ok, But how to check user has uploaded some thing and how much its size etc...?
waiting......... plz
 
Old 05-11-2011, 05:35 AM   #6
jadrevenge
Member
 
Registered: Mar 2011
Location: Manchester,UK
Distribution: OpenIndiana/Ubuntu
Posts: 36

Rep: Reputation: 2
Quote:
Originally Posted by aquamarine View Post
Ok, But how to check user has uploaded some thing and how much its size etc...?
waiting......... plz
quickest way is to look at your access.log file ...

if you don't have user authentication turned on this will probably work for you:

awk '$6 == "PUT" {printf("%s\t%s\n", $5, $0)}' access.log | more

http://wiki.squid-cache.org/SquidFaq...equest_methods

PUT is for when you "upload data" ... the first parameter in access.log is the time, the second is the size of the upload.

not all "PUT"'s are files being uploaded ... but you should be able to tell by the size if the file is big or not, and the URL should hopefully give you a hint as to whether or not a file has been uploaded ...

"http://www.booking.com/load_times" is probably not a file upload ...

"http://s3.amazonaws.com/online-documents/online_documents/2420/My-PDF.pdf" probably is.
 
Old 05-13-2011, 02:03 AM   #7
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jadrevenge View Post
quickest way is to look at your access.log file ...

if you don't have user authentication turned on this will probably work for you:

awk '$6 == "PUT" {printf("%s\t%s\n", $5, $0)}' access.log | more

http://wiki.squid-cache.org/SquidFaq...equest_methods

PUT is for when you "upload data" ... the first parameter in access.log is the time, the second is the size of the upload.

not all "PUT"'s are files being uploaded ... but you should be able to tell by the size if the file is big or not, and the URL should hopefully give you a hint as to whether or not a file has been uploaded ...

"http://www.booking.com/load_times" is probably not a file upload ...

"http://s3.amazonaws.com/online-documents/online_documents/2420/My-PDF.pdf" probably is.
Thanks for your reply, This command is not working....because
I have turned on user authentication, so what to do? to check upload.
waiting for your response please.....

Last edited by aquamarine; 05-13-2011 at 02:04 AM.
 
Old 05-14-2011, 01:08 PM   #8
jadrevenge
Member
 
Registered: Mar 2011
Location: Manchester,UK
Distribution: OpenIndiana/Ubuntu
Posts: 36

Rep: Reputation: 2
if you have user authentication turned on the "PUT" will be in some other field than $6 (the sixth field) ...

you could grep for PUT in the file and change the awk script to work with a different field number ...
 
Old 05-16-2011, 01:36 AM   #9
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jadrevenge View Post
if you have user authentication turned on the "PUT" will be in some other field than $6 (the sixth field) ...

you could grep for PUT in the file and change the awk script to work with a different field number ...
Thanks for your reply, I've tried to $22, but couldn't find result. the command show no results.

Command was (awk '$7 == "PUT" {printf("%s\t%s\n", $5, $0)}' access.log | more)
(awk '$8 == "PUT" {printf("%s\t%s\n", $5, $0)}' access.log | more)
etc......

Still waiting...... your response.

Last edited by aquamarine; 05-16-2011 at 01:39 AM.
 
Old 05-18-2011, 07:57 AM   #10
jadrevenge
Member
 
Registered: Mar 2011
Location: Manchester,UK
Distribution: OpenIndiana/Ubuntu
Posts: 36

Rep: Reputation: 2
Quote:
Originally Posted by aquamarine View Post
Thanks for your reply, I've tried to $22, but couldn't find result. the command show no results.

Command was (awk '$7 == "PUT" {printf("%s\t%s\n", $5, $0)}' access.log | more)
(awk '$8 == "PUT" {printf("%s\t%s\n", $5, $0)}' access.log | more)
etc......

Still waiting...... your response.
Have you (or a predecessor) modified the log file output?

http://wiki.squid-cache.org/Features/LogFormat

It is possible that you don't have "method" in your log file output, if this is so then you probably need to put in in.

if you are having trouble, it might be worth looking at the Log analysers at http://www.squid-cache.org/Scripts/ there are just s _few_ to choose from.

We've used at least the first 2 in the list in the past.

Jon
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
limit uploading in squid amartlk Linux - Newbie 1 12-01-2010 08:38 AM
DDNS record and a static PTR record mou5e Linux - Networking 2 01-22-2008 02:16 AM
Squid only record ext ips... daniel-linux Linux - Server 1 08-28-2007 02:32 AM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 05:31 AM
squid proxy problem - website uploading? maggoty Linux - Software 0 03-14-2004 07:35 PM


All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration