Skip to content

Add AIX support#354

Open
librepower wants to merge 1 commit into
muesli:masterfrom
librepower:add-aix-support
Open

Add AIX support#354
librepower wants to merge 1 commit into
muesli:masterfrom
librepower:add-aix-support

Conversation

@librepower
Copy link
Copy Markdown

Add AIX support

Summary

This PR adds support for IBM AIX operating system.

Changes

  • filesystems_aix.go: AIX-specific filesystem type detection
  • mounts_aix.go: Mount point enumeration using AIX's mount command and statfs syscall

Implementation Notes

AIX doesn't have /proc/self/mountinfo like Linux or Getfsstat like BSD, so the implementation parses the output of the mount command and uses unix.Statfs for filesystem statistics.

Filesystem Types

  • Network: nfs, nfs3, nfs4, cifs, smbfs, afs
  • Special: procfs, namefs, sfs, cdrom
  • FUSE: Not supported on AIX (returns false)

Testing

Tested on AIX 7.3 TL4 (POWER9):

$ ./duf
╭──────────────────────────────────────────────────────────────────────────────╮
│ 9 local devices                                                              │
├──────────────────┬────────┬────────┬────────┬────────┬───────┬───────────────┤
│ MOUNTED ON       │   SIZE │   USED │  AVAIL │  USE%  │ TYPE  │ FILESYSTEM    │
├──────────────────┼────────┼────────┼────────┼────────┼───────┼───────────────┤
│ /                │  12.1G │   3.0G │   9.1G │  24.5% │ jfs2  │ /dev/hd4      │
│ /usr             │   7.8G │   2.7G │   5.1G │  34.4% │ jfs2  │ /dev/hd2      │
│ /var             │  15.2G │ 343.4M │  14.9G │   2.2% │ jfs2  │ /dev/hd9var   │
│ /tmp             │  40.1G │   7.1G │  33.0G │  17.8% │ jfs2  │ /dev/hd3      │
│ /home            │ 128.0M │ 772.0K │ 127.2M │   0.6% │ jfs2  │ /dev/hd1      │
│ /opt             │  17.1G │   9.7G │   7.4G │  56.9% │ jfs2  │ /dev/hd10opt  │
...

Build

GOOS=aix GOARCH=ppc64 go build

Notes

  • Requires Go 1.21+ (official Go, not gccgo)
  • Uses golang.org/x/sys/unix which already has full AIX support
  • Color output works correctly via termenv (AIX support added in v0.16.0)

Contributed by LibrePower - Open source tools for IBM Power systems.

- Add filesystems_aix.go for filesystem type detection (network, special, fuse)
- Add mounts_aix.go for mount enumeration via mount command and Statfs syscall

Tested on AIX 7.3 TL4 (POWER9) with full color output.

Contributed by LibrePower (https://librepower.org)
librepower pushed a commit to librepower/aix that referenced this pull request Jan 12, 2026
New packages:
- duf 0.9.1: Modern disk usage utility with colorful output
- gron 0.7.1: Make JSON greppable
- yq 4.40.5: YAML/JSON/XML processor (like jq for YAML)
- age 1.2.0: Simple, modern file encryption
- ripgrep 14.1.1: Fast grep alternative (already in repo, added to index)

All packages built with Go 1.24.11 (official) on AIX 7.3 TL4.

duf AIX support PR: muesli/duf#354
librepower pushed a commit to librepower/aix that referenced this pull request Jan 29, 2026
New packages:
- duf 0.9.1: Modern disk usage utility with colorful output
- gron 0.7.1: Make JSON greppable
- yq 4.40.5: YAML/JSON/XML processor (like jq for YAML)
- age 1.2.0: Simple, modern file encryption
- ripgrep 14.1.1: Fast grep alternative (already in repo, added to index)

All packages built with Go 1.24.11 (official) on AIX 7.3 TL4.

duf AIX support PR: muesli/duf#354
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.

1 participant