Subject: | pctmem problem on AIX |
I use Proc-ProcessTable-0.38 on several platforms, but have found a problem during testing on AIX.
The problem relates to the size of the Sysmem variable as declared in aix.h. My AIX test environment has 8GB of main memory, and Sysmem ends up being 0 from overflow. This results in the Perl pctmem entry being null for all processes. I was (I think) properly able to modify a couple things and 'make test' now reports a reasonable pctmem value instead of null.
My diffs are below for aix.h and aix.c. (These should also be attached as separate files).
----------aix.h diff--------------
4a5
Show quoted text
> #include <stdlib.h>
71c72
< static long Sysmem;
---
Show quoted text> static unsigned long long Sysmem;
---------end aix.h diff----------
----------aix.c diff--------------
26c26
< Sysmem = atol(obj->value);
---
Show quoted text> Sysmem = strtoull(obj->value, 0, 10);
---------end aix.c diff----------
If you can use this patch, great. If there's something wrong with this and you'd prefer not to put it in, I would be happy to make further modifications that might be incorporated if you have any suggestions.
Additional info:
Proc::ProcessTable version: 0.38
perl -v:
This is perl, v5.6.1 built for aix
uname -a:
AIX mahe 1 5 000372FA4C00
Thanks.
Dan Brown