What clock source is my kernel using?

This is a discussion on What clock source is my kernel using? within the Hardware forums, part of the Help category; 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 ...

Go Back   FixUnix - Unix Linux Forum > Unix > Linux > Help > Hardware

FixUnix.com - Unix Linux Forums

Unix Content Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-25-2007, 05:18 PM
Default What clock source is my kernel using?

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.

Reply With Quote
  #2  
Old 10-26-2007, 03:29 PM
Default Re: What clock source is my kernel using?

gngjeg@gmail.com wrote:
> 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.
>


Using kernel 2.6.23:

ls /sys/devices/system/clocksource/clocksource0/
available_clocksource current_clocksource

cat /sys/devices/system/clocksource/clocksource0/*
acpi_pm pit jiffies tsc
acpi_pm

Jerry
Reply With Quote
Reply

Thread Tools


All times are GMT -5. The time now is 08:12 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger