Lineshell.io : Stop wasting time by managing servers the old way

Hi guys, Today is a big day, and you will understand why I was so quiet during the last months! I've just released my new website I've been working on, https://www.lineshell.io which is basically a powerful SSH web platform for sysadmins and devops. Yes, I care about you guys ;) I will not describe everything here, I let you check the home page, and you will quickly understand how many time you can save using this tool in your daily job, if you manage a lot of servers. As always, I will answer every question in the comments, so don't hesitate to ask anything about the tool and I will be pleased to answer. I really hope to see you there! Cheers ! ...

Convert MySQL database from MyISAM to InnoDB

In MySQL, you have a command to convert a table from MyISAM engine to InnoDB engine. ALTER TABLE table_name ENGINE = InnoDB; However, this command needs to be done for EVERY table, so here’s a way to do it by scripting if you want to do the entire database :) 1) Backup your database 2) Create the script (change DATABASE_NAME by yours): mysql -p -e "show tables in <DATABASE_NAME>;" | tail --lines=+2 | xargs -i echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql 3) Check the file alter_table.sql to see if it looks correct 4) Run the script: mysql --database=<DATABASE_NAME> -p < alter_table.sql 5) Verify: mysql> show table status; ...

How to stress-test a CPU on a Linux server

In some cases, you may want to voluntarily stress-test the CPU of a Linux server to see what happens (monitoring stuff for example). Method First, create a file on your hard drive with the following command: dd if=/dev/urandom of=testfile count=20 bs=1024k Next, create a shell script with a md5sum loop as below, and named it "stress_cpu": #!/bin/sh i=0 while [ 1 ] do md5sum testfile i=`expr $i + 1` echo "Iteration: $i" done Make the script executable : chmod +x stress_cpu Then, you just need to execute it and your CPU load will increase instantly. ./stress_cpu Ctrl-C will end it, as always. ...

How to use Google Drive to monitor your websites

I know some people don't like Google as a company, but they actually create some really good stuff (if you ignore Google Hangout which is terrible...). A lot of people know Google Drive (former Google Docs) to share and work on documents, but this platform can be used for a lot of other very interesting purposes. What you will build Your Google Spreadsheet will be automatically refreshed every 5 minutes with the results of your monitoring script, displaying response code of the page, response time, content of the page, and so on... If one of your website is down, an email will be sent to you. When it will be back online, an other email will tell you the good news. How to do it 1) First, create a new Spreadsheet on your Google Drive account (yes, screen is in ...