Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Ignore filesystems that we can't access in the freespace plugin #130

Closed
wants to merge 1 commit into from

Conversation

christopherobin
Copy link

ISSUE TYPE
  • Bugfix pull-request
DSTAT VERSION

All versions

SUMMARY

When using the freespace plugin and running as a non-privileged user, if any of the filesystems listed in mtab is not accessible due to permissions, the plugin will entirely fail and return no data.

With this fix at least the system will ignore those filesystems and display the other ones, right now it shows no output to say that an endpoint might not be accessible, maybe a warning on stderr would be useful?

Before
ubuntu@monitor:~$ dstat --freespace
Module dstat_freespace failed to load. ([Errno 13] Permission denied: '/var/lib/docker/overlay/b57c3004a3b63d246d8c97146344aac42cf81f356a9fa11b8feb27f7143c5c76/merged')
None of the stats you selected are available.
After
ubuntu@monitor:~$ dstat --freespace
-----/------/connection----/lxcfs-----/vagrant----/overlay-
 used  free: used  free: used  free: used  free: used  free
2722M 7140M:   0     0 :   0     0 : 164G 64.6G:2722M 7140M
2722M 7140M:   0     0 :   0     0 : 164G 64.6G:2722M 7140M
2722M 7140M:   0     0 :   0     0 : 164G 64.6G:2722M 7140M
...

Useful when dstat is running as a non-privileged user (such as fluentd) on a system that
has a bunch of docker overlay fs with restricted access rights
@scottchiefbaker
Copy link
Collaborator

Did this not get merged?

@christopherobin
Copy link
Author

Not sure if anyone did a similar fix, since there was no activity for so long I guessed there was no interest in it and closed it to reduce clutter on my side.

@christopherobin
Copy link
Author

Last commit on freespace is 3 year old so the issue is probably still there, I can re-open if needed

@scottchiefbaker
Copy link
Collaborator

I like the idea in theory. I use --freespace semi-regularly. I have no idea what the fix entails.

I support updating this module to make it more "modern"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants