Re: Help listing log data in F17/64 -

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

 



On 12/08/12 11:42, Kevin Martin types:
On 08/12/2012 09:55 AM, Bob Goodwin - Zuni, Virginia, USA wrote:
    Would someone be kind enough to give me an example of how I can
    extract data and list it to the screen from the following:

        [root@box9 bobg]# cat /var/log/messages | grep Aug

        Aug 12 10:29:38 unknown kernel: ACCEPT IN=br0 OUT=vlan1
        SRC=192.168.1.9 DST=169.229.70.201 LEN=76 TOS=0x00 PREC=0x00
        TTL=63 ID=0 DF PROTO=UDP SPT=123 DPT=123 LEN=56
        Aug 12 10:31:03 unknown kernel: ACCEPT IN=br0 OUT=vlan1
        SRC=192.168.1.9 DST=173.194.79.108 LEN=60 TOS=0x00 PREC=0x00
        TTL=63 ID=42627 DF PROTO=TCP SPT=36901 DPT=995 WINDOW=14600
        RES=0x00 SYN URGP=0 OPT
        (020405B40402080A007FFC710000000001030307) --
        http://www.qrz.com/db/W2BOD box9

    For instance I would like to list: date/time, SRC=192.168.1.9,
    DST=169.229.70.201

    That should give me a starting point on which I can expand on the
    information extracted/displayed.

    Bob

Short and sweet try:

grep ^Aug /var/log/messages | awk '{print $1" "$2" "$3" "$9" "$10}'

Kevin

   Thank you Kevin. That's what I need to get started, I can muddle
   along from there.

   As it is it prints some interesting stuff. Of course it's all in the
   log but it's handy to have it in a reduced, uncluttered form.

   Again Tnx,

   Bob



--
http://www.qrz.com/db/W2BOD

box9

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux