close time for idle dynamic files?

This is the place for developers to discuss bugs, new features and everything else about code changes.

Google Ads


close time for idle dynamic files?

Postby JohnN » Tue Mar 20, 2012 11:53 pm

Hello,

We are using Rsyslog 5.8.7 on SuSE SLES 11 SP1. We make heavy use of dynamic file templates like the following.

rsyslog.conf:
Code: Select all
purie-smw:/tmp # grep event /etc/rsyslog.conf
$template file-erd,"/var/opt/mycomp/log/event-%$YEAR%%$MONTH%%$DAY%"
purie-smw:/tmp #


Some of the templates are a bit more complicated that that one, but pretty much all the files use dynamic file templates, at least to mark each file by day.

We recently noticed that it appears our Rsyslog instances have a lot of open file descriptors. Considering we switch each file every day, something seems wrong.

If you look at the below example, it seems we have about a weeks of files still open?! That number appears to match the uptime, so I'm wondering if files are ever being closed?

Code: Select all
purie-smw:/tmp # uptime
  5:48pm  up 6 days  8:10,  51 users,  load average: 0.00, 0.02, 0.07
purie-smw:/tmp #


How soon should we expect dynamic files to be closed?

Thanks,

-john


Code: Select all
purie-smw:/proc # ps -ef | grep rsyslog
root      3946  3520  0 17:38 pts/25   00:00:00 grep rsyslog
root      7033     1  0 Mar14 ?        00:44:39 /opt/mycomp/rsyslog/default/sbin/rsyslogd -c5 -i /var/run/rsyslog.pid -f /etc/rsyslog.conf
purie-smw:/proc # ls -al 7033/task/*/fd/* | grep "/var/opt/mycomp/disk/1/log/" | awk '{print $11}' | sort -u | wc -l
111
purie-smw:/proc # ls -al 7033/task/*/fd/* | grep "/var/opt/mycomp/disk/1/log/" | awk '{print $11}' | sort -u | head -8
/var/opt/mycomp/disk/1/log/event-20120314
/var/opt/mycomp/disk/1/log/event-20120315
/var/opt/mycomp/disk/1/log/event-20120316
/var/opt/mycomp/disk/1/log/event-20120317
/var/opt/mycomp/disk/1/log/event-20120318
/var/opt/mycomp/disk/1/log/event-20120319
/var/opt/mycomp/disk/1/log/event-20120320
/var/opt/mycomp/disk/1/log/logsystem-20120314
purie-smw:/proc #
JohnN
Frequent Poster
 
Posts: 116
Joined: Wed Jan 12, 2011 8:28 pm

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Re: close time for idle dynamic files?

Postby JohnN » Tue Apr 03, 2012 6:32 pm

It sounds like the answer is, Rsyslog doesn't time out the files, it simply has a cache and only closes them when that cache fills up:

http://bugzilla.adiscon.com/show_bug.cgi?id=21

-john
JohnN
Frequent Poster
 
Posts: 116
Joined: Wed Jan 12, 2011 8:28 pm

Google Ads



Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron