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

Free disk space fact #8

Open
sibrcode opened this issue Nov 15, 2015 · 3 comments
Open

Free disk space fact #8

sibrcode opened this issue Nov 15, 2015 · 3 comments

Comments

@sibrcode
Copy link
Contributor

Although not strictly related to FileMaker, a fact listing mounted volumes and their available space would be desirable.

Notifications for low disk space would be an additional plus.

@sibrcode
Copy link
Contributor Author

sibrcode commented Feb 3, 2017

The mountpoint fact, present since at least Puppet 3.4, is mentioned as a fact that can return the available bytes for a given path, but this is not present on the macOS installer for facter 2.4.6.

@sibrcode
Copy link
Contributor Author

sibrcode commented Feb 3, 2017

A bit cryptic, but could be a starting point to doing this for boot drive:

`(File.exists?('C:\\') ? `dir /-C\`.match(/(\d+) bytes free/) : `df .`.match(/(\d+)\s*\d*%/)).captures[0].to_i`

@sibrcode
Copy link
Contributor Author

A macOS version of diskfree fact committed yesterday. Still need a Windows equivalent.

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