Skip to content

Commit

Permalink
free_pages and fix free_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Nov 8, 2024
1 parent f4f8ee4 commit bc3465f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion checkQstar.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ func readFilesystem(filesystem string) (*params, error) {

// calculate free bytes
if max_number_of_pages >= 0 && present_pages >= 0 {
item["free_bytes"] = (max_number_of_pages - present_pages) * pageSize
free_pages := max_number_of_pages - present_pages
if free_pages >= 0 {
item["free_pages"] = free_pages
item["free_bytes"] = free_pages * pageSize
}
}

return &params{
Expand Down

0 comments on commit bc3465f

Please sign in to comment.