Skip to content

check disk space at klipper startup - #370

Open
bniggemyer wants to merge 4 commits into
OpenCentauri:mainfrom
bniggemyer:check-disk
Open

bniggemyer wants to merge 4 commits into
OpenCentauri:mainfrom
bniggemyer:check-disk

Conversation

@bniggemyer

Copy link
Copy Markdown
Contributor

check available space on /board-resource and /user-resource at startup. If either filesystem is above 90% utilization, display a message to the user

tested by creating large files and confirming appearance of warning message

bniggemyer and others added 2 commits September 30, 2026 08:02

@jamesturton jamesturton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the idea! Unsure on the implementation - could you not use the uiprompt command instead of implementing your own _DISK_WARN_DIALOG?
Then you wouldn't need any change in macros.cfg and check-disk.sh could be simplified too.

{% endif %}

[gcode_shell_command CHECK_DISK]
command: sh check-disk

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already include the shebang in check-disk.sh

@bniggemyer

Copy link
Copy Markdown
Contributor Author

thanks, I thought cosmos already had a method to pop a prompt but I couldn't find it. Updated PR, rebuilt and tested on CC1.

@suchmememanyskill

Copy link
Copy Markdown
Contributor

Do note, the uiprompt command only works when klipper is up. So you cannot just put it somewhere at boot and expect it to work. You'll likely have to wait somewhere for 60 seconds

@bniggemyer

Copy link
Copy Markdown
Contributor Author

Do note, the uiprompt command only works when klipper is up. So you cannot just put it somewhere at boot and expect it to work. You'll likely have to wait somewhere for 60 seconds

addressed in shell.cfg

[gcode_shell_command CHECK_DISK]
command: check-disk
timeout: 5
verbose: True

[delayed_gcode check_disk_startup]
initial_duration: 60
gcode:
RUN_SHELL_COMMAND CMD=CHECK_DISK

This branch is waiting to be deployed

1 waiting deployment
approval-needed — 6ac1722c Waiting Oct 1, 2026 by bniggemyer via approve #745
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants