Archive
Posts in Linux
Creating yum repositories on CentOS and Fedora Linux hosts
I have written about the yum package manager in the past, and it's one of the main reasons I use CentOS and Fedora Linux. Various 3rd party yum repositories are also available, allowing you to gain access to numerous packages that aren't available in the stock distributions. This is great, but sometimes you want to create your own packages and distribute them to your clients. This is a piece of cake with yum, since you can create your own yum repositories…
$ read more →Greping through binary data with zgrep and gzcat
I periodically need to look for a given string in one or more compressed log files. Taking the time (and resources) to decompress each file on the file system takes time, especially when I don't plan to leave the file uncompressed. When these situations arise, I turn to my good friends gzcat and zgrep. The zgrep utility allows you to look for a pattern in one or more compressed files…
$ read more →Package not found support in Fedora 12
I've been a long time reader of arstechnica, and really dig their technology reviews. I just came across their Ars takes a first look under the hood of Fedora 12 article, and was stoked when I read the following: "PackageKit, the package management framework, has also received some intriguing enhancements in Fedora 12. A new customization for the bash shell will detect when the user attempts to run a command from a package that is not installed and will offer to automatically install the package. This is not fully integrated yet, but users who want to test it can install the Packagekit-command-not-found package." I am rather stoked that the Fedora developers decided to implement this…
$ read more →How the Linux OOM killer works
Most admins have probably experienced failures due to applications leaking memory, or worse yet consuming all of the virtual memory (physical memory + swap) on a host. The Linux kernel has an interesting way of dealing with memory exhaustion, and it comes in the way of the Linux OOM killer. When invoked, the OOM killer will begin terminating processes in order to free up enough memory to keep the system operational. I was curious how the OOM worked, so I decided to spend some time reading through the linux/mm/oom_kill.c Linux kernel source code file to see what the OOM killer does…
$ read more →Scanning SCSI controllers for new LUNs on Centos and Fedora Linux hosts
While building out a new ESX guest, I had to scan for a new SCSI device I added. To scan a SCSI controller for new LUNs, you can echo the "- - -" string to the SCSI controller's scan sysfs node: Now you may be asking yourself, what do those three dashes mean? Well, here is the answer from the Linux 2.6.31 kernel source (I had to look this up to recall): As you can see above, the three values passed to the scan value are the channel, id and lun number you want to scan. The "-" equates to a wild card, which causes all of the channels, ids and luns to be scanned…
$ read more →