I’m looking to relevance to show hosts with a minimum of 2GB free space on the “/opt” filesystem for Linux. I’ve found ones where I believe it looks at all drives but not one where I can look specifically at one drive.
((free space of filesystem system “/opt” / (1024 * 1024)) < 2048)
I know it is not exactly related but has anyone noticed that the Free Space, Total Space, Block Size, etc subinspectors of “filesystem” or “drive” are not working? Is that expected or a bug cause I can’t find anything in the documentation for it? If it is by design, any workarounds?
Example:
Q: (name of it, mount point of it, (if exist total space of it then total space of it as string else "N/A"), (if exist size of it then size of it as string else "N/A"), fstype of it, type of it, (if exist uuid of it then uuid of it else "N/A"), (if exist block size of it then block size of it as string else "N/A")) of drives whose (if (type of it = "DRIVE_FIXED") then (total space of it > 0) else true)
A: /dev, /dev, 16626241536, 16626241536, devtmpfs, DRIVE_FIXED, N/A, 4096
A: /dev/shm, /dev/shm, 16647557120, 16647557120, tmpfs, DRIVE_FIXED, N/A, 4096
A: /run, /run, 16647557120, 16647557120, tmpfs, DRIVE_FIXED, N/A, 4096
A: /sys/fs/cgroup, /sys/fs/cgroup, 16647557120, 16647557120, tmpfs, DRIVE_FIXED, N/A, 4096
A: /, /, 8579448832, 8579448832, xfs, DRIVE_FIXED, 8d4b2608-4245-4293-ad2f-4fa324eb1ac8, 4096
...
A: /opt/BigFixData/PROD, /opt/BigFixData/PROD, N/A, N/A, nfs4, DRIVE_REMOTE, N/A, N/A
A: /opt/BigFixData/DEV, /opt/BigFixData/DEV, N/A, N/A, nfs4, DRIVE_REMOTE, N/A, N/A
T: 51606
``.
In your example, are they working correctly for the local drives (are the numbers correct)?
I’m not sure what the expected behavior should be for the drives that are NFS mounted, as your last two examples. If I’m not mistaken the inspector is basically performing the same operations as ‘lsblk’ and I don’t think those are expected to work over NFS.
Correct. The local filesystems are showing correct values for both disk sizes and block size but non-existent for the 2 NFS mounted systems.
That’s where it is strange and not making sense imho though. If the filesystem/drive inspectors on Linux/Unix were behaving like lsblk then they wouldn’t see/display NFS mounted filesystems at all because lsblk doesn’t show those, which also is exactly what happens on Windows side (drive inspectors there pickup drives but do not display any mount points), but the fact that it does show them seems to indicate that the filesystems’ data is coming from ‘df -Th’ which does pick those up but it also has the sizes available for those. So either it is acting as df and this is a bug OR it may still be some really strange design where the list is from df but the actual sizes data is from lsblk which if the case I would have expected the behaviour to be documented…