Hide Forgot
From Bugzilla Helper: User-Agent: Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux) Description of problem: The "btime" line in /proc/stat shows a number that does not match the actuall boot time. Moreover, this number constantly changes. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. uptime 2. grep btime /proc/stat 3. sleep 10 4. grep btime /proc/stat Actual Results: 11:51am up 1 day, 11:33, 11 users, load average: 0.05, 0.05, 0.00 btime 1033721675 btime 1033721683 Expected Results: 11:51am up 1 day, 11:33, 11 users, load average: 0.05, 0.05, 0.00 btime 1033618662 btime 1033618662 Additional info: "btime" is calculated at line 387 in fs/proc/proc_misc.c as xtime.tv_sec - jif / HZ However, jif is initialized at line 317 as unsigned long jif = hz_to_std(jiffies); Changing line 387 to "xtime.tv_sec - jif / 100" will solve the problem.
Another problem is that jif is initialized from jiffies, not jiffies_64, and with HZ=512, will wrap after about three months.
On RedHat 8.0 with stock kernel 2.4.18-14 we are seeing backstepping in /proc/stat as discussed on the linux kernel list in April regarding Kernel: 2.4.18-pre6. (See http://www.uwsg.iu.edu/hypermail/linux/kernel/0204.2/1188.html) When we run this on RedHat 8.0 with kernel 2.4.18-14: while true; do cat /proc/stat; done | grep -F 'cpu ' >/tmp/log we get results like: cpu 382258 291357 160205 18511748 cpu 382258 291357 160205 18511748 cpu 382258 291357 160205 18511748 cpu 382258 291357 160206 18511748 cpu 382258 291357 160206 18511748 <<< cpu 382258 291357 160206 18511749 <<< cpu 382259 291357 160206 18511748 <<< cpu 382259 291357 160207 18511747 <<< cpu 382259 291357 160207 18511748 <<< cpu 382259 291357 160207 18511748 cpu 382259 291357 160207 18511749 cpu 382260 291357 160207 18511748 cpu 382260 291357 160208 18511748 This problem does not occur on RedHat 7.3 with kernel 2.4.18-10 or 2.4.18-5.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2002-206.html