Pierre-O's Blog

My personnal blog about IT stuff

My Knife Was Slow, So I Sharped It!

Today, I finally decided to take care of my knife.. knife help was taking 30seconds..

I use zsh, with the beautiful agnoster style! Here is my zsh file.

This is how I improved the speed of knife

After reading that thread, I decided to give it a try :

1. Clean your knife plugin
gem list | grep knife-
gem uninstall knife-unused_plugin
2. Clean your gem env
#At your own risk, I add to reinstall some gem, but it was a lot faster afterward!
gem clean

\o/, it’s a lot better (3s), but still not satisfied… If you have some hints? On top of that, my terminal was taking some seconds to load.. Annoyed…

Make faster the terminal loading

rbenv was taking a bit of time, I tried this

3. change the rbenv way of loading
#in zsh config file
eval "$(rbenv init - --no-rehash)"

I still had this anoying message “you have new mails”, actually, I noticed, that I had an used crontab throwing errors there. And a mail per day since some month…

4. clean mails
cat /dev/null > /var/mail/pierreozoux
#remove the unused crontab
crontab -e

Great, my terminal is loading really fast again, I will be able to relax now :)

As always, feel free to comment/insult/troll!

chef, devops, knife, on the fly, rbenv, speed, zsh

« How to build your own CA? Contribution to Packer »