On 26/02/15 22:49, John Andersen wrote:
Having given my system enough time for the scheduled deletions to take effect, and having rebooted it, I find that my usage in /tmp is way down from what it was. du -h /tmp shows only only 540k total, down from 4gig.
Specifically I have nothing in my /tmp/kde-username directory upon boot. If I mount a data cd or music cd I will get some zero byte temp files /tmp/kde-username. But apparently these are not long lived
Note I'm on OS 13.2
Here is a listing of my tmp.conf:
poulsbo:/tmp # cat /etc/tmpfiles.d/tmp.conf # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version.
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override # SUSE policy: we don't clean those directories JSA Policy: Yes you do!!! d /tmp 1777 root root 2d - d /var/tmp 1777 root root 2d - # # here we delete some directories that tend to accumulate, but only if they are empty r /tmp/gpg-??????/ r /tmp/ssh-????????????/ r /tmp/sni-qt_SpiderOak_* r! /tmp/spideroak_inotify_db.*
# Exclude namespace mountpoints created with PrivateTmp=yes x /tmp/systemd-private-%b-* X /tmp/systemd-private-%b-*/tmp x /var/tmp/systemd-private-%b-* X /var/tmp/systemd-private-%b-*/tmp
Notice, I haven't messed with the Systemd exclusions at all.
I finally got around to looking at this again. I added the tmp.conf file in /etc/tmpfiles.d and set a 30-day limit on /tmp, and 90 days on /var/tmp. I had to reboot since KDED had crashed on me as it often does, though the temp clearance didn't take place at or after boot. I don't know how long afterwards since I wasn't monitoring constantly, but within a couple of hours or so I noticed I'd suddenly regained several gigabytes of space on the root partition. Whereas previously, /tmp was occupying 5GB it's now down to about 0.9GB. /var/tmp was at 750MB and now it's down to 440MB. I haven't yet toyed with the removal of empty directories but I note that many still remain. Indeed, there are still quite a lot of files inside /tmp dated from months ago, so I assume they have had their date touched, perhaps even by my listing of the directory contents in Dolphin Super User Mode. I might avoid looking in there for 31 days and then see if they vanish. So, it works, with a simple adjustment to the tmp.conf file by adding the time limit. I realise it is SuSE policy to not clean these directories, but with the new work on YaST3 it would be nice if an easy config option were put back in somewhere to manage this, because for an average user, or indeed any user coming from most other distros that don't have this policy, expecting them to dive into an obscure config file in usr/lib to save their root partitions getting filled up with potentially undesirable consequences is a rather bad setup. (Or if they haven't set a separate /home and have a small drive, especially on a device like a Raspberry Pi or a tablet with storage on a low-capacity card, it'll be their entire drive getting full up; not good). Thanks to each of you who suggested these solutions. Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org