Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 770729

Summary: configuration in /etc/toprc is not reflecting.
Product: Red Hat Enterprise Linux 6 Reporter: Pratik Pravin Bandarkar <pbandark>
Component: tog-pegasusAssignee: Vitezslav Crhonek <vcrhonek>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-30 10:16:25 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:

Description Pratik Pravin Bandarkar 2011-12-28 16:47:55 UTC
Description of problem:

The configuration in /etc/toprc (global configuration file)file is not reflecting the chages in output of top command. It is working for individual user.  i.e. if we modify top as per our requirement and the press "shit+w" then it wll save the current configuration in respective users home directory.  As per man page of top the entries in /etc/toprc are as:
-------->o--------->o---------
 The  system  configuration  file  is not created by top.  Rather, you create this
       file manually and place it in the /etc directory.  Its name must be  ’toprc’  and
       must have no leading ’.’ (period).  It must have only two lines.

       Here is an example of the contents of /etc/toprc:
          s         # line 1: ’secure’ mode switch
          5.0       # line 2: ’delay’  interval in seconds
-----------o<----------o<------

But, in top command still getting delay of 3 seconds.  I checked strace output  and  it seems that "top" command is checking the "/etc/toprc" file:
------
[...]
 open("/etc/toprc", O_RDONLY)            = 3
[...]
-----

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


How reproducible:
yes
Steps to Reproduce:
1. Create /etc/toprc file
2. mention entries as bellow:(as per man page of top)
---
s
5.0
---
3. check ouput of top command.  
Actual results:
in top command output interval is 3 sec.

Expected results:
Top command should consider /etc/toprc file.

Additional info:

I observed this issue with RHEL5.6 as well.

Comment 2 Pratik Pravin Bandarkar 2011-12-30 10:16:25 UTC
Internal comment:
-----
After discussing the issue with senior engineer I found that, it is not a bug. If we create /etc/toprc file then we have to check with normal user. It works for normal user. But it is not the case with root user. for root user the chages did not get applied. which is default behavior. As this is not a bug, its default behavior I am closing this bz.