Search squid archive

script /usr/lib/squid3/log_db_daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I want to modify the /usr/lib/squid3/log_db_daemon script, but I'm not know very knowledge about PERL, so if i want to modify to get on the mysql table, not epoch_time, and date_time in human readable i guess first change the scheme...

line 157:    " time_since_epoch     DECIMAL(15,3)," 
to :    " time_since_epoch     DATEFIELD"

after that add the new field for mac will be: mac CHAR(17)
i want to add MAC in the log so this is the part i need help

1st need to explain to squid have to log mac address, with >eui BUT by default hasn't and on the script can't see where is setup..... so .. where can i customize that..?

is ok this line on the script to add mac regexp ?? i use this regexp on the python script and works but on PERL i hope so on too. need a review

sub parse($) {
    my ($line) = @_;
    my (@t) = $line =~ /^L(\d+\.\d+) *(\d+?) (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) (.*?) (.*?)\/(\d+?) (\d+?) (.*?) (.*?) (.*?) (.*?)\/(.*?) (.*)$/;
}

i think if i change the datetime field the regexp must be change too.. 
how can i end my little modify?

thanxs in advance.
--
perl -le 's ffSfs.s fSf\x54\x6F\x6E\x79 \x50\x65\x6e\x61f.print'

Secure email with PGP 0x8B021001 available at https://pgp.mit.edu
Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux