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 1127909 - 'w' command aligns the colums incorrectly
Summary: 'w' command aligns the colums incorrectly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: procps-ng
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Rybar
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 1078310
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 19:46 UTC by giulioo
Modified: 2019-03-27 14:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-27 14:53:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
procps-ng-3.3.10-w-from-column-aligment.patch (483 bytes, patch)
2016-01-14 15:06 UTC, Jaromír Cápík
no flags Details | Diff

Description giulioo 2014-08-07 19:46:13 UTC
Description of problem:

Up to RHEL6, if you used the command
	$ w
you would automatically get the "FROM" column in the output.

Starting with RHEL7
	$ w
will omit the "FROM" column.

You think, ok, let me use some explicit cmd line option so that the script I'm using on RHEL5/6 will work the same on RHEL5/6 and 7.

Alas, this is not possible:

on RHEL5/6
	$ w -f
will take out the "FROM" column

on RHEL7
	$ w -f
will add the "FROM" column.

When the w's manual says "-f will TOGGLE" it means it literally :(

So, both "w" and "w -f" produce opposite outputs on RHEL7 with regards to previous RHEL versions.

On rhel6 the spec file had: W_SHOWFROM=-DW_SHOWFROM
On rhel7 it has   --disable-w-from

====
Minor issue, on RHEL7, when using "-f", the column labels get misaligned by 1 char (1 space missing between "FROM" label and "LOGIN@" label).




Version-Release number of selected component (if applicable):
procps-ng-3.3.9-6.el7.x86_64

Comment 2 Jaromír Cápík 2014-08-07 20:30:14 UTC
Hello Giulioo.

The w FROM issue has already been reported internally in scope of Bug 1078310. But the minor issue with column alignment you mentioned is something I never noticed before. Good catch. I'll fix that upstream and then backport/rebase in scope of RHEL7.

Thanks for the report.

Regards,
Jaromir.

Comment 5 Jaromír Cápík 2016-01-14 15:06:30 UTC
Created attachment 1114841 [details]
procps-ng-3.3.10-w-from-column-aligment.patch

Comment 8 Jan Rybar 2017-04-10 14:28:55 UTC
After testing the patch uploaded above I noticed that fixing one space makes another misalignment if user tries another w's option (-s for example).
Because the spaces in headline are mostly hardcoded (!!!) even within upstream version, it is like hit-a-mole game.
The entire headline space computation should be reconsidered to be more dynamic, which may exceed the scope of this BZ.


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