[opensuse] systemd: are there exceptions for cleaning up tmpfiles.d stuff?
Hi, My /usr/lib/tmpfiles.d/tmp.conf has the line d /tmp 1777 root root 10d AFAIU, that means that files in /tmp that are older than 10 days are deleted. My /tmp is not a tmpfs (by intent). What I see is that there are some directories from before my last boot that got not deleted: ssh directories with ssh agent sockets, .ICE-unix, etc. I checked the man page of tmpfiles.d and systemd-tmpfiles. No exception to the "will be deleted after duration X" is listed there. Are there builtin exceptions that are not documented? Well, as I'm logged in quite often more than 10 days, I prefer my ssh agent sockets not to be deleted -- but I'd like to have some knowledge about the actual process systemd is using, even better would be control over the deletion exceptions. Thanks in advance for any information, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Tue, 11 Feb 2014 01:51:11 +0100
Joachim Schrod
Hi,
My /usr/lib/tmpfiles.d/tmp.conf has the line
d /tmp 1777 root root 10d
That's not default in openSUSE. Did you change it manually? It will be lost on update.
AFAIU, that means that files in /tmp that are older than 10 days are deleted. My /tmp is not a tmpfs (by intent). What I see is that there are some directories from before my last boot that got not deleted: ssh directories with ssh agent sockets, .ICE-unix, etc.
I checked the man page of tmpfiles.d and systemd-tmpfiles. No exception to the "will be deleted after duration X" is listed there. Are there builtin exceptions that are not documented?
There could be in some other files. All tmpfiles.d are collected and sorted before applying.
Well, as I'm logged in quite often more than 10 days,
Is your system up permanently or you hibernate/suspend in between?
I prefer my ssh agent sockets not to be deleted -- but I'd like to have some knowledge about the actual process systemd is using, even better would be control over the deletion exceptions.
Thanks in advance for any information,
Joachim
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/11/14 03:22, Andrey Borzenkov wrote:
В Tue, 11 Feb 2014 01:51:11 +0100 Joachim Schrod
пишет: Hi,
My /usr/lib/tmpfiles.d/tmp.conf has the line
d /tmp 1777 root root 10d
That's not default in openSUSE. Did you change it manually? It will be lost on update.
No, I didn't change it. I would place a changed file in /etc/tmpfiles.d/. I'm pondering what to put there; that spurred my question -- I'm trying to learn more about systemd nuances and behavior instead of working around them.
AFAIU, that means that files in /tmp that are older than 10 days are deleted. My /tmp is not a tmpfs (by intent). What I see is that there are some directories from before my last boot that got not deleted: ssh directories with ssh agent sockets, .ICE-unix, etc.
There could be in some other files. All tmpfiles.d are collected and sorted before applying.
Yes, there are more entries about /tmp: puma:/usr/lib/tmpfiles.d # grep /tmp * tmp.conf:d /tmp 1777 root root 10d tmp.conf:d /var/tmp 1777 root root 30d x11.conf:d /tmp/.X11-unix 1777 root root 10d x11.conf:d /tmp/.ICE-unix 1777 root root 10d x11.conf:d /tmp/.XIM-unix 1777 root root 10d x11.conf:d /tmp/.font-unix 1777 root root 10d x11.conf:d /tmp/.Test-unix 1777 root root 10d x11.conf:r /tmp/.X[0-9]*-lock No /tmp entries are in /etc/tmpfiles.d/. OK, that explains .ICE-unix. Still puma:/usr/lib/tmpfiles.d # ll -t /tmp | tail -2 -rw-rw-r-- 1 schrod npc 9402 Feb 4 22:48 dc.diff drwx------ 2 root root 4096 Jan 29 00:50 ssh-ak8TJJmMZc puma:/usr/lib/tmpfiles.d # ll -a /tmp/ssh-ak8TJJmMZc total 16 drwx------ 2 root root 4096 Jan 29 00:50 . drwxrwxrwt 43 root root 12288 Feb 11 14:07 .. srwxr-xr-x 1 root root 0 Jan 29 00:50 agent.2528 puma:/usr/lib/tmpfiles.d # uptime 14:08pm up 6 days 14:38, 4 users, load average: 0.40, 0.30, 0.21 That dir should have been deleted in the mean time, shouldn't it? As I wrote above, I want to learn how that works. Effectively, the old-age clean task is done by "systemd-tmpfiles --clean", if I interpret the man pages correctly. -- Who calls that command? systemd? -- In what frequency? -- Is that call/frequency configured somewhere?
Well, as I'm logged in quite often more than 10 days,
Is your system up permanently or you hibernate/suspend in between?
Permanently. My workstation is up 24x7 and gets only rebooted on kernel/libc updates or such. E.g., the last boot, 6 days ago, was a replacement of one of the (mirrored) disks. Cheers, and thanks for your initial answer. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Dienstag, 11. Februar 2014, 14:18:22 schrieb Joachim Schrod:
On 02/11/14 03:22, Andrey Borzenkov wrote:
В Tue, 11 Feb 2014 01:51:11 +0100
Joachim Schrod
пишет: Hi,
My /usr/lib/tmpfiles.d/tmp.conf has the line
d /tmp 1777 root root 10d
That's not default in openSUSE. Did you change it manually? It will be lost on update.
No, I didn't change it. [...]
Then you are not using 13.1. :)
puma:/usr/lib/tmpfiles.d # ll -t /tmp | tail -2 -rw-rw-r-- 1 schrod npc 9402 Feb 4 22:48 dc.diff drwx------ 2 root root 4096 Jan 29 00:50 ssh-ak8TJJmMZc puma:/usr/lib/tmpfiles.d # ll -a /tmp/ssh-ak8TJJmMZc total 16 drwx------ 2 root root 4096 Jan 29 00:50 . drwxrwxrwt 43 root root 12288 Feb 11 14:07 .. srwxr-xr-x 1 root root 0 Jan 29 00:50 agent.2528 puma:/usr/lib/tmpfiles.d # uptime 14:08pm up 6 days 14:38, 4 users, load average: 0.40, 0.30, 0.21
That dir should have been deleted in the mean time, shouldn't it?
Well, I think so. Does a manual "systemd-tmpfiles --clean" delete it?
As I wrote above, I want to learn how that works.
Effectively, the old-age clean task is done by "systemd-tmpfiles --clean", if I interpret the man pages correctly. -- Who calls that command? systemd? -- In what frequency? -- Is that call/frequency configured somewhere? [...]
man systemd.timer There is a systemd-tmpfiles-clean.service that is controlled by systemd- tmpfiles-clean.timer. By default, the former is started 15 minutes after a boot and after 1 day it was last activated. So, you can use "systemctl status systemd-tmpfiles-clean.timer" to see when the timer has triggered and "systemctl status systemd-tmpfiles- clean.service" when the cleanup actually started. Gruß Jan -- There is no such thing as a "free lunch". (only a choice of restaurants) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/15/14 19:55, Jan Ritzerfeld wrote:
As I wrote above, I want to learn how that works.
Effectively, the old-age clean task is done by "systemd-tmpfiles --clean", if I interpret the man pages correctly. -- Who calls that command? systemd? -- In what frequency? -- Is that call/frequency configured somewhere? [...]
man systemd.timer There is a systemd-tmpfiles-clean.service that is controlled by systemd- tmpfiles-clean.timer. By default, the former is started 15 minutes after a boot and after 1 day it was last activated. So, you can use "systemctl status systemd-tmpfiles-clean.timer" to see when the timer has triggered and "systemctl status systemd-tmpfiles- clean.service" when the cleanup actually started.
Thanks a lot; that information really helped. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrey Borzenkov
-
Jan Ritzerfeld
-
Joachim Schrod