473,804 Members | 3,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_I NFO 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 3027
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 "Applicatio n 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
12370
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 1677706 bytes) in /var/html/www/tiki/lib/filegals/filegallib.php on line 30 Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
50
3003
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 (cygwin, gcc 3.3.1) and always 0 in Linux (2.4.22, gcc 3.3.2). Thanks in advance,
0
1228
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, would its load speed be increased? If so, how can I specify that? Thanks!
1
10674
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 byte array so that I can allocate the memory for the pointer.. Here's the code 'Load the font from the assembly
3
2058
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 memory size of 16777216 bytes exhausted (tried to allocate 42 bytes) in /usr/share/pear/DB/mysql.php on line 290 OK I understand what this means (I assume) that the program is trying to allocate more memory to return my query result but it wont...
5
5136
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 this for performance reasons. I'm hoping there is some Framework class that dishes up the in-memory size of an object. Is there??? Thanks everyone....
3
6710
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 occurs the following error: <b>Fatal error</b>: Allowed memory size of 188743680 bytes exhausted (tried to allocate 240 bytes) in <b>.../public_html/getimage.php</b> on line <b>x</b><br />
3
5626
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 produce a large amount of page caches. This could use a lot of memory and impact other websites running on the same machine. My question is: how can I limit the memory size (e.g. to 100MB) used by the cache? I can set the following in web.config:
0
856
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 class I get only one set of numbers. There is no change in the numbers as I notice on the Task Manager. Am I using the wrong functions to get this to work? I had understood that I needed to use the WorkingSet64 but even the others don't seem to...
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10320
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10073
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.