Bug 466157
| Summary: | kernel doesn't supply memory fields in getrusage, /usr/bin/time anything shows "... (0avgtext+0avgdata 0maxresident)k ..." | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Frank Ch. Eigler <fche> |
| Component: | kernel | Assignee: | Cong Wang <amwang> |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat Kernel QE team <kernel-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.4 | CC: | cww, eguan, jpirko, mgoulish, pbenas, qcai, rkhan, tao |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-01-13 20:43:53 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 502912, 600363 | ||
|
Description
Frank Ch. Eigler
2008-10-08 19:05:16 UTC
I think you find what was already found
man time says:
BUGS
Not all resources are measured by all versions of Unix, so some of the values might be reported as zero. The present selection was mostly inspired
by the data provided by 4.2 or 4.3BSD.
I think, in this state, it is well documented, not looking like a bug.
This is a kernel issue, possibly being addressed upstream: http://lkml.indiana.edu/hypermail/linux/kernel/0812.3/01695.html I suggest reassigning this to the kernel component once this patch or a descendant is upstream. This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?". Closely related: getrusage() does not fill in resident-set-size related fields. This leaves a process with no way to get an immediate snapshot of its own mem usage without reading /proc. Jiri, you posted a patch for this some days ago: http://lkml.org/lkml/2009/1/15/290 How is it going? It is not merged into upstream. Woud like to continue to work on that? Or let me do? Thanks! The patch was accepted after some modifications: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1f10206cf8e945220f7220a809d8bfc15c21f9a5 (In reply to comment #6) > The patch was accepted after some modifications: > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1f10206cf8e945220f7220a809d8bfc15c21f9a5 Ah, I saw that one. What I meant above is the other part, i.e. for 'ru_ixrss' etc. I checked the latest upstream, it doesn't have your patch for that. Now I am trying another appoach to implement that, will send it to upstream after it is done, with you Cc'ed. Thanks. This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. in kernel-2.6.18-200.el5 You can download this test kernel from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed. On patched kernel the memory-related values are not all zeros [root@dell-pet310-02 466157-getrusage]# uname -a Linux dell-pet310-02.lab.bos.redhat.com 2.6.18-230.el5 #1 SMP Thu Oct 28 17:09:10 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux [root@dell-pet310-02 466157-getrusage]# /usr/bin/time ls child child.c getrusage getrusage.c 0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 3440maxresident)k 0inputs+0outputs (0major+255minor)pagefaults 0swaps [root@dell-pet310-02 466157-getrusage]# Also tested using cases described at http://lkml.org/lkml/2008/12/30/79 , result is good. It's nice to see the maxresident number, though still zero avgtext/avgdata. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0017.html |