Sorry for the delay. I finally had time to put them together, using the new 3.0.5 (I was running a pre-release 3.0.5 before). This is a very ugly hack, but I haven't found a better way to do it in the 3.0 series. Here is a brief description of the patches:
For metrics.c, divide the various memory totals by 1024. For graph.php, 'trick' the graphs into using the 'correct' units, since we are now off by 1024. I don't remember why I needed to use 1048576 for the graph, but that is what worked. I'm sure there is a better way to do this, and I welcome any comments. On 9/11/07, Jim Rowan <[EMAIL PROTECTED]> wrote: > Hi, > > Yes -- If you don't mind, please send me your changes. Thanks! > > > Chris Slaughter wrote: > > >The problem is that memory is currently stored as an uint32, so it overflows > >at a little over 4TB. Since it is hardcoded, 32- vs. 64-bit doesn't make a > >difference. > > > >I took a look at the code at one point, but it wasn't as simple as changing > >it to a uint64, so I took the route of 'fudging' all of the memory values. > >I ended up dividing the values by 1024, and then adding a hack in the graph > >so the values are displayed as T instead of M... > > > >If you are interested, I can grab my changes on Monday when I am in the > >office. > > > >Chris Slaughter > > > > > >On 9/7/07, Bernard Li <[EMAIL PROTECTED]> wrote: > > > > > >>Hi Jim: > >> > >>On 9/7/07, Jim Rowan <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >>>We have a cluster with more than 4T of memory. Ganglia (3.0.4) won't > >>>show that on the graphs, although if you visit the physical view it > >>>seems to have the correct number. If you restart all the gmonds, the > >>>summary memory graph looks like a sawtooth; ramping up to 4T and > >>>dropping suddenly to zero as it wraps around, and ramps up again. > >>> > >>>Where is the problem likely to be? > >>> > >>> > >>This bug has already been filed: > >> > >>http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=128 > >> > >>But no solutions yet... > >> > >>Cheers, > >> > >>Bernard > >> > >>------------------------------------------------------------------------- > >>This SF.net email is sponsored by: Microsoft > >>Defy all challenges. Microsoft(R) Visual Studio 2005. > >>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >>_______________________________________________ > >>Ganglia-general mailing list > >>[email protected] > >>https://lists.sourceforge.net/lists/listinfo/ganglia-general > >> > >> > >> > > > >------------------------------------------------------------------------- > >This SF.net email is sponsored by: Microsoft > >Defy all challenges. Microsoft(R) Visual Studio 2005. > >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >_______________________________________________ > >Ganglia-general mailing list > >[email protected] > >https://lists.sourceforge.net/lists/listinfo/ganglia-general > > > > > >
patch.graph.php
Description: application/php
--- libmetrics/linux/metrics.c.orig 2007-10-03 00:48:43.000000000 -0400
+++ libmetrics/linux/metrics.c 2007-10-26 09:11:15.000000000 -0400
@@ -638,12 +638,15 @@
mem_total_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
p = strstr( update_file(&proc_meminfo), "MemTotal:");
if(p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
@@ -655,12 +658,15 @@
swap_total_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
p = strstr( update_file(&proc_meminfo), "SwapTotal:" );
if(p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
@@ -1159,12 +1165,15 @@
mem_free_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
p = strstr( update_file(&proc_meminfo), "MemFree:" );
if(p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
@@ -1176,7 +1185,8 @@
mem_shared_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
/*
** Broken since linux-2.5.52 when Memshared was removed !!
@@ -1184,7 +1194,9 @@
p = strstr( update_file(&proc_meminfo), "MemShared:" );
if (p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
@@ -1196,12 +1208,15 @@
mem_buffers_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
p = strstr( update_file(&proc_meminfo), "Buffers:" );
if(p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
@@ -1213,12 +1228,15 @@
mem_cached_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
p = strstr( update_file(&proc_meminfo), "Cached:");
if(p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
@@ -1230,12 +1248,15 @@
swap_free_func ( void )
{
char *p;
- g_val_t val;
+ g_val_t val,val2;
+ /* g_val_t val; */
p = strstr( update_file(&proc_meminfo), "SwapFree:" );
if(p) {
p = skip_token(p);
- val.uint32 = strtol( p, (char **)NULL, 10 );
+ val2.uint32 = strtol( p, (char **)NULL, 10 );
+ val.uint32 = val2.uint32 / 1024;
+ /* val.uint32 = strtol( p, (char **)NULL, 10 ); */
} else {
val.uint32 = 0;
}
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Ganglia-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-general

