Month: March 2013

Time to Clean Up: Out of Space for New Kernels

This past update, I started getting a new error.  My /boot mount was full.  The problem was that I had 6 or 7 previous kernels still in the mount taking up space.

Boot Mount Full Message

I was able to fix it with a command written by Linerd.  He did a very nice job explaining it, so I would recommend that you follow through and read his post.

To make a long story short, I first ran the trial command:

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get --dry-run remove

Then, I ran the full command (without the –dry-run):

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge

Now, I am good to go!  Thanks Linerd.


Too Many Inodes

I recently switched to Host Gator, and they have policy about the number of inodes.  I just noticed that my account moved to “Not Backed Up” just recently.  So, I thought I would blog a few of the things I learned while exploring…

Determining the Number of Inodes in a Directory

I found this command would do the trick:

find . -printf "%i\n" | sort -u | wc -l

One of the advantages of Host Gator is that they provide SSH access.  I was able to login quickly and run the command in the different directories.  If you have a host that doesn’t offer SSH access, may I suggest PHP Shell?

Git Repositories

I had a rough guess that my git repositories might be part of the culprit.  If it’s based on the number of files, I guessed that git uses a bunch to track changes.  So, I did a little tinkering.

Sure enough, most of the inodes in my project are in the .git directory:

$ find . -printf "%i\n" | sort -u | wc -l
$ find .git -printf "%i\n" | sort -u | wc -l

I found a few options to try.  First, I tried the fsck command, but that didn’t seem to make a difference in the inodes:

$ git fsck --full
Checking object directories: 100% (256/256), done.
dangling commit 9e18c6e42e3f62127776bdd2f52608f904991e08
$ find .git -printf "%i\n" | sort -u | wc -l

Next, I tried the gc command, and that seemed to make all the difference in the world:

# git gc --prune=today --aggressive
Counting objects: 912, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (900/900), done.
Writing objects: 100% (912/912), done.
Total 912 (delta 525), reused 0 (delta 0)
$ find .git -printf "%i\n" | sort -u | wc -l

The repack didn’t do much:

# git repack
Nothing new to pack.
$ find .git -printf "%i\n" | sort -u | wc -l

WordPress Cache

My next culprit is the WordPress Cache.  For example, on one of my blogs, the cache accounts for 76% of the inode count.

$ find . -printf "%i\n" | sort -u | wc -l
$ find wp-content/cache/ -printf "%i\n" | sort -u | wc -l

Well, that is another task for another day.  This is where I will start though.  If you have any ideas, please comment.


Great Link: CDN for Angular, Bootstrap, etc.

I was looking for a CDN to use with Bootstrap and Angular, and I found a great resource. ended up doing the trick.  I also learned that you can discover many great Javascript libraries and projects by going through the offerings of different CDNs.  So, with that being said, here is a list of the CDNs that  I discovered:

Just to give you an idea of what I ended up with, here’s part of the <head> of my project.  I used the head javascript library for most of the javascript:

	<link href="//" rel="stylesheet">
	<link href="//" rel="stylesheet">
	<script src="//"></script>
	<link type="text/css" href="css/devtools.css" rel="stylesheet" />	
			function() {
				/* My initialization ... */

If you know of a CDN that I missed, please comment below!


Google Voice Voicemail Rings

I have really enjoyed using the Google Voice option for voicemail on my cell phone.  The cool part is that it sends me an email with the voicemail message.  The message is attached in sound form and it also makes an attempt to do voice recognition.  The one disadvantage is that it rings way too many times.  Some people give up on leaving a message because it rings so many times.  Well, thanks to Evan Wondrasek, I found a fix!

Here’s the original article:

Techorator: How to Prevent Extra Rings using Google Voice as Voicemail

Read More