We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
GetFileSystemUsage returns Kilobytes instead of Bytes.
Example Code which should print the used Gigabytes:
package main import ( "fmt" sigar "github.com/cloudfoundry/gosigar" ) func main() { s := sigar.ConcreteSigar{} fsUsage, _ := s.GetFileSystemUsage("/System/Volumes/Data") gbUsed := float64(fsUsage.Used) / 1024 / 1024 / 1024 // converting bytes to Gigabytes fmt.Printf("%3.2f GB used\n", gbUsed) }
Result on my machine:
0.34 GB used
Expected result:
> df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on ... /dev/disk3s5 460Gi 338Gi 108Gi 76% 6446774 1131120840 1% /System/Volumes/Data ...
OS: macOS gosigar version: 1.3.36
The text was updated successfully, but these errors were encountered:
We would love to review a PR if you want to contribute.
Sorry, something went wrong.
No branches or pull requests
GetFileSystemUsage returns Kilobytes instead of Bytes.
Example Code which should print the used Gigabytes:
Result on my machine:
Expected result:
> df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on ... /dev/disk3s5 460Gi 338Gi 108Gi 76% 6446774 1131120840 1% /System/Volumes/Data ...
OS: macOS
gosigar version: 1.3.36
The text was updated successfully, but these errors were encountered: