473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Getting memory size for an application

Hello, I am running DB2 V8.2 on AIX. I am looking for a way to get
the memory size of a specific db2 agent. I have found the db2mtrk
tool that gives me a list of all the applications and heap sizes.
Also there is "DB2 Snapshot for Application" but I am looking for a
way to capture the data for C code without having to parse through a
file. The SNAPSHOT_APPL and SNAPSHOT_APPL_INFO table functions seem
to fall short of the information

I noted there is an admin view available in DB2 V9 that gets the same
information as db2mtrk but it does not appear to be available in V8.

So, does anyone know of a way to retrieve this data? Is it stored in
a DB2 System table somewhere or is there some other way to access the
info from memory? Maybe there is a nifty way to extract it from
SNAPSHOT without outputting to a file and parsing it. I have looked
at getting the same info from AIX but it would also require gathering
the size from a "ps" file or the like....and that is after I match the
application id to a PID.

I am looking for a "low cost" way of doing this as I do not want to
tax the system in any way to get the data. Any advise would be
helpful.

Thanks in advanced!
Jun 27 '08 #1
2 2991
Lew
Since a db2 agent is just a process in v8 you can use the ps aux
command, SZ and RSS columns, to estimate the process size. If you
have root authority you can use svmon for detailed memory usage.

Lew
Jun 27 '08 #2
On Jun 19, 8:46*am, Lew <seth...@yahoo.comwrote:
Since a db2 agent is just a process in v8 you can use the ps aux
command, SZ and RSS columns, to estimate the process size. *If you
have root authority you can use svmon for detailed memory usage.

Lew
Thanks for the response Lew. Ive looked at this and became more
puzzed at how the sizes co-relate to each other.

ps aux:

USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME
COMMAND
abcuser 274342 0.0 0.0 4140 2556 - A 15:05:18 0:02
db2agent (LOCALUSER)

SZ - size of the core image of the process in 1KB units
4,140,000
RSS - real memory size of the process in 1KB units
2,556,000

db2mtrk:
Memory for agent 274342

Application Control Heap is of size 32768 bytes
Application Heap is of size 1654784 bytes
Total: 1687552 bytes
The SZ and RSS sizes just dont seem to match the memory size according
to DB2. Also, after comparing many that have the same Application
Heap size on various machines they dont seem to have the same SZ or
RSS as I would expect. For instance, machine A and B both had db2
agents with "Application Heap" size of 1.7M bytes but the "PS" SIZE
said 4500 on one machine and 8400 on the other (I am rounding the
numbers up).
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul | last post by:
Hi, I'm using TikiWiki and was using its file upload feature, trying to upload a 2MB file. I get this error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate...
50
by: Joerg Schwerdtfeger | last post by:
Hi folks, how can I determine the total main-memory size and the size of free memory available in bytes? I tried to use mallinfo() from malloc.h - resulting some strange values in Windows...
0
by: Lei Jiang | last post by:
I have a program that cost a lot of memory. During the load of the program, more and more memory is being allocated. I'd like to know if I specify a large initial memory size for the application,...
1
by: Jon Finch | last post by:
Hi All this is a follow up to a post I did a few days back regarding reading a font from an assembly into a memory font object. The only thing I am stuck on is getting the actual memory size of a...
3
by: Dave Smithz | last post by:
Hi there, I changed one of my MySQL search queries to allow a situation where the user gets much more information returned. However, it has now given me the error message: Fatal error: Allowed...
5
by: Phil Jones | last post by:
Is there a way to determine the size (number of bytes) of an object? I figure this can be done by serializing the object to disk and measuring the file size - but I definately don't want to do...
3
by: f.amann | last post by:
hi there! i save images in a mysql db and i wrote a script called getimage.php to display them. in my getimage.php i want to resize my images to display them as thumbnails but there always...
3
by: ningjun.wang | last post by:
I set outputcache to 30 minutes for all .aspx pages on my asp.net 2.0 websites. If a search engine (such as Google) crawl my site, it can hit thousands of pages within a few minutes and thus...
0
by: JRSofty | last post by:
I'm trying to build an app that allows me to track the memory usage of a process over time and save the data to a file. The problem is that when using any of the memory size members of the Process...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.