Hi Team,
I am using below mentioned relevance to get the Disk Space Utilization report. But i want output same as we get from df -h cmd. Please suggest .
(name of it & " - Size: " & ((total space of it /(102410241024)) as string & " GB") & “, Used:(” & (((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 exists type of it AND exists total space of it AND type of it = “DRIVE_FIXED” AND total space of it != 0)
Following relevance gives me the same values like df -h command on linux. I didn’t test it on AIX. (device name of it,(if size of it < (1024*1024*1024) then (size of it/(1024*1024)) as string & "MB" else (size of it/(1024*1024*1024)) as string & "GB"),(if used space of it < (1024*1024*1024) then (used space of it/(1024*1024)) as string & "MB" else (used space of it/(1024*1024*1024)) as string & "GB"),(if free space of it < (1024*1024*1024) then (free space of it/(1024*1024)) as string & "MB" else (free space of it/(1024*1024*1024)) as string & "GB"),used percent of it,mount point of it) of filesystems whose (size of it > 0)
Output formatting is up to you
Well, then use either different property which is defined on all systems (maybe name of it ) or you could use alternative property in case the first one doesn’t exist. For example if all Linuxes have device name defined and only AIX doesn’t, you could use (device name of it | logical volume of it as string,(if size of it < (1024*1024*1024) then (size of it/(1024*1024)) as string & "MB" else (size of it/(1024*1024*1024)) as string & "GB"),(if used space of it < (1024*1024*1024) then (used space of it/(1024*1024)) as string & "MB" else (used space of it/(1024*1024*1024)) as string & "GB"),(if free space of it < (1024*1024*1024) then (free space of it/(1024*1024)) as string & "MB" else (free space of it/(1024*1024*1024)) as string & "GB"),used percent of it,mount point of it) of filesystems whose (size of it > 0)
Try different properties until you like the result
To get all defined filesystem properties on computer, you can use relevance properties of (type "filesystem")