Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Linux

What Ubuntu package contains the file I'm trying to install?

linuxJul 15, 2009 1 min read

I've really like how yum has the "whatprovides" keyword. You can execute And yum will search all of the known packages within the installed repositories and return back the package you need to install in order to have the "startkde" binary. At that point, all thats needed is a But how do we do this on Ubuntu and other Linuxes which have apt-get and aptitude? I found that this same functionality can be searched using the "apt-files" package…

$ read more →

Viewing the contents of an initrd image

linuxJul 14, 2009 1 min

I was doing some research tonight, and needed to look inside my initrd image to see if a couple of device drivers were present. Initrd images are stored as compressed cpio archives, which allows a pipeline like the following to be used to extract the contents of an image: Once extracted, you can use cd and cat to view the files and directories that are part of the image:

$ read more →

Using kdump to get core files on Fedora and CentOS hosts

linuxJul 6, 2009 3 min

One of things I love about Solaris is its ability to generate a core file when a system panics. The core files are an invaluable resource for figuring out what caused a host to panic, and are often the first thing OS vendor support organizations will request when you open a support case. Linux provides the kdump, diskdump and netdump tools to collect core file when a systems panics, and although not quite as seamless as their Solaris counterpart, they work relatively well. I'm not a huge fan of diskdump and netdump, since they have special pre-requisites (i.e., operational networking, supported storage controller, etc.) that need to be met to ensure a core file is captured…

$ read more →

Creating sparse files on Linux hosts with dd

linuxJul 5, 2009 1 min

Sparse files have become pretty common in the virtualization arena, since they allow you to present a large chunks of disk space to guests without having to reserve the space in an actual backing store. This has a couple of benefits: Most guests use a fraction of the disk space allocated to them, so sparsely allocating files cuts down on the amount of disk space required to host them Additional storage can be added over time to support growth (disk storage keeps getting cheaper, so this can actually lead to a reduction in operational costs) Backing up the guests requires less tape / disk space (this assumes your backup solution supports sparse files) To create a sparse file on a Linux host, you can run dd with a count size of zero (this tells dd not to write any data to the file), and then use the seek option to extend the file to the desired size: Once the sparse fie is created, you can use dd to verify how much space is allocated to it: Sparse files are extremely handy, though it's important to know when and when not to use them.

$ read more →

Adjusting how often the Linux kernel checks for MCEs

linuxJul 3, 2009 1 min

I wrote about Linux mcelog utility a few weeks back, and described how it can be used to monitor the /dev/mcelog device for machine check exception (MCEs). By default, the Linux kernel will check for MCEs every five minutes. The polling interval is defined in the sysfs check_interval entry, which you can view with cat: To configure the host to use a shorter check interval, you can echo the desired value to the sysfs entry for processor 0: If you want to get additional information on check_interval, check out the machinecheck text file in the kernel documentation directory. If you are curious how the code actually detects a MCE, you can look through the source code in /arch/x86/kernel/cpu/mcheck.

$ read more →