Skip to content

feat: automatically skip large file systems#427

Merged
tclahr merged 5 commits into
tclahr:developfrom
halpomeranz:skip-large-mountpoints
Mar 5, 2026
Merged

feat: automatically skip large file systems#427
tclahr merged 5 commits into
tclahr:developfrom
halpomeranz:skip-large-mountpoints

Conversation

@halpomeranz

Copy link
Copy Markdown
Contributor

Adding a new configuration variable, exclude_mount_size. If non-zero, exclude any file systems (except the root file system) that are using more than than the specified amount of disk space. May use usual size units-- for example, "4T" for terabytes. Default is zero, which disables this feature. Per Issue #415

halpomeranz and others added 2 commits January 13, 2026 11:01
Adding a new configuration variable, exclude_mount_size. If non-zero, exclude any file systems (except the root file system) that are using more than than the specified amount of disk space. May use usual size units-- for example, "4T" for terabytes. Default is zero, which disables this feature.

Signed-off-by: Hal Pomeranz <hrpomeranz@gmail.com>
@tclahr

tclahr commented Feb 5, 2026

Copy link
Copy Markdown
Owner

Don't you think it would be good to use bytes as the size unit as min_file_size and max_file_size support bytes only?
Also, in avml the avml_max_memory variable is also defined in bytes.

I can do the proper changes if you agree.

@halpomeranz

Copy link
Copy Markdown
Contributor Author

To turn this around, wouldn't it be cool if all of these parameters accepted the units that _convert_size_to_kb() does?

We could take the logic from _convert_size_to_kb() and make a _convert_size_to_bytes() function. Then refactor _convert_size_to_kb() to call the new _convert_size_to_bytes(). The parameters that currently expect bytes could just be filtered through _convert_size_to_bytes() directly.

Yes, I was put on this earth to make life difficult. :-)

@tclahr

tclahr commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Ok, I can rename _convert_size_to_kb to _convert_size_to_bytes and use it to convert max_file_size and min_file_size.

We could make it a helper function (same as command_exists), so it could be called by command collector, used in conditions etc. We could call it size_to_bytes().

tclahr and others added 3 commits March 5, 2026 18:21
Added `exclude_mount_point_size` configuration option (uac.conf) to specify the mount points that will be excluded from the collection if their used size is greater than the specified value.

Closes issue tclahr#415
@tclahr

tclahr commented Mar 5, 2026

Copy link
Copy Markdown
Owner

I did some changes and merged into develop.

@tclahr tclahr merged commit 4d8b2d4 into tclahr:develop Mar 5, 2026
2 checks passed
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.

2 participants