I would like to apoligize if this question is being posted to the
wrong group.
I would like to know what is the most bullet-proof way to determine
what clock source is the Linux kernel using. Normally, I dod this
making use of "dmesg" as the text below shows.
[joseg
@dev03 proc]$ dmesg | grep time.c
time.c: Using 3.579545 MHz PM timer.
time.c: Detected 2599.956 MHz processor.
time.c: Using PM based timekeeping.
[joseg
@dev03 proc]$
[joseg
@prod03 ~]$ dmesg | grep time.c
time.c: Using 1.193182 MHz PIT timer.
time.c: Detected 2599.994 MHz processor.
time.c: Using PIT/TSC based timekeeping.
[joseg
@prod03 ~]$
The issue with relying on "dmesg" is that eventually, the message
buffer might get over written on very busy servers or servers that
have been up for a very long time.
There is another way that I can use to check for the source, and that
is by looking at "/proc/cmdline" as the text shows below.
[joseg
@prod03 ~]$ cat /proc/cmdline
ro root=LABEL=/ rhgb quiet nohpet nopmtimer console=tty0
[joseg
@prod03 ~]
However, not all systems will have the clock source clearly defined on
the kernel boot options under your /boot/grub/menu.lst file. The text
below shows a systems which do not specify which clock source the
kernel is supposed to pick.
[joseg
@dev03 ~]$ cat /proc/cmdline
ro root=LABEL=/ rhgb quiet console=tty0
[joseg
@dev03 ~]$
There is some heuristics built into the kernel (time.c) which will
pick one of the available time or clock sources based on what it is
available to the system at boot time and what is enabled/disabled in
the BIOS.
So, is there a way that will help someone that might not have access
to boot time messages or access to a boot.log to make an accurate
determination as to which clock source a particular system is running?
Thanks in advance.