Bug 770729 - configuration in /etc/toprc is not reflecting.
Summary: configuration in /etc/toprc is not reflecting.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tog-pegasus
Version: 6.1
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Vitezslav Crhonek
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-28 16:47 UTC by Pratik Pravin Bandarkar
Modified: 2018-11-14 09:24 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-30 10:16:25 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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