Hide Forgot
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.
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.