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

CLI command "intfstat -D" fails when counters dump file does not exist #749

Closed
yvolynets-mlnx opened this issue Nov 21, 2019 · 2 comments · Fixed by #752
Closed

CLI command "intfstat -D" fails when counters dump file does not exist #749

yvolynets-mlnx opened this issue Nov 21, 2019 · 2 comments · Fixed by #752

Comments

@yvolynets-mlnx
Copy link

Description
CLI command "intfstat -D" fails when counters dump file does not exist.

Steps to reproduce the issue

  1. intfstat -D
  2. intfstat -D

Describe the results you received

root@arc-switch1041:/home/admin# intfstat -D
Traceback (most recent call last):
  File "/usr/bin/intfstat", line 346, in <module>
    main()
  File "/usr/bin/intfstat", line 272, in main
    for file in os.listdir(cnstat_dir):
OSError: [Errno 2] No such file or directory: '/tmp/intfstat-0'
root@arc-switch1041:/home/admin# intfstat -D
Traceback (most recent call last):
  File "/usr/bin/intfstat", line 346, in <module>
    main()
  File "/usr/bin/intfstat", line 272, in main
    for file in os.listdir(cnstat_dir):
OSError: [Errno 2] No such file or directory: '/tmp/intfstat-0'

Expected results
Handle case when counters file does not exist.

Output of show version

root@arc-switch1041:/home/admin# show version

SONiC Software Version: SONiC.HEAD.128-b25ec7d5
Distribution: Debian 9.11
Kernel: 4.9.0-9-2-amd64
Build commit: b25ec7d5
Build date: Wed Nov 20 03:40:41 UTC 2019
Built by: johnar@jenkins-worker-4

Platform: x86_64-mlnx_msn2740-r0
HwSKU: ACS-MSN2740
ASIC: mellanox

@msosyak
Copy link

msosyak commented Nov 22, 2019

The fix is already created #744

@mykolaf
Copy link
Collaborator

mykolaf commented Nov 22, 2019

@msosyak It's the same issue, but in intfstat.

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 a pull request may close this issue.

3 participants