fastfetch
fastfetch copied to clipboard
Memory (FreeBSD): fixing disk cache fetching
Summary
Memory fetching for FreeBSD was using vm.stats.vm.v_cache_count as cache, but FreeBSD's kernel doesn't have cache pages since version 12. The value is still there for compatibility, but it returns always 0.
Changes
- using filesystem buffer cache and ARC cache:
vfs.bufspacetracks the bytes used to buffer the filesystem addressing for other filesystems than ZFS, and ARC tracks buffers AND cache for ZFS, which bypasses bufspace entirely. I also decrease the minimum ARC cache, since that's arguably non retrievable memory. The results now are more aligned with how other monitoring tools track memory. In fact, I submitted PRs for btop and htop to fix similar issues.
Checklist
- [x] I have tested my changes locally
Up to standards :white_check_mark:
🟢 Issues 0 issues
Results:
0new issues
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.