Archive
Posts from 2012
Locating WWPNs on Linux servers
I do a lot of storage-related work, and often times need to grab WWPNs to zone hosts and to mask storage. To gather the WWPNs I would often times use the following script on my RHEL and CentOS servers: This produced consolidated output similar to: While doing some research I came across sysfsutils, which contains the incredibly useful systool utility. This nifty little tool allows you to query sysfs values, and can be used to display all of the sysfs attributes for your FC adapters: This output is extremely useful for storage administrators, and provides everything you need in a nice consolidated form. +1 for systool!
$ 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 Solaris hosts
I previously described how to use strace to to summarize system call activity on Linux hosts. Solaris provides similar data with the truss "-c" option: The output contains the total elapsed time, a breakdown of user and system time, the number of errors that occurred, the number of times each system call was invoked and the total accrued time for each system call. This has numerous uses, and allows you to easily see how a process is intereacting with the kernel. Sweet!
$ read more →