Print the first 5 log lines from each day in syslog

[root@localhost docker_private_registry]# awk 'a[$1 $2]++ <5' /var/log/messages
Nov  5 10:31:01 localhost rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="1208" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Nov  5 10:34:30 localhost dhclient[10416]: DHCPREQUEST on ens33 to 192.168.184.254 port 67 (xid=0x3cb327aa)
Nov  5 10:34:30 localhost dhclient[10416]: DHCPACK from 192.168.184.254 (xid=0x3cb327aa)
Nov  5 10:34:32 localhost dhclient[10416]: bound to 192.168.184.130 -- renewal in 794 seconds.
Nov  5 10:39:05 localhost dbus[778]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Nov 11 12:21:41 localhost systemd: Time has been changed
Nov 11 12:21:41 localhost systemd: Starting Docker Cleanup...
Nov 11 12:21:41 localhost systemd: Started Docker Cleanup.
Nov 11 12:21:41 localhost systemd: Starting LSB: Bring up/down networking...
Nov 11 12:21:41 localhost journal: 2017-11-11 17:21:41,830 [myid:] - INFO  [SessionTracker:ZooKeeperServer@358] - Expiring session 0x15f8e16d60f0000, timeout of 10000ms exceeded
Nov 12 05:32:12 localhost systemd: Time has been changed
Nov 12 05:32:12 localhost systemd: Starting Docker Cleanup...
Nov 12 05:32:13 localhost systemd: Started Docker Cleanup.
Nov 12 05:32:14 localhost systemd: Starting LSB: Bring up/down networking...
Nov 12 05:32:15 localhost network: Bringing up loopback interface:  [  OK  ]
[root@localhost docker_private_registry]#

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all