Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 168666

Summary: sys-process/time: Monitoring memory usage does not work
Product: Gentoo Linux Reporter: Christian Schlotter <again>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christian Schlotter 2007-02-28 00:23:24 UTC
Hi!

GNU Time has the advantage of being able to monitor more than just execution times.  However, if I try to monitor the maximum memory used by some program, it always shows that as zero.

Example:
$ /usr/bin/time --format="maxmem %MkB" thunderbird
No running windows found
maxmem 0kB

Best regards
Christian
Comment 1 SpanKY gentoo-dev 2007-02-28 14:57:33 UTC
prob best if you try reporting to these guys:
http://directory.fsf.org/time.html
Comment 2 Christian Schlotter 2007-02-28 15:41:14 UTC
OK, I took a look at the code and -- most importantly -- at the getrusage manpage:
"Not all fields are meaningful under Linux.  In linux 2.4 only the fields  ru_utime, ru_stime, ru_minflt, and ru_majflt are maintained.  Since Linux 2.6, ru_nvcsw and ru_nivcsw are also maintained"

%M would require the ru_maxrss field to be maintained.  Resolving this bug as invalid.