ausearch question
I was wondering what a "-ts now" would return from my audit data. I thought maybe it would be similar to a "tail" of the data, but that's not what I got.
Is this what you'd expect?:
[root@hugo ~]# date ; ausearch -i -ts now --just-one Thu May 1 14:05:10 EDT 2008
----
type=DAEMON_START msg=audit(05/01/2008 09:14:40.029:3602) : auditd start, ver=1.7.2 format=raw kernel=2.6.25-1.fc9.x86_64 auid=unset pid=2003 res=success
Most of the relevant data is in the record, however:
[root@hugo ~]# uname -a
Linux hugo 2.6.25-1.fc9.x86_64 #1 SMP Thu Apr 17 01:11:31 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
[root@hugo ~]# rpm -qa | grep audit
audit-libs-1.7.2-6.fc9.i386
audit-1.7.2-6.fc9.x86_64
audit-libs-python-1.7.2-6.fc9.x86_64
audit-libs-devel-1.7.2-6.fc9.x86_64
audit-libs-devel-1.7.2-6.fc9.i386
audit-libs-1.7.2-6.fc9.x86_64
Thx,
LCB.
Signature · 2 lines
LC (Lenny) Bruzenak [email protected]
Quoted 1 line · On Thursday 01 May 2008 14:11:19 LC Bruzenak wrote:
I was wondering what a "-ts now" would return from my audit data.
What's in the audit logs starting now. aureport uses the exact same code as ausearch for time operations, so its more informative to use it to see what time is actually resolved from these keywords. I get:
Summary Report
======================
Range of time in logs: 04/25/2008 09:31:10.388 - 05/02/2008 09:57:20.859 Selected time for report: 05/02/2008 00:00:00 - 05/02/2008 09:57:20.859
Which is clearly wrong. This looks like its resolving to today instead of now. I expect ausearch --start now to return nothing unless the system is busy doing a lot of logging and you get records between the time it gets system time until the time it opens the last log file for reading.
Quoted 2 lines
I thought maybe it would be similar to a "tail" of the data, but that's not what I got.
No, tail is not easy to do. Patches are welcome if anyone wants to do it. But you can do:
tail -f /var/log/audit/audit.log | ausearch -i
if you wanted that.
-Steve