Bug 709684
Summary: | procps/top SWAP statistics makes no sense | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jan Görig <jgorig> | ||||
Component: | procps | Assignee: | Jaromír Cápík <jcapik> | ||||
Status: | CLOSED ERRATA | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 6.2 | CC: | albert, aros, jgorig, masanari_iida, ovasik, rvokal, wmealing | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | procps-3.2.8-18.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause
- per-process swap values was computed in procps incorrectly
Consequence
- per-process swap values in top make no sense
Fix
- swap values are now taken from /proc provided by kernel
Result
- per-process swap values in top are correct
|
Story Points: | --- | ||||
Clone Of: | 532668 | Environment: | |||||
Last Closed: | 2011-12-06 09:57:33 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: | 532668 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Jan Görig
2011-06-01 11:44:50 UTC
Created attachment 502228 [details]
proposed patch
Patch on comment #1 works for me. top - 00:26:06 up 1 day, 10:30, 7 users, load average: 0.06, 0.01, 0.00 Tasks: 158 total, 1 running, 157 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.7%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 758620k total, 653400k used, 105220k free, 48356k buffers Swap: 2064376k total, 2620k used, 2061756k free, 236620k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND 490 root 16 -4 11384 856 392 S 0.0 0.1 0:00.19 580 udevd 9694 root 18 -2 11380 716 240 S 0.0 0.1 0:00.01 564 udevd 9693 root 18 -2 11380 724 240 S 0.0 0.1 0:00.00 556 udevd [root@rhel6 ~]# cat /proc/490/status |grep VmSwap VmSwap: 580 kB [root@rhel6 ~]# cat /proc/9694/status |grep VmSwap VmSwap: 564 kB [root@rhel6 ~]# cat /proc/9693/status |grep VmSwap VmSwap: 556 kB Thank you! Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause - per-process swap values was computed in procps incorrectly Consequence - per-process swap values in top make no sense Fix - swap values are now taken from /proc provided by kernel Result - per-process swap values in top are correct One minor request about man page.
Current man page of top(1),
> p: SWAP -- Swapped size (kb)
- The swapped out portion of a task's total virtual memory image.
+ Per-process swap values are now taken from /proc/#/status VmSwap field.
Dumb post mistake, i just realised that other kernel structures may be swapped out. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1554.html |