Segfault wrote:Running bleachbit on servers ... what's the idea?
dasein wrote:I'm skeptical of running bleachbit at all, but if you insist on doing it...
dasein wrote:A(ny) time-based scheme is going to be inherently suboptimal, since you have no idea what this hypothetical user might be doing 10 (or 5, or 33) minutes after startup.
dasein wrote:Seems to me that the vastly more sensible approach would be to invoke via script at user login and nice it to the point that it runs only when the CPU has nothing else to do. (See man nice for details.)
GabrieleMax wrote:dasein wrote:I'm skeptical of running bleachbit at all, but if you insist on doing it...
Please can you explain me why you got dubts about it? I use some scripts and they works well...
GabrieleMax wrote:I didn't know nice, I'm reading about it and it should be the best way to solve my "problem"!
Running bleachbit (which is in the path) with arguments runs BleachBit in command line mode. Without arguments, BleachBit runs in graphical mode. The clipboard can only be cleaned under an X session (which is generally not available over SSH or in cron).
GabrieleMax »---- a good idea it could start at screensaver time!
How can I run bleachbit by crontab 10 minutes after startup?
by millpond »--and bleachbit is certainly a useful operation to include in a more comprehensive script.
dasein wrote:Unless the content in question is explicitly temporary (the contents of /tmp, for instance), I think that automating anything destructive is shortsighted. And given how inexpensive disk space is, there's really no benefit to saving a fraction of a penny's worth of disk space.
dasein wrote:Then please take a moment to mark your thread as [SOLVED]. (Edit the subject line of your initial post)
millpond wrote:The OP should really reconsider the wisdom of running a system cleaning process during normal operations. Things like logs and temp files and what-not are *used* by running processes, and deleting them is something of a recipe for disaster.
millpond wrote:Ideally this operation should be done at startup, shutdown, or during maintenance hours on a server.
millpond wrote:There is nothing wrong with using cron for maintenance activities, and bleachbit is certainly a useful operation to include in a more comprehensive script.
millpond wrote:One possible other scenario is a server that deliberately desires to frequently wipe logs. Particularly as turning off logging is often difficult. One option for this is to mount the /var/logs directory to ram, and wipe it periodically.
millpond wrote:There is a utility called ramlog for this purpose, but its written as a PPA and the script needs to be fixed for use with Debian. Its a shell script, so thats no biggie. Here its configured to a minimum size, and effectively wiped at shutdown.
https://www.linux.com/news/improve-syst ... -files-ram
(Its sysvinit, which I use here. No clue as to how it works with systemd).
millpond wrote:A newer variant would be:
http://www.linux-magazine.com/Online/Bl ... -LogRunner
The archive directory -gzpath, can be set to /dev/null. Its a python script.
millpond wrote:One possible other scenario is a server that deliberately desires to frequently wipe logs.
Users browsing this forum: No registered users and 6 guests