Jul
30
2010
0

memory utilization information

You can use this kludgey command (support actually gave it to me) to get all sorts of memory information:

# echo vmstat | kbd > vmstat_info.txt

grep for stuff like 4K to see if you have overtaxed your vio server memory.

Written by admin in: Memory |
Apr
01
2010
0
Dec
08
2009
3

Formula for converting memory pages to gigabytes

vmstat in AIX returns memory statistics in 4096 byte blocks. To convert this to gigabytes:

number of blocks / 256 / 1024

Written by admin in: Memory |
Nov
03
2008
0

Process to consume memory for testing

This isn’t very pretty or precise, but it does eat up a ton of memory. Use svmon -P or svmon -S PID to see what is going on:

#include 
#include 

#ifndef BUFSIZE
#define BUFSIZE 20480
#endif

#ifndef NBUFS
#define NBUFS 81920
#endif

int main(void)
{
size_t nbytes = 2147483647;
char *p[9555559];
char *q[9555559];
char *r[9555559];
char *s[9555559];
int x;

if (nbytes == 0)
nbytes = 1;

(void) printf("Allocating %zu bytes\n", nbytes);
(void) fflush(stdout);

for (x = 0 ; x < 9555559 ; x = x + 1 )
{
p[x] = malloc(nbytes);
q[x] = malloc(nbytes);
r[x] = malloc(nbytes);
s[x] = malloc(nbytes);

}

(void) pause();
return (EXIT_SUCCESS);
}

Also, here is an svmon script for all processes:

ps aux | while read A B C
   do
  svmon -P $B | grep $B
   done
Written by admin in: Memory |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes