Skip to content

Comments

additional error handling when reading files in /sys/class#215

Merged
pgier merged 1 commit intoprometheus:masterfrom
pgier:additional-error-handling-for-reading-sys-class-files
Sep 15, 2019
Merged

additional error handling when reading files in /sys/class#215
pgier merged 1 commit intoprometheus:masterfrom
pgier:additional-error-handling-for-reading-sys-class-files

Conversation

@pgier
Copy link
Collaborator

@pgier pgier commented Sep 11, 2019

Some regular files in /sys/class are not readable on certain
systems, so just ignore them.

Related to #213 which checks that directory entries are regular files and not symlinks. However, there is the additional problem that some files in /sys/class/ (e.g. /sys/class/net/enp0s31f6/phys_port_id) are not readable even though they are regular files. Before the recent refactoring, these read errors were ignored. This change makes these errors ignored again.

Some regular files in /sys/class are not readable on certain
systems, so just ignore them.

Signed-off-by: Paul Gier <pgier@redhat.com>
@pgier
Copy link
Collaborator Author

pgier commented Sep 11, 2019

See also prometheus/node_exporter#1465

@pgier pgier merged commit 499c855 into prometheus:master Sep 15, 2019
bobrik pushed a commit to bobrik/procfs that referenced this pull request Jan 14, 2023
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