You can use this kludgey command (support actually gave it to me) to get all sorts of memory information:
# echo vmstat | kdb > vmstat_info.txt
grep for stuff like 4K to see if you have overtaxed your vio server memory.
You can use this kludgey command (support actually gave it to me) to get all sorts of memory information:
# echo vmstat | kdb > vmstat_info.txt
grep for stuff like 4K to see if you have overtaxed your vio server memory.
vmstat in AIX returns memory statistics in 4096 byte blocks. To convert this to gigabytes:
number of blocks / 256 / 1024
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