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

ZeroDivisionError in python-sarviz/sar/viz.py #2

Open
nicolas-raoul opened this issue Apr 16, 2018 · 0 comments
Open

ZeroDivisionError in python-sarviz/sar/viz.py #2

nicolas-raoul opened this issue Apr 16, 2018 · 0 comments

Comments

@nicolas-raoul
Copy link

nicolas-raoul commented Apr 16, 2018

python-sarviz's demo.py crashes on any of my sar files:

Traceback (most recent call last):
  File "demo.py", line 30, in <module>
    main(sys.argv[1], sys.argv[2])
  File "demo.py", line 15, in main
    sar_viz = viz.Visualization(insar.get_sar_info(), paging=True, network=True, disk=True)
  File "/home/nico/src/python-sarviz/sar/viz.py", line 78, in __init__
    self._preprocess_sar_data()
  File "/home/nico/src/python-sarviz/sar/viz.py", line 114, in _preprocess_sar_data
    self.xticks = np.arange(0, tp_count, xtick_label_stepsize)
ZeroDivisionError: division by zero

Debugging shows that both tp_count and xtick_label_stepsize have a value of 0. Setting the parameters of viz.Visualization to false does not solve the problem.

By the way, here is the result of sar -A -f /var/log/sysstat/sa11 (my goal is to have graphs for as many variables as possible):

sar.txt

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

No branches or pull requests

1 participant