inside the mind of a linux admin

don’t let it go bad, go nice.

So you’ve got a process that is taking forever to complete, and is killing your server. Make it play nice. What is nice? You can run a program with modified scheduling priority using nice command (19 = least favorable): # nice -n19 /path/to/your/script.sh This will execute the script.sh with the lowest priority, meaning the system […]

Read More

Moving Array and Virtual Disks from One System to Another

This article applies only to PERC 2/SC, 2/DC, 3/SC, 3/DCL, 3/DC, 3/QC, 4/SC, 4/DC, 4e/DC, 4/Di, and CERC ATA100/4ch controllers, and specifically for Dell PowerEdge servers. Be VERY careful when making any modifications to any disk array, as data loss is always possible. After some planning and preparation, it is possible to migrate array and […]

Read More

dstat: a powerful system administration tool

As a system administrator, I’m always looking for new tools to make my job easier. I’ve been using ‘dstat’ now for about 3 months, and it’s something I don’t know how I lived so long without. This tool is quite versatile and informative, and interacts directly with the kernel to give you a nice colorful […]

Read More

Finding & Deleting Linux Core Dump Files Safely

Linux sometimes dumps a huge file when a script crashes. These core files can build up and eat away valuable disk space. Some other methods of deleting core files will damage your server. Here are a few simple commands I use to find and delete these core dump files safely. Deleting files on Linux can […]

Read More

Perl module install Out of memory and core dumps

Encountered this gem when I was attempting to install an overly simple/normal perl module (HTML::Template, though all will fail as a result of this). This actually has nothing to do with cPanel, the kernel, or CPAN. Instead, you’re actually hitting a PAM ulimit that is exhausting all of the available reserved memory required to install […]

Read More

RAID: Rebuilding a Foreign disk by hand

While replacing a bad drive with a drive that used to be part of another RAID array configuration, the RAID refused to automatically rebuild, thinking that I might want to import the configuration from this disk (or that there’s data on there that I might need). Simply inserting the drive doesn’t make the controller rebuild […]

Read More

process accounting

An excellent program for monitoring users and applications is psacct. This program will work in the background of your system recording what all users are doing on your system as well as the resources that are being consumed. I use it daily for resource abuse tracking, statistics generation, CPU usage trending, process identification and more. […]

Read More

How to disable SSH host key checking

Remote login using the SSH protocol is a common activity in my line of work. With the SSH protocol, the responsibility is on the SSH client to verify the identity of the host to which it is connecting. The host identify is established by its SSH host key. Typically, the host key is auto-created during […]

Read More

Change a processes’ priority with renice

You can change the default priority that an application runs with by starting it with the nice command, but if you want to change the priority of a process that is already running, the command to use is renice. Renice can be used to change the priority of a single process, or of all the […]

Read More

Out of memory error on horde

This one’s here because I spent the better half of an hour troubleshooting this for a customer. The error: Fatal error: Out of memory (allocated 47448064) (tried to allocate 13472326 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 821 The cause: Sending messages through Webmail with attachments larger than 10MB. Incorrect diagnosis: If you’ve stumbled upon this post […]

Read More