The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cpu, memory and virtual memory usage ocelot UNIX for Dummies Questions & Answers 4 12-01-2008 07:57 AM
How can I get memory usage or anything that show memory used from sar file? panithat HP-UX 1 03-31-2008 12:26 PM
CPU usage and memory usage mansoorulhaq High Level Programming 1 08-09-2007 04:55 PM
nmon vs topas pascalbout AIX 0 09-13-2006 03:42 AM
Monitor CPU usage and Memory Usage Gajanad Bihani High Level Programming 2 03-09-2005 07:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 10-07-2003
Lazzar Lazzar is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 32
Memory usage statistic? (topas, nmon)

hi,
how can i diplay:
- the ammount RAM used /free
- ammount of ram used from a pid or prozess

we have the problem, that malloc is returing a NULL pointer errno = 12 ( not enough space).

but i think there is still ram free.

nmon : shows all memory used ?
Memory Use Physical Virtual Paging pages/sec In Out VM parameters
% Used 99.8% 0.1% to Paging Space 0.0 0.0 numperm 75.3%
% Free 0.2% 99.9% to File System 1.0 494.8 minperm 5.0%
MB Used 12265.7MB 9.8MB Page Scans 0.0 maxperm 8.0%
MB Free 22.2MB 19382.2MB Page Cycles 0.0 minfree 256
Total(MB) 12288.0MB 19392.0MB Page Reclaim 0.0 maxfree 512

Topas: show still free ram ?
MEMORY
Real,MB 12287
% Comp 25.0
% Noncomp 75.8
% Client 0.5

PAGING SPACE
Size,MB 19392
% Used 0.5
% Free 99.4

are there any other tools to check memory usage?

general Question:
does an Application reserv its own part of the RAM?
any links to sites who explain that topic would be greatly appreciated also

our System is AIX v4

Lazzar
  #2 (permalink)  
Old 10-07-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
I don't know AIX and I don't have access to an AIX box. But maybe I can help get you pointed in the right direction. You are clearly having a problem with virtual memory, not physical memory. Stuff like how much unused ram you have is not relevant.

Most likely you are bumping into the max size of a data segment. You might try "/usr/bin/ulimit -a" to see if that command exists and if it displays a limit called "data" or something like that. I don't know how to increase this on AIX.
  #3 (permalink)  
Old 10-07-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
And please don't crosspost...I just deleted the extra thread.
  #4 (permalink)  
Old 10-07-2003
Lazzar Lazzar is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 32
time(seconds) unlimited
file(blocks) 2097151
data(kbytes) 131072
stack(kbytes) 32768
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) 2000

if i malloc something, i guess it goes into the 'data' segement?

so a process can max. allocate 131 MB ?

Lazzar

Edit: sorry about crossposting, but i saw the the other AIX forum had a lot less users
  #5 (permalink)  
Old 10-07-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Yeah, malloc() tries to grow the data segment, and yes, you are currently limited to 131K.

And your stack is limited 32K bytes. There is also a text segment. However the sum of these, data+stack+text must be less than 32K if the "memory" line means what I think it means.

AIX must work differently than what I'm used to. Or maybe not...do a "man getrlimit". The stack stuff will be under RLIMIT_DATA and memory might be RLIMIT_AS.

Also try /usr/bin/ulimit -Ha to see if they are your hard limits too.
  #6 (permalink)  
Old 10-08-2003
Lazzar Lazzar is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 32
ulimit -Ha :
time(seconds) unlimited
file(blocks) 2097151
data(kbytes) unlimited
stack(kbytes) unlimited
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) unlimited


Quote:
However the sum of these, data+stack+text must be less than 32K if the "memory" line means what I think it means
that can't be cause data is greater than memory.

but anyway i do a bit more research and try to understand that stuff a little better

the root of our problem is that we have a memory leak, and raising those limits won't help anyway i guess

but thanks a lot for your input.

Lazzar
  #7 (permalink)  
Old 10-08-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Quote:
that can't be cause data is greater than memory.
Actually, it can be. It's simply dumb, but not impossible. The kernel will check both limits as you attempt to increase the data segment size. You're guaranteed to bump into the memory limit first is all.

And look at your hard limits....they are unlimited. Your program can call getrlimit() to obtain the hard and soft limits. And it can call setrlimit() to raise the soft limit up to the hard limit.

As I said before, I don't know AIX and I could be wrong about some or all of this. But it would only take a few seconds to toss a setrlimit() into the program to see if I'm right.

But you're right about the memory leak, the best policy is to find it and fix it.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0