3 of 3 people found this helpful
You can do something like
file_size := fsmount.size;
if file_size <> none then
file_size := file_size / 1048576;
and assign file_size to FileSystemSize
This helps me avoid error which I was getting earlier.
But I have new situation now, where I can't get decimal value synced after division.
ex. /splunk size is 3030800/1048576 = 2.8 GB
But at time of sync only 2 is getting synced. How can I fix this? please help me with this.
There is no .8 part in the division - it does integer division, so the value is 2.
Why exactly are you doing this conversion anyway? The BMC_FileSystem documents that it expects the values in bytes.
I understand that BMC recommendation for FS size is in Bytes, but my management says if BMC Discovery shows FS value in UI in GB it should be consistent in CMDB too. And this is why they have asked me to have this conversion and I am forced to find solution for it.
2 of 2 people found this helpful
Everything uses the same units and is converted for display. You are not going to be able to convert the value to 2.8 in the syncmapping.
Understand. Thank you for helping me.