Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
memory free pct ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
eferreyra  
View profile  
 More options Oct 29 2012, 3:06 pm
Newsgroups: comp.databases.informix
From: eferreyra <eferre...@gmail.com>
Date: Mon, 29 Oct 2012 12:06:31 -0700 (PDT)
Local: Mon, Oct 29 2012 3:06 pm
Subject: memory free pct ?
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

What is wrong ?

example:
ifx_memory_allocated    ifx_memory_free  pct_free
11.0 GB                 4.37 GB          0.0097323743318829246144932703449505


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Art Kagel  
View profile  
 More options Oct 29 2012, 4:00 pm
Newsgroups: comp.databases.informix
From: Art Kagel <art.ka...@gmail.com>
Date: Mon, 29 Oct 2012 15:59:36 -0400
Local: Mon, Oct 29 2012 3:59 pm
Subject: Re: memory free pct ?

Try this one:

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;

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eferreyra  
View profile  
 More options Oct 30 2012, 7:16 am
Newsgroups: comp.databases.informix
From: eferreyra <eferre...@gmail.com>
Date: Tue, 30 Oct 2012 04:16:35 -0700 (PDT)
Local: Tues, Oct 30 2012 7:16 am
Subject: Re: memory free pct ?
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;


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Harris  
View profile  
 More options Oct 31 2012, 1:28 am
Newsgroups: comp.databases.informix
From: Jason Harris <j...@jgharris.com>
Date: Tue, 30 Oct 2012 22:28:33 -0700 (PDT)
Local: Wed, Oct 31 2012 1:28 am
Subject: Re: memory free pct ?
Hi,

Your numbers look ok, only because you are on a 4k page size operating system, and one memory block is always 4k.

I use this to calculate free percent:
seg_blkfree/(seg_blkused+seg_blkfree)*100

I use this to determine the number of bytes in each block:
seg_size/(seg_blkused+seg_blkfree)

HTH,

Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »