You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (mo st recent call last):
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-process-checks-3.2.0/bin/metrics-per-process.py", line 330, in <module>
main()
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-process-checks-3.2.0/bin/metrics-per-process.py", line 318, in main
pids = find_pids_from_name(options.process_name)
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-process-checks-3.2.0/bin/metrics-per-process.py", line 119, in find_pids_from_name
return find_pids(matcher)
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-process-checks-3.2.0/bin/metrics-per-process.py", line 104, in find_pids
if matcher(path):
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-process-checks-3.2.0/bin/metrics-per-process.py", line 116, in matcher
file_handler = open(path + '/comm', 'r')
IOError: [Errno 2] No such file or directory: '/proc/19630/comm'
In #25 we catch OSError to cover the case when directory /proc/<pid>/ does not exist.
In this issue however, it seems /proc/<pid>/ exists but /proc/<pid>/comm does not.
I believe we should catch both OSError & IOError to cover both cases.
Activity