Comments (7)
Okay so i thought a bit about this feature and i came to the conclusion that i won't implement it.
I don't see a benefit for the majority of users at the moment (might be due to own restricted knowledge in that regard). What is the actual benefit regarding the wear of the sd card? Is it safe to always delete the printer symlink in the tmp folder? Does it get recreated everytime the klipper service starts again (i haven't tested, and i don't want to tbh)? Questions i have no answer to, possible causes for some issues i (or rather kiauh) don't want to be the reason for.
And to be honest i don't want my script to write into any important system files, add lines, change lines or delete lines. Those are things i consider to be made by power-users themself if they want. I want to interact with the core linux os as few as possible.
I might add those tips to my readme though if you want, under a section "further tweaks" or so?
from kiauh.
The memory usage can be kept low by rotating logs with logrotate
create file
/etc/logrotate.d/klipper
with contents
/tmp/*.log
{
size 1M
copytruncate
rotate 0
su pi pi
}
Change size from 1M to something more appropiate
from kiauh.
Haven't you had some problems with logs missing and then Nginx not working properly anymore? I think i red something like that on discord? I really don't want to include functions which can cause further, somehwhat unpredictable problems.
Maybe a better solution would be, to add only klippy.log and moonraker.log to the tmpfs if the user wants? And not the whole tmp-folder? That might work because those files are always created when the services start up, no matter if it already exists or not. And actually it would make sense to me, deleting those files regularly. This klippy.log can get quite bloated.
from kiauh.
You can set nginx logs from
/var/log/ngix/something.log
to
/var/log/nginx_something.log
or add an
mkdir /var/log/nginx/
in the startup sequence or
add in fstab
tmpfs /var/log/nginx tmpfs defaults,noatime,nodev,nosuid,size=10M 0 0
from kiauh.
I also added a file in
/etc/logrotate.d/klipper
with
/tmp/*.log
{
size 1M
copytruncate
rotate 0
su pi pi
}
which makes sure logs aren't filled up
from kiauh.
I've also ran printers off read only filesystems except a small partition for gcode files to upload to (or used an usb stick for that). Those printers had zero filesystem issues and are workhoses. No corruption or broken files. Upgrading is a bit more comples, you need to ssh in, run a command like "root-rw on", then do upgrade, then "root-rw off" the turn it read-only
from kiauh.
Ok.
The benefit is a longer lifetime for the sd card. On all my PIs that run critical stuff the filesystem is fully read only and they write into tmpfs. I've got a couple running for over 4 years under a great number of random power failures and other issues. Cheap sd cards work well for 2-3 months at most, if you write to them a lot of logs and good ones are from 4 to 12 months, but they usually cost 5-10x the price.
from kiauh.
Related Issues (20)
- Can't install on Qidi printer, Permission denied kiauh.log HOT 2
- Multi Printer setup using gcode shell command does not play audio unless command used multiple times and only on second printer when shell script is run in background (&)
- I couldn't use the custom macros that i created with gcode_shell command in a gcode file HOT 1
- Installing KlipperScreen via KIAUH causes /dev/null permissions errors HOT 2
- Install pyserial with python HOT 3
- fix: create_required_folders removes symlink to gcodes
- Installing Klipper packages failed! - Échec de la connexion [IP : 199.232.170.132 80]
- python3.10
- KlipperScreen install randomizes MAC address
- mainsail file permissions 403 errors -- set umask to 022
- Stuck instalation Raspberry Pi Zero 2W with Raspberry Pi OS Lite (32bit) BookWorm HOT 3
- camera-streamer on rpi5 HOT 2
- feat: possibility to set custom install directory HOT 4
- feat: copy instances/endpoints info while updating mainsail/fluidd HOT 2
- Cloning Klipper from https://github.com/Klipper3d/klipper : failed! HOT 3
- Set name to access in local network HOT 2
- local dep for unzip missing in fluidd.sh and mainsail.sh HOT 1
- Bad ref for git/logs/refs/remotes/origin/protoupdate
- BeagleBone Black and Replicape
- feat: only git clone --depth 1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiauh.