RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 840747 - vmstat always reports zero for 'si' and 'so' columns if your units are set to MiB (-SM)
Summary: vmstat always reports zero for 'si' and 'so' columns if your units are set to...
Keywords:
Status: CLOSED DUPLICATE of bug 851664
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: procps
Version: 6.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Rybar
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-17 07:08 UTC by Mike Hamrick
Modified: 2016-10-31 13:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-31 13:49:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Working vmstat.c patch against procps-3.2.8-23.el6.src.rpm (1.67 KB, application/octet-stream)
2012-07-17 07:08 UTC, Mike Hamrick
no flags Details

Description Mike Hamrick 2012-07-17 07:08:19 UTC
Created attachment 598570 [details]
Working vmstat.c patch against procps-3.2.8-23.el6.src.rpm

Description of problem:

The vmstat 'si' and 'so' columns are always zero if you run vmstat with -SM.

Version-Release number of selected component (if applicable):

procps-3.2.8-23.el6.x86_64

Steps to Reproduce:
1. vmstat -SM 1
2. cause swapping activity in another window
3. flip back to vmstat window, observe 'swpd' incrementing but not 'si' and 'so'.
  
Actual results:

The 'swpd' column changes, but 'si' and 'so' always remain zero.

Expected results:

I'd expect to see the 'si' and 'so' columns change with the 'swpd' column.

Additional info:

unitConvert is incorrectly being applied to kb_per_page and not *pswpin * kb_per_page.  The problem is kb_per_page is a small number, maybe 4.  You convert that to MiB and you're always going to get an integer zero, which causes the whole calculation to be zero.  The right thing to do is convert *psppwin * kb_per_page to MiB.

Comment 2 Jaromír Cápík 2012-07-31 14:16:03 UTC
Hello Mike.

I recently fixed exactly the same issue in RHEL5. My patch is almost identical to yours (I just additionally changed the unitConvert input type to long). Anyway, that confirms the solution is reasonable and should work correctly.
Thanks for reporting.

Best regards,
Jaromir.

Comment 3 RHEL Program Management 2012-09-07 05:12:10 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 7 Jan Rybar 2016-10-31 13:49:15 UTC
Already fixed in 3.2.8-24
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=851664

*** This bug has been marked as a duplicate of bug 851664 ***


Note You need to log in before you can comment on or make changes to this bug.