Archive
Posts in Linux
Riemann and the case of the unhappy system call
This past weekend I spent a good deal of time playing with riemann. Riemann is a powerful stream processor and I'm hoping to use it to correlated and analyze metrics from disparate data sources. After downloading and installing it I received the following error: Not exactly what I was exepecting on our first date but I guess riemann plays hard to get. :) To make a little more sense out of this error I fired up strace to retrieve the ERRNO value and to see which system call was failing: Now that hits the spot…
$ read more →Configuring yum to keep more than three kernels
When you run 'yum update' on your Fedora system, the default yum configuration will keep the last 3 kernels. This allows you to fail back to a previous working kernel if you encounter an error or a bug. The number of kernels to keep is controlled by the installonly_limit option, which is thoroughly described in the yum.conf(8) manual page: blog blog-posts blog-posts.orig cleanup drafts prefetch.net installonly_limit Number of packages listed in installonlypkgs to keep installed at the same time. Setting to 0 disables this feature…
$ read more →Purging the yum header and package cache
Most of the Linux distributions that utilize the yum package manager cache headers and packages by default. These files are cached in the directory identified by the cachedir option, which defaults to /var/cache/yum on all of the hosts I checked. On my Fedora 16 desktop this directory has grown to 167MB in size: You can clean out the cached directory with the yum "clean" option: If disk space is an issue on your systems, you can also set the "keepcache" option to 0. This will remove cached files after they are installed, as noted in yum.conf(8)the manual page: keepcache Either 0'…
$ read more →Sudo insults -- what a fun feature!
I think humor plays a big role in life, especially the life of a SysAdmin. This weekend I was cleaning up some sudoers files and came across a reference to the "insult" option in the documentation. Here is what the manual says: "insults If set, sudo will insult users when they enter an incorrect password. This flag is off by default." This of course peaked my curiosity, and the description in the online documentation got me wondering what kind of insults sudo would spit out…
$ read more →Summarizing system call activity on Linux systems
Linux has a guadzillion debugging utilities available. One of my favorite tools for debugging problems is strace, which allows you to observe the system calls a process is making in realtime. Strace also has a "-c" option to summarize system call activity: The output contains the percentage of time spent in each system call, the total time in seconds, the microseconds per call, the total number of calls, a count of the number of errors and the type of system call that was made. This output has numerous uses, and is a great way to observe how a process is interacting with the kernel…
$ read more →