Skip to content

Conversation

@mickours
Copy link

memory check use to crash with a this error when there is no Swap:

File "/var/lib/shinken/libexec/check_memory_by_ssh.py", line 166, in <module>
  perfdata += ' %s=%s%%;;;0%%;100%%' % (k, int(100 * float(v)/swap_total))   
 ZeroDivisionError: float division by zero

Make check kernel, nfs, net and disk works with busybox now.

mickours added 3 commits July 22, 2014 15:17
Use stat instead of ls/awk to avoid this busybox error:
```
ls: unrecognized option '--time-style=+%s'                                                                                                           [169/811]
BusyBox v1.19.0 (2012-11-21 18:06:14 PST) multi-call binary.
```
The `df -T` is not working with busybox so grep filesystem that begins with /dev instead of checking for filesystem type
Remove trailing white spaces too
@mickours mickours changed the title Avoid division by zero if the Swap size is 0 Avoid division by zero if the Swap size is 0 and make it busybox compliant Jul 22, 2014
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