My best advice is to stop and restart rsyslog after rotating files (a HUP won’t 
do it).  This makes rsyslog close and verify state files at shutdown, and the 
ones for non-existent files will then get removed at startup.  

Regards,

> On Mar 25, 2022, at 10:10, Cosmas, Cossy via rsyslog 
> <rsyslog@lists.adiscon.com> wrote:
> 
> 
> PS. We are running rsyslog 8.2006. 
> 
> -----Original Message-----
> From: rsyslog <rsyslog-boun...@lists.adiscon.com> On Behalf Of Cosmas, Cossy 
> via rsyslog
> Sent: 25 March 2022 10:02
> To: rsyslog@lists.adiscon.com
> Cc: Cosmas, Cossy <cossy.cos...@dieboldnixdorf.com>
> Subject: [rsyslog] Imifile-state File Housekeeping Query...
> 
> !  EXTERNAL MESSAGE - Think Before You Click or Download
> 
> 
> Dear Rsyslog Forum Users,
> 
> A quick question from a relative newbie...
> 
> I have configured rsyslog to monitor my applications audit log files. I have 
> also implemented a cron based housekeeping script to delete the application 
> audit log files when they are over a week old.
> 
> I would have expected the rsyslog imifile-state files to automatically reduce 
> in number as the number of audit files decreases due to the above 
> housekeeping task but this is not the case.
> 
> The number of imifile-state files just keeps on increasing and this is 
> problematic as we have limits around the number of open files that rsyslog 
> can maintain.
> 
> I would just like to know what should be happening here and what is normal.
> 
> Does rsyslog ever automatically remove redundant state files or are they left 
> in place with the user expected to implement a cron based routine to delete 
> them manually?
> 
> Any advice appreciated.
> 
> Thank you.
> 
> Regards,
> 
> Cossy Cosmas
> Payments and Transaction Management Services Diebold Nixdorf
> 
> Advanced notice of annual leave:
> 20th June - 24th June
> 22nd August - 4th September
> 
> Mobile: +44 7717 863755
> One The Boulevard, Cain Road,
> Bracknell, Berkshire, RG12 1WP
> 
> cossy.cos...@dieboldnixdorf.com<mailto:cossy.cos...@dieboldnixdorf.com>
> DieboldNixdorf.com
> 
> [1_twitter_logo_24px]<https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_DieboldNixdorf&d=DwIFAg&c=7my1DiYA8Epq5UwiA7n6nQ&r=Sv0VnMLZbAdbaH6yPjH_FOYEELYL_Sa9QWHeuqpB2AY&m=_ln9W7In6NJgIgzlx3E3y8U6dczMOFBB4D7C0kaTcB3luvx2uBUcdM2AK0b5Hys8&s=LUATZyF1IN8aMKCSuxYkfho4Vg6eU041XiNrdpyD3so&e=
>  >  [2_facebook_logo_24px] 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.com_DieboldNixdorf&d=DwIFAg&c=7my1DiYA8Epq5UwiA7n6nQ&r=Sv0VnMLZbAdbaH6yPjH_FOYEELYL_Sa9QWHeuqpB2AY&m=_ln9W7In6NJgIgzlx3E3y8U6dczMOFBB4D7C0kaTcB3luvx2uBUcdM2AK0b5Hys8&s=X2WIo3MSLhpeBcW6VFX4Sy2SM0WbkIVr7xwShNubav4&e=
>  >   [3_youtube_logo_24px] 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com_DieboldNixdorf&d=DwIFAg&c=7my1DiYA8Epq5UwiA7n6nQ&r=Sv0VnMLZbAdbaH6yPjH_FOYEELYL_Sa9QWHeuqpB2AY&m=_ln9W7In6NJgIgzlx3E3y8U6dczMOFBB4D7C0kaTcB3luvx2uBUcdM2AK0b5Hys8&s=6wy_XQvegYq7h1tm5hOX8BXR_r-hKk9D3osb2Lz0Nro&e=
>  >   [4_linkedin_logo_24px] 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.
> linkedin.com_company_diebold&d=DwIFAg&c=7my1DiYA8Epq5UwiA7n6nQ&r=Sv0VnMLZbAdbaH6yPjH_FOYEELYL_Sa9QWHeuqpB2AY&m=_ln9W7In6NJgIgzlx3E3y8U6dczMOFBB4D7C0kaTcB3luvx2uBUcdM2AK0b5Hys8&s=j7-qHkmmXOVmynEwlaLnBhLfDyOBUuON7TbZ8mexxOw&e=
>  >   [5_blog_logo_24px] <http://blog.dieboldnixdorf.com/>
> 
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T 
> LIKE THAT.

_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to