fixunix
Tags Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

What clock source is my kernel using? - Hardware

This is a discussion on What clock source is my kernel using? - Hardware ; 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 ...


Fix Unix > Linux > Help > Hardware > What clock source is my kernel using?

Reply
 
LinkBack Tools
  #1  
Old 10-25-2007, 10:18 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
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, 08:29 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
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

Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
[PATCH] arch/x86/kernel/quirks.c, kernel 2.6.24.3, hpet clock enable on nVidia nForce 430 unix Kernel 1 03-21-2008 09:50 AM
[RFC PATCH 15/22 -v2] initialize the clock source to jiffies clock. unix Kernel 0 01-09-2008 11:40 PM
[PATCH] [16/20] x86: Allow TSC clock source on AMD Fam10h and some cleanup unix Kernel 0 01-03-2008 01:00 AM
[patch 03/26] x86: fix TSC clock source calibration error unix Kernel 0 11-19-2007 06:30 PM
[PATCH] i386: fix TSC clock source calibration error unix Kernel 8 10-22-2007 11:50 AM


All times are GMT. The time now is 09:36 AM.