Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have to program a realtime application on Linux, but don't know whether the standard installation of Ubuntu has CONFIG_HIGH_RES_TIMERS enabled. How can I check this?

I'm using Ubuntu 11.04 64bit.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Ubuntu ships the kernel configuration in /boot/config-$version (in the same package as the kernel image /boot/vmlinuz-$version). You can check this file on a live system, or you can download it from the Ubuntu website. There are several images to choose from; the default under amd64 is -generic, and you can download the binary package and extract the file /boot/config-*. The simplest way to open a Debian package if you're not running a dpkg-based distribution is to convert it with alien.

By the way, the answer is yes under 10.04/-generic/amd64 which I happened to have available while writing this answer.

Several other distributions ship a /boot/config-* file. Others make the kernel configuration available in /proc/config or something similar, so that it's easy to see on a live system but doesn't appear in the binary package. In that case, if you don't have a live system, you need to check the source package.

share|improve this answer
    
Actually, probably the simplest way to look inside a Debian package and extract a file is to use Midnight Commander. Since a Debian package is just an ar archive, one can also use ar x packagename, which decomposes into control.tar.gz and data.tar.gz. –  Faheem Mitha Jul 4 '11 at 17:51

You probably want to use _SC_TIMERS and clock_getres() etc. instead of wondering how the kernel specifically was configured.

share|improve this answer

Many kernels have a copy of their config files that is exposed through the proc file system:

zcat /proc/config |
    grep CONFIG_HIGH_RES_TIMERS

If not, there is a tool in the kernel source to to extract it from the kernel file itself: (Use your path to the kernel source directory and kernel file to extract from.)

/usr/src/linux/scripts/extract-ikconfig /boot/vmlinuz |
    grep CONFIG_HIGH_RES_TIMERS
share|improve this answer
    
Ubuntu doesn't include a /proc/config patch. Like Debian, it ships config-$version alongside vmlinuz-$version. –  Gilles Jul 4 '11 at 22:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.