Hi, have found this query for get the IDS free memory, first 2 terms shows ok, but i tried to add the third, i want the PCT (%) of free memory, but shows bad number:
SELECT format_units(sum(seg_size)) as ifx_memory_allocated,
format_units(sum(seg_blkfree),4) as ifx_memory_free,
(sum(seg_blkfree) * 100) / sum(seg_size) as pct_free
FROM sysmaster:sysseglst
SELECT format_units(sum(seg_size)) as ifx_memory_allocated,
format_units(sum(seg_blkfree * 4096),4) as ifx_memory_free,
(100 * sum(seg_blkfree)) / sum((seg_blkused + seg_blkfree)) as
pct_free
FROM sysmaster:sysseglst;
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Oct 29, 2012 at 3:06 PM, eferreyra <eferre...@gmail.com> wrote:
> Hi, have found this query for get the IDS free memory, first 2 terms shows
> ok, but i tried to add the third, i want the PCT (%) of free memory, but
> shows bad number:
> SELECT format_units(sum(seg_size)) as ifx_memory_allocated,
> format_units(sum(seg_blkfree),4) as ifx_memory_free,
> (sum(seg_blkfree) * 100) / sum(seg_size) as pct_free
> FROM sysmaster:sysseglst
Hi Art, it didnt returned the second correct value correct:
272 MB 254 GB 23.32802204900736402394384393437
Anyway 4096 its the number i was missing in my query, can i get it form sysmaster too ?
The only 4096 i can find is os_pagesize in sysmachines table.
This is my current full statement then, gives correct values for your system ?
SELECT format_units(sum(seg_size)) as ifx_memory_allocated,
format_units(sum(seg_blkused),4) as ifx_memory_used,
format_units(sum(seg_blkfree),4) as ifx_memory_free,
format_units(sum(os_mem_total)) as os_memory_total,
format_units(sum(os_mem_free)) as os_memory_free,
(((sum(seg_blkfree)/sum(seg_size)) * min(os_pagesize)) * 100) as ifx_free_pct,
((sum(os_mem_free)/sum(os_mem_total)) * 100) as os_free_pct
from sysmaster:sysseglst, sysmaster:sysmachineinfo;