LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-23-2007, 05:05 AM   #1
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Rep: Reputation: 30
how to add date n time in proxy access.log


hi all,

how to add date n time in proxy access.log, can we log devices mac address also ?
 
Old 08-23-2007, 05:41 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
how to add date n time in proxy access.log
What Proxy? What version? What's the logformat used now? If the first item of the log is a large number like "1187547180" it's date and time in epoch notation. As in
Code:
epoch2date() { EPOCH="$1"; /bin/date '+%Y-%m-%d %H:%M:%S %Z' \
--date "Jan 1, 1970 01:00:00 + $EPOCH seconds"; }

can we log devices mac address also
I am sure you can not. What purpose should it serve?
 
Old 08-23-2007, 06:31 AM   #3
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
"epoch2date() { EPOCH="$1"; /bin/date '+%Y-%m-%d %H:%M:%S %Z' \
--date "Jan 1, 1970 01:00:00 + $EPOCH seconds"; }"

where to add above format in which file ?

can we log mac address of user machine accessing proxy ?
 
Old 08-23-2007, 06:54 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
This problem solving thing kinda relies on people here asking the right questions and you giving the right answers. If you don't read replies well and don't answer questions then it's not gonna work. (The what proxy / version / logformat questions should make you realise you should be complete in providing information. More efficient.) Since you didn't I'll assert you're using Squid. If you use < 2.6 you can choose two logformats: native and CLF. If you use 2.6>= you check squid.conf and Squid docs for the "logformat" directive. (BTW the code was just an example to turn epoch into human readable notation, not something you will use configuring Squid.)
 
  


Reply



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
how to cat a log starting FROM a date TO a date graziano1968 Linux - General 7 03-21-2007 08:49 AM
Change access.log timestamp,squid proxy gordonb Linux - Software 1 04-20-2006 12:28 AM
website access monitor and log using Squid Proxy in FC4 tsaravan Linux - Networking 1 02-10-2006 05:09 AM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
Doesn't the transparent proxy keep an access log??? tzouse Linux - Networking 7 08-10-2005 03:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:18 AM.

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
Open Source Consulting | Domain Registration