<html><body>
<p><tt>>> Lenny:<br>
>> <br>
>> I was going to move the rotated logs into /home/logs and use "ausearch<br>
>> -i -f /home/logs".<br>
>> <br>
>> <br>
>> David Flatley CISSP<br>
>> <br>
>> <br>
<br>
>David,<br>
><br>
>It won't work like that; exactly the issue I described:<br>
><br>
>[root@slim root]# mkdir logs-test<br>
>[root@slim root]# cd !$<br>
>cd logs-test<br>
>[root@slim logs-test]# auditctl -m "TEST message"<br>
>[root@slim logs-test]# service auditd rotate<br>
>Rotating logs:                                             [  OK  ]<br>
>[root@slim logs-test]# cp /var/log/audit/audit.log.1 .<br>
>[root@slim logs-test]# ausearch -i -f `pwd` -m USER<br>
><no matches><br>
>[root@slim logs-test]# grep TEST audit.log.1<br>
>node=slim type=USER msg=audit(1250529052.265:305135): user pid=8191<br>
>uid=0 auid=500 ses=4172 subj=user_u:user_r:user_t:s0 msg='TEST message:<br>
>exe="/sbin/auditctl" (hostname=?, addr=?, terminal=pts/18 res=success)'<br>
><br>
><br>
>LCB.<br>
</tt><br>
<tt>  UGH this is a wrench in the works...</tt><br>
<tt>  I was hoping to grab all the rotated logs, process them while still allowing audit</tt><br>
<tt>to run with no interruptions. Problem I run into is I run ausearch -i > /tmp/file and then</tt><br>
<tt>do ausearch -i /nfs/file with auditd stopped, then compare files and if they are the same in </tt><br>
<tt>size then delete the /tmp/file. I do this to make sure I get the log in the nfs archive directory </tt><br>
<tt>and the /tmp is a backup if there is a problem. If audit is running there is no way the files will </tt><br>
<tt>be equal in size while processing the /var/log/audit data in two different intervals.</tt><br>
<br>
<tt>  Thanks for feedback on this Lenny.  </tt><br>
<br>
<br>
David Flatley CISSP<br>
<br>
<br>
<br>
<img width="16" height="16" src="cid:1__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for LC Bruzenak ---08/17/2009 01:16:30 PM---On Mon, 2009-08-17 at 13:06 -0400, David Flatley wrote: > Len"><font color="#424282">LC Bruzenak ---08/17/2009 01:16:30 PM---On Mon, 2009-08-17 at 13:06 -0400, David Flatley wrote: > Lenny:</font><br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">From:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">LC Bruzenak <lenny@magitekltd.com></font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">To:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">David Flatley/Burlington/IBM@IBMUS</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Cc:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">linux-audit@redhat.com, Steve Grubb <sgrubb@redhat.com></font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Date:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">08/17/2009 01:16 PM</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Subject:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC86DFCCDE868f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Re: buffer space</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><br>
On Mon, 2009-08-17 at 13:06 -0400, David Flatley wrote:<br>
> Lenny:<br>
> <br>
> I was going to move the rotated logs into /home/logs and use "ausearch<br>
> -i -f /home/logs".<br>
> <br>
> <br>
> David Flatley CISSP<br>
> <br>
> <br>
<br>
David,<br>
<br>
It won't work like that; exactly the issue I described:<br>
<br>
[root@slim root]# mkdir logs-test<br>
[root@slim root]# cd !$<br>
cd logs-test<br>
[root@slim logs-test]# auditctl -m "TEST message"<br>
[root@slim logs-test]# service auditd rotate<br>
Rotating logs:                                             [  OK  ]<br>
[root@slim logs-test]# cp /var/log/audit/audit.log.1 .<br>
[root@slim logs-test]# ausearch -i -f `pwd` -m USER<br>
<no matches><br>
[root@slim logs-test]# grep TEST audit.log.1<br>
node=slim type=USER msg=audit(1250529052.265:305135): user pid=8191<br>
uid=0 auid=500 ses=4172 subj=user_u:user_r:user_t:s0 msg='TEST message:<br>
exe="/sbin/auditctl" (hostname=?, addr=?, terminal=pts/18 res=success)'<br>
<br>
<br>
LCB.<br>
<br>
-- <br>
LC (Lenny) Bruzenak<br>
lenny@magitekltd.com<br>
<br>
</tt><br>
<br>
</body></html>