Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: capture filesystems #74

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

brianmcgee
Copy link
Member

@brianmcgee brianmcgee commented Aug 13, 2024

Closes #9

@brianmcgee brianmcgee changed the title wip: capture filesystems feat: capture filesystems Aug 13, 2024
Signed-off-by: Brian McGee <[email protected]>
@brianmcgee brianmcgee force-pushed the feat/capture-filesystems branch from 638c94e to 9793a63 Compare August 13, 2024 10:23
"github.com/moby/sys/mountinfo"
)

var specialFsRegex = regexp.MustCompile(`^(/proc|/dev|/sys|/run|/var/lib/docker|/var/lib/nfs/rpc_pipefs).*`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not entirely clear for me what's a "special" filesystem here. Makes sense to filter /proc, /sys, etc. as we are looking for block devices containing file systems. But why /var/lib/docker? Too me, this seems a bit too specific for this layer.

@@ -86,7 +86,8 @@ func init() {

// Options for optional ephemeral system properties.
f.BoolVarP(&scanner.Swap, "swap", "s", false, "capture swap entries")
f.BoolVarP(&scanner.Ephemeral, "ephemeral", "e", false, "capture all ephemeral properties e.g. swap, filesystems and so on")
f.BoolVarP(&scanner.Mounts, "mounts", "m", false, "capture filesystem mounts")
f.BoolVarP(&scanner.Ephemeral, "ephemeral", "e", false, "capture all ephemeral properties e.g. swap, mounts and so on")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ephemeral seems to contains only SwapEntries, no "mounts and so on"? Or am I misreading?

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.

Capture mounted filesystems
2 participants