Posts tagged with ‘ubuntu’

 

Ubuntu Netbook remix is planned to remove OpenOffice.org and replace it with Google Docs. It’s an odd choice and it probably is some Google influence. Probably Google paid them or something.

According to the latest Ubuntu Netbook Remix Blueprint, the Ubuntu community have decided to drop OpenOffice from the default installation of Ubuntu Netbook Edition for the upcoming Lucid Lynx release, atleast for now. Now documents will be opened by default in Google Docs.

The developers have been removing applications that are irrelevant on a netbook. While document editing is clearly a not irrelevant on a netbook, the developers feel that with netbooks being used mostly for internet related works, Google Docs will suffice. (Source: Digitizor)

Honestly I hardly use OpenOffice in my netbook. The screen estate made it unsuitable for editing. If you still want OpenOffice.org, you can always download manually of course but I suspect most would probably stick with Google Docs.

 

After installing Ubuntu Server, you can be in dismay when you are greeted with a command prompt. It’s the 21st century and let’s not act tough that the terminal in the coolest thing. It really isn’t unless you want to show it off to your pals. (On an absolutely unrelated note: Don’t bother flexing your terminal skills to girls, they get impressed with your nerd culture and your coolness drop to -10.)

Okay let’s install some graphical user interface for humans alright. If you want to install GNOME in Ubuntu Server or the Cloud Enterprise Server, you can. And here is how to do it:

sudo apt-get install –no-install-recommends ubuntu-desktop

The no-install-recommends command begins with 2 dashes but WordPress gets hungry and ate one of them so be sure to correct that when typing.

If you leave out the “no-install-recommends” option, Ubuntu installs software such as OpenOffice.org. They’re basically things I don’t want in a server. This is useful when you want a user interface but do not want things like games etc.. All these programs makes Ubuntu feel “unclean” for me. My preferred method of installing Ubuntu is always to use the Server edition and then install the GNOME interface with the above code.

 

There are times where some processes use too much resources. You can use “ps aux” to get a list of all the processes that are currently running. But what about having them sorted? Here is one way. This works in Ubuntu Linux.

Top 10 % CPU usage

ps aux|sort -nr -k3|grep -v USER|head -10

Top 10 % Memory usage

ps aux|sort -nr -k4|grep -v USER|head -10

The following is the sample output for Top 10 % memory usage:

briecheese ~: ps aux|sort -nr -k4|grep -v USER|head -10
www-data  3883  2.9 14.1 107052 37176 ?        S    11:44   1:46 /usr/bin/php-cgi
www-data  3882  2.9 13.8 107664 36264 ?        S    11:44   1:46 /usr/bin/php-cgi
www-data  3881  1.2 13.2 106768 34688 ?        S    11:44   0:44 /usr/bin/php-cgi
www-data  3884  3.1 13.1 107244 34592 ?        S    11:44   1:54 /usr/bin/php-cgi
www-data  3879  1.1 11.8 106888 31160 ?        S    11:44   0:40 /usr/bin/php-cgi
www-data  3880  0.9  9.5  94232 25092 ?        S    11:44   0:34 /usr/bin/php-cgi
mysql     3659  3.5  6.9 277256 18200 ?        Sl   09:45   6:25 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
root      4103  0.2  1.0  53468  2704 ?        Ss   12:44   0:00 sshd: me [priv]
me    4106  0.0  0.8  18128  2116 pts/0    Ss   12:44   0:00 -bash
www-data  3875  0.0  0.7  57440  1972 ?        S    11:44   0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

Percentage memory usage is the 4th column. This is useful when you need a quick overview of what’s consuming the most memory. [Thanks U-Zyn]

 

There are generally 2 ways of repairing MySQL tables using the command line. First is to use “mysqlcheck“, the other is to use “myisamchk” (only for MyISAM). This is more for my own information.

This has been tested on Ubuntu 9.10 with MySQL 5

mysqlcheck

This is how you can check if your database tables are fine:

mysqlcheck -uUsername -pSecret –all-databases

Change “Username” to your username and “Secret” to your password.

To repair them, use:

mysqlcheck -uUsername -pSecret –all-databases –auto-repair

This requires of your MySQL daemon to be running. If it isn’t running use this to start:

sudo /etc/init.d/mysql start

myisamchk

If you have trouble running ‘mysqlcheck’, you can consider using ‘myisamchk’ instead if your tables are MyISAM. This command can be performed without MySQL daemon running. This fixes the data in your file system directly and this has saved me once.

sudo myisamchk –max-record-length=1048576 -o -f /var/lib/mysql/db_name/table_name.MYI

Change “db_name” to your database name and “table_name” to the name of the table you wish to repair.

 
Nov 11

My disk got full

I just realized I totally used up my disk space in my slice:

briecheese ~: sudo /etc/init.d/mysql start
[sudo] password for me:
 * /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!

It has never occurred to me that this would happen. I start to do some clearing up and delete some backups that I no longer need.

briecheese ~/www: df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.4G  6.7G  2.3G  75% /
varrun                129M   40K  129M   1% /var/run
varlock               129M     0  129M   0% /var/lock
udev                  129M   16K  129M   1% /dev
devshm                129M     0  129M   0% /dev/shm
overflow              1.0M     0  1.0M   0% /tmp

I managed to free more than 2 Gb.

 

I can resist no more and upgraded my Ubuntu 9.04 Jaunty Jackalope to Ubuntu 9.10 Karmic Koala Release Candidate.

To do the same, press Alt + F2 to open up the Run Application window and type in “upgrade-manager -d” without quotation.

 

This is a personal note. This lets you check Ubuntu’s version number. Run the command ‘cat /etc/lsb-release’.

tkw@deathnode:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
tkw@deathnode:~$

My blog has pretty much become a scrap book.

To find Red Hat or CentOS linux version number use:

tkw@redhat:~$ cat /etc/redhat-release
CentOS release 4.8 (Final)

jer added that this is a better alternative:

lsb_release -a

Thanks!

 

WordPress powered and Django inspired.
Love and elephants come after.
RSS: Posts and comments.