[torqueusers] Inaccurate memory report in pbsnodes

Cristina Ururahy ururahy at tecgraf.puc-rio.br
Tue Mar 8 07:19:36 MST 2005


Hi there,

I don't mean to be a nag, but I would like to know your opinion about changing 
the line 
> (ulong)(mm->mem_total + mm->swap_total) >> 10

to

> (ulong)((mm->mem_total >> 10) + (mm->swap_total >> 10))

in src/resmom/linux/mom_mach.c
static char *totmem( struct rm_attribute *attrib) {
...
}

It doesn't seem to be a coincidence that 6G won't fit in 4 bytes and that 
6419780K - 2^32 = 2225476K
which is the answer I get...

>From pbsnodes I get
totmem=2225476kb,
availmem=4070016kb,
physmem=2323256kb

Does it make any sense?

Thanks,
Cristina




More information about the torqueusers mailing list