Relevance: Trying to sum the used space from an endpoint

Hi everyone! I need some help here. We’re tying to create a property wich sum the used space of all the disks from an endpoint.
We found this one which calculates the storage capacity and works really good:

“Almacenamiento Total: " & ((sum of total spaces of drives whose (type of it = “DRIVE_FIXED”) as integer) / 1024 / 1024 / 1024) as string & “GB”;((name of it & " - " & (total space of it / 1024 / 1024 /1024) as string & “GB”) | (name of it & " - Error”)) of drives whose (type of it = “DRIVE_FIXED”)

But now, when we tried to make the same but for used storage we are having some errors:

"Almacenamiento Usado: " & ((sum of total space of it - free space of it) /(102410241024)) as string & “GB”) & ", Libre: “& ((free space of it /(102410241024)) as string & " GB”)) of drives whose(exists name of it AND exists free space of it AND type of it = “DRIVE_FRIXED”)

We made this based in this other property (That works) but we were trying to sum all drives:
(name of it & " -Usado: " & (((total space of it - free space of it) /(102410241024)) as string & " GB") & “, Free:”& ((free space of it /(102410241024)) as string & " GB")) of drives whose(exists name of it AND exists free space of it AND type of it = “DRIVE_FIXED”)

Hope I can find some help here,

Thanks
Joaquin

Is this what you want?

sum of (total space of it - free space of it) of (drives whose (type of it = "DRIVE_FIXED"))

Also, please try to not cross-post as per https://forum.bigfix.com/guidelines

2 Likes

Thanks!! Sorry fot the cross-post, i had no idea. How can I show that number in GB?

((it / 1024 / 1024 / 1024) as string & " GB") of sum of (total space of it - free space of it) of (drives whose (type of it = "DRIVE_FIXED"))

2 Likes

Thanks!!! Works perfect. Thank you :grinning::grinning::grinning: