Repository navigation
Fix AIX inode collection: use correct df format and include NFS mounts - #3409
Conversation
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
📝 WalkthroughWalkthroughAixFileSystem switches AIX inode collection to regex-filtered ChangesAIX filesystem inode parsing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@oshi-common/src/main/java/oshi/software/common/os/unix/aix/AixFileSystem.java`:
- Around line 73-79: The inode parsing in AixFileSystem is mapping the AIX df -F
columns backwards: split[length - 2] should populate the used inode count and
split[length - 1] should populate the free inode count according to the "%l %n"
output order. Update the assignments in the FS_PATTERN parsing block so
inodeTotalMap still uses used + free, but inodeFreeMap stores the value from the
free-inodes column, keeping the logic aligned with ParseUtil.split and the AIX
df -F format.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5f687786-723f-410a-9a59-b50c0afa9a7e
📒 Files selected for processing (1)
oshi-common/src/main/java/oshi/software/common/os/unix/aix/AixFileSystem.java
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-04-12T19:22:09.716Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3149
File: oshi-common/src/main/java/oshi/hardware/common/platform/mac/MacCentralProcessor.java:159-163
Timestamp: 2026-04-12T19:22:09.716Z
Learning: When reviewing OSHI hardware platform code that uses or implements `CentralProcessor`/`PhysicalProcessor.getEfficiency()`, remember the API’s counterintuitive semantics: a *higher* efficiency-class value indicates *greater performance* (lower efficiency). P-cores/“performance cores” should therefore have higher values (e.g., 1) than E-cores/“efficiency cores” (e.g., 0), as documented in the `CentralProcessor` Javadoc. Do not flag code as incorrect solely because ARM_P_CORES or Intel P-cores are assigned higher efficiency values.
Applied to files:
oshi-common/src/main/java/oshi/software/common/os/unix/aix/AixFileSystem.java
🔇 Additional comments (1)
oshi-common/src/main/java/oshi/software/common/os/unix/aix/AixFileSystem.java (1)
13-13: LGTM!Also applies to: 44-44, 58-59, 73-75
|
I will do another round of review on AIX regarding parsing of the df results and post my findings here. |
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 3-5: The changelog heading hierarchy is inconsistent because the
current subsection uses a fifth-level heading and skips levels from the section
above. Update the heading under the top-level changelog section in CHANGELOG.md
to a second-level heading so it matches the existing hierarchy and avoids
triggering markdownlint heading-increment, keeping the “Bug Fixes and
Improvements” section aligned with the rest of the document.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 70f9a5d3-e3e7-4972-ae96-4ce31bb151bd
📒 Files selected for processing (1)
CHANGELOG.md
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🪛 markdownlint-cli2 (0.22.1)
CHANGELOG.md
[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h5
(MD001, heading-increment)
|
Thanks for the fix!
We do test AIX in the cfarm GitHub workflow, although that only runs on push to master. Still, it represents a missing test or incorrect assumption. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3409 +/- ##
============================================
- Coverage 75.04% 75.00% -0.05%
Complexity 76 76
============================================
Files 579 579
Lines 21353 21353
Branches 3554 3554
============================================
- Hits 16025 16016 -9
+ Misses 3305 3304 -1
- Partials 2023 2033 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This may be true on AIX 7.1 and 7.2. The only AIX access I have is the GCC Compile Farm machine which runs AIX 7.3: The proposed replacement seems to produce the appropriate output: Given this block of code is only getting the inode values, it's a reasonable compatibility adjustment: please add a note in a comment about the choice to use this command line for AIX 7.1-7.2 compatibility. |
AIX 7.3 added POSIX df -i support; earlier versions only support the native format-specifier syntax, so df -F %n %l is used for compatibility. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Problem
`AixFileSystem.getFileStoreMatching()` has two bugs in its inode-data collection step that affect AIX systems in production:
1. Wrong `df` command. The code ran `df -i`, which is a Linux/POSIX flag that does not exist on AIX. The AIX-native equivalent is `df -F %n %l` (format specifiers: `%n` = free file nodes / Ifree, `%l` = used file nodes / Iused). On real AIX hosts, `df -i` either fails or produces no parseable inode output, causing all file stores to report 0 inodes.
Note: the format string must not be quoted. `df -F "%n %l"` (with shell quotes) causes AIX to treat the entire string as a single specifier, silently dropping `%l` and outputting only the Ifree column.
2. NFS mounts silently dropped. The inode-data loop filtered with `line.startsWith("/")`. On AIX, NFS entries in `df` output appear as `hostname:/path` or `192.168.x.x:/path`, which do not start with `/`. All NFS file stores therefore reported 0 inodes regardless.
Both issues were observed on AIX 7.x production systems.
Fix
Testing
AIX is not in CI. Manual verification on AIX 7.2 confirms that:
Summary by CodeRabbit
Bug Fixes
Documentation