mntinfo
is a minimalistic Linux-only Go package for discovering the
currently mounted filesystems seen by processes. This package additionally
supports discovering only those mounts matching a specific filesystem type.
Note: mount discovery is done using
/proc/[PID]/mountinfo
data from theproc
filesystem – see also proc(5).
go get github.com/thediveo/go-mntinfo
- to view the package documentation locally:
- either:
make pkgsite
, then navigate to http://localhost:6060/github.com/thediveo/go-plugger; - or, in VSCode (using the VSCode-integrated simple browser): “Tasks: Run Task” ⇢ “View Go module documentation”.
- either:
make
shows the available make targets.
mntinfo
is Copyright 2019-23 Harald Albrecht, and licensed under the
Apache License, Version 2.0.
Linux.
For a multi-platform solution please take a look at gopsutil instead.