Fsdb::F...at_to_db(3)
π NAME π
okay bestie, welcome to the Fsdb::F...at_to_db(3) page from the User Contributed Perl Documentation β yes, that manual name is a whole mouthful, but the utility is combined_log_format_to_db, and it does one iconic thing: convert Apache Combined Log Format to Fsdb. π¦
β¨ SYNOPSIS β¨
combined_log_format_to_db < access_log > access_log.fsdb
πΈ DESCRIPTION πΈ
It converts logs in Apache Combined-Log-Format into Fsdb format. that's the vibe, that's the whole job. π
π OPTIONS π
No program-specific options β literally zero, bestie.
This module also supports the standard fsdb options:
-dβ enable debugging output. π-ior--inputInputSource β read from InputSource, typically a file name, or"-"for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.-oor--outputOutputDestination β write to OutputDestination, typically a file name, or"-"for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.--autorunor--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. The--(no)autorunoption controls that behavior within Perl.--helpβ show help. π«Ά--manβ show full manual. π
π¦ SAMPLE USAGE π¦
π₯ Input
foo.example.com - - [01/Jan/2007:00:00:01 -0800] "GET /~moll/wedding/index.html HTTP/1.0" 200 2390 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
127.0.0.1 - - [01/Jan/2007:00:00:02 -0800] "GET /hpdc2007/ HTTP/1.1" 304 - "http://grid.hust.edu.cn:8080/call/cfp.jsp" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; InfoPath.2)"
bar.example.com - - [31/Dec/2006:23:51:40 -0800] "GET /nsnam/dist/ns-allinone-2.29.2.tar.gz HTTP/1.1" 206 58394090 "file://D:\\\xce\xd2\xb5\xc4\xce\xc4\xb5\xb5\\ns2\\XP_Using_Cygwin.htm#Windows_Support_for_Ns-2.27_and_Earlier" "Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)"
127.0.0.1 - - [01/Jan/2007:00:00:02 -0800] "GET /hpdc2007/hpdc.css HTTP/1.1" 304 - "http://www.isi.edu/hpdc2007/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; InfoPath.2)"
πͺ Command
combined_log_format_to_db
π€ Output
#fsdb -F S client identity userid time method resource protocol status size refer useragent
foo.example.com - - [01/Jan/2007:00:00:01 -0800] GET /~moll/wedding/index.html HTTP/1.0 200 2390 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
127.0.0.1 - - [01/Jan/2007:00:00:02 -0800] GET /hpdc2007/ HTTP/1.1 304 - "http://grid.hust.edu.cn:8080/call/cfp.jsp" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; InfoPath.2)"
bar.example.com - - [31/Dec/2006:23:51:40 -0800] GET /nsnam/dist/ns-allinone-2.29.2.tar.gz HTTP/1.1 206 58394090 "file://D:\\\xce\xd2\xb5\xc4\xce\xc4\xb5\xb5\\ns2\\XP_Using_Cygwin.htm#Windows_Support_for_Ns-2.27_and_Earlier" "Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)"
127.0.0.1 - - [01/Jan/2007:00:00:02 -0800] GET /hpdc2007/hpdc.css HTTP/1.1 304 - "http://www.isi.edu/hpdc2007/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; InfoPath.2)"
# | combined_log_format_to_db
π SEE ALSO π
Fsdb. and <http://httpd.apache.org/docs/2.0/logs.html> β go peek, bestie. π
π§ CLASS FUNCTIONS π§
π± new
$filter = new Fsdb::Filter::combined_log_format_to_db(@arguments);
Create a new combined_log_format_to_db object, taking command-line arguments.
πΈ set_defaults
$filter->set_defaults();
Internal: set up defaults.
π parse_options
$filter->parse_options(@ARGV);
Internal: parse command-line arguments.
π¦ setup
$filter->setup();
Internal: setup, parse headers.
β run
$filter->run();
Internal: run over each rows.
π AUTHOR and COPYRIGHT π
Copyright (C) 2008 by John Heidemann <johnh@isi.edu>
This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.
β¨ cute sign-off: this lil page ships with perl v5.32.1, dated 2024-08-02, under the Fsdb::F...at_to_db(3) manual name. bye bestie, go parse some logs π
π
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms