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

Enhance System Status to show disk space details #430

Closed
bceylon opened this issue Jan 16, 2017 · 6 comments
Closed

Enhance System Status to show disk space details #430

bceylon opened this issue Jan 16, 2017 · 6 comments

Comments

@bceylon
Copy link

bceylon commented Jan 16, 2017

The version of the app you are reporting:
1.2.35

What is the nature of your issue
Enhance System Status view to show details of available disk space in server side.

Details
This would be good enhancement when monitoring e.g. remote installations. There seems to be some features/functions available in the ZM API for this.

@pliablepixels
Copy link
Member

Yes there is an API for that. unfortunately the API implementation of the disk space command takes up a lot of resources and can crash your ZM instance, if its a large one. So I had to disable it (early versions of zmNinja did have it enabled)

@PartialVolume
Copy link
Contributor

That's a shame it can't be re-enabled, I was thinking how useful that would be just a few days ago when I was running into issues with events not being deleted and the disc space filling up rapidly. Not sure why the API implementation of the disc space command uses a lot of resources when it's so easy to do something like df -h /dev/sdb3 | awk '{print $4}' ? which uses next to no resources. I guess there must be a few bugs in that API implementation ? Maybe I'll download and take a look at how it's being done.

@pliablepixels
Copy link
Member

pliablepixels commented Jan 16, 2017

The API uses du in addition to df because it is calculating disk free per monitor directory https://github.com/ZoneMinder/ZoneMinder/blob/master/web/api/app/Controller/HostController.php#L62

df works at inode level, du iterates though the FS, taking up a lot of CPU.

See ZoneMinder/zoneminder#1140

@PartialVolume
Copy link
Contributor

Thanks for the links, I read the discussion and for what it's worth I'd go with df for calculating freespace in the events partition, forgetting du, personally for me df even though technically it might not be as accurate as du, df will give a good enough idea of how much space is being used on the partition. I use a 300GB disc with zoneminder so a few gig difference between du & df won't make any difference as I just need to know the used space isn't exceeding approximately 80% which is what my purge when full is set too. Unless there is some reason why df can't be used that I'm not aware of. I did wonder about why du checks each camera directory? I also assumed all cameras events were stored in the same partition so using du on each camera directory seemed unnecessary. Am I missing something here, it seems to me that df is the way to go especially as du isn't really an working option. I'm guessing it's a task waiting for somebody to take it on and make the changes & test it. I'm not offering as I've got my end of tax return to do. Maybe in February though I can take a look,if nobody else has fixed it by then :-)

@stale
Copy link

stale bot commented Mar 8, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 8, 2018
@stale stale bot removed the stale label Mar 19, 2018
@stale
Copy link

stale bot commented May 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 18, 2018
@stale stale bot closed this as completed May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants