fluent-plugins-nursery / fluent-plugin-systemd

This is a fluentd input plugin. It reads logs from the systemd journal.
Apache License 2.0
153 stars 43 forks source link

The deleted files are still occupied #81

Open xidiandb opened 4 years ago

xidiandb commented 4 years ago
fluentd    2472                  root  125r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472                  root  159r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472  2497            root  125r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472  2497            root  159r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472  2498            root  125r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472  2498            root  159r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472  2503            root  125r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)
fluentd    2472  2503            root  159r      REG              252,1 134217728     539602 /var/log/journal/a87d37f9c4d74e9eb672b97b5dd0c818/system@d059ec38963543fb95c6390453c1f247-0000000007057712-00059fa76e02b10d.journal (deleted)

I'm using the latest version 1.0.2 and systemd-journal is 1.3.3

xidiandb commented 4 years ago

When I upgraded systemd-journal to 1.4.1 the question still exist. Why journal.close didn't work.

xidiandb commented 4 years ago

fluent-plugin-journal can solve the problem

errm commented 3 years ago

Thanks for the info @xidiandb are you interested to open a PR with your changes?

xidiandb commented 3 years ago

Thanks for the info @xidiandb are you interested to open a PR with your changes?

sure,I will rework my rough code and submit a PR

errm commented 3 years ago

I am also thinking that this approach might help with #79, if we can think of a way to distrabute the files amongst workers then perhaps we can enable multi worker support ...