Some of time's documented memory tracking features don't appear to work: pde@luminance:~$ /usr/bin/time -f "%M mem, %K avg, %F/%R pfs" vim /debian/Contents-i386.gz 0 mem, 0 avg, 1039/23403 pfs Is this possibly kernel-related? The relevant data structure is in /usr/include/linux/resource.h, which indicates that some parts of struct rusage don't exist yet (in which case, should these flags be taken out of the man page?)
This explains the problem: http://www.uwsg.iu.edu/hypermail/linux/kernel/0207.1/1022.html Perhaps Debian's time should implement that LD_PRELOAD hack, and warn users through the manpage that it's not reliable?
Patches are welcome -- time has been orphaned upstream for years, I'm afraid. Dirk
Hi, I'm Debian's maintainer for GNU time, and received the following bug report. As time has been de facto without an upstream maintainer for years, I am taking the liberty of forwarding the report to this list in the hope that either someone may come forward to work on this, or better still, someone already is and he may tell me :). A little bit on an ensuing email exchange between Peter and myself is in the Debian bug archive at the address http://bugs.debian.org/186448 Regards, Dirk----- Forwarded message from Peter Eckersley <pde@cs.mu.oz.au> ----- Envelope-to: edd@edd.debian.net Delivery-date: Thu, 27 Mar 2003 00:38:58 -0600 Subject: Bug#186448: time: time's memory usage tracking is broken Reply-To: Peter Eckersley <pde@cs.mu.oz.au>, 186448@bugs.debian.org From: Peter Eckersley <pde@cs.mu.oz.au> To: submit@bugs.debian.org Package: time Version: 1.7-15 Severity: normal Some of time's documented memory tracking features don't appear to work: pde@luminance:~$ /usr/bin/time -f "%M mem, %K avg, %F/%R pfs" vim /debian/Contents-i386.gz 0 mem, 0 avg, 1039/23403 pfs Is this possibly kernel-related? The relevant data structure is in /usr/include/linux/resource.h, which indicates that some parts of struct rusage don't exist yet (in which case, should these flags be taken out of the man page?)----- End forwarded message -----
retitle 186448 time's %D %K %X %p %t formats are inoperative tag 186448 + upstream thanks Peter Eckersley wrote: Since the original reporting of this bug the ru_maxrss has been added to the Linux kernel. In the current program it is being reporting correctly. Therefore I think it is no longer accurate to say that memory tracking is still broken. Certainly %M works now whereas before it did not. However the %D %K %X %p %t formats and possibly others are still inoperative. These are not provided by the Linux kernel at this time. The right place to add them is in the kernel. It is really an upstream issue. In this case upstream is the Linux kernel not the GNU time upstream. But they are still documented in the time package. I am therefore setting the bug title to reflect the current status. Bob
Besides "186448 time's %D %K %X %p %t formats are inoperative" you can add; -v, --verbose -o file, --output=file -V, --Version --quiet None of these work on Debian Testing (Trixie) time command line app. Plus, the manpage on Trixie, does match the manpage at: https://man7.org/linux/man-pages/man1/time.1.html