Alex (SirShurf) Frenkel's Blog

A web log of a PHP professional

Posts Tagged ‘Ubuntu

Ubuntu 11.10 (Oneiric Ocelot) and MySQL Workbench gpl, fix plus deb repository

with 3 comments

Since the install of Ubuntu 11.10 (Oneiric Ocelot) my MySQL Workbench was mostly unusable. I could not open it normally and Query Browser was not accessible. Finally a few days ago a patch was summited to the MySQL forum, but it was for a self compile version only.

Today I found a debian repository that maintains MySQL Workbench gpl and the fix is already implemented there. In order to update it use next commands:

sudo add-apt-repository ppa:olivier-berten/misc
sudo apt-get update
sudo apt-get install mysql-workbench-gpl

Now we have a debian repository for MySQL Workbench and a version that will work on Ubuntu 11.10 (Oneiric Ocelot)

Advertisements

Written by Alex (Shurf) Frenkel

November 7, 2011 at 9:46 am

Ubuntu Server Topping CPU on Amazon Micro instance.

with one comment

I have got a micro instance on Amazon. For some reason ones in a while it’s CPU is topping up and the only thing I can do about it at that moment is Hard Reboot.

I have been trying to catch that sucker for the past half a year, set up Nagios to monitor when it is failing but no avail.

On the same server I have got a Magento Store (Nes Jewellery) and I noticed that ones Baide spider was on the server it was running slow. I fixed the spider problem but have left an open terminal with TOP working on it and forgot about it.
Yesterday I am getting a notification from Nagios that my instance is down. I have checked my terminal and the TOP was stuck on the last information he got and the top CPU killer was “update-apt-xapi”. This is a partial string from “update-apt-xapian-index” a part of the “apt-xapian-index” package.

What it turned out, Ubuntu (starting from version 10.04 and up to 11.04 at least) has an error in the cron script for apt update. But on a single CPU with limited memory that was critical!

The fix for this is really simple (and it’s stated that it’s included in 11.10). You need to edit 2 cron files (dont forget to have root permissions for that)
First is /etc/cron.weekly/apt-xapian-index
# Rebuild the index
if [ -x $CMD ]
then
if [ -x $IONICE ]
then
nice -n 19 $IONICE -c 3 $CMD --update --quiet
else
nice -n 19 $CMD --update --quiet
fi
fi

The second file is /etc/cron.daily/apt
if [ -x /usr/sbin/update-apt-xapian-index ]; then
nice -n 19 ionice -c3 update-apt-xapian-index --update -q
fi

Now all is left is to see that there is no more calls like that.

Written by Alex (Shurf) Frenkel

October 23, 2011 at 6:00 pm

Posted in Magento, Ubuntu

Tagged with , , ,

SVN (Subversion) and UTF files…

leave a comment »

Recently I had a strange problem.

One of my SVN hooks was failing and I had to login to the server to run the hook manually. At first I have thought that it’s a simple permission error but when I was running the same hook using the same user it was working.

After some googleing I have found that the SVN hook runs not in the user environment but without it, and in order to simulate it I need to run my hook in the same way.

The command to do it is: “env – ./post-commit”.

In this case I have seen the error and understood it. Since the SVN hook is not runs under the environment, the UTF-8 characters in file names are not visible in SVN Update.

If you have this problem all you need to do is to add next lines to your hook:


export LANG=en_US.UTF-8
export LANGUAGE=en_US:en
export LC_CTYPE="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_PAPER="en_US.UTF-8"
export LC_NAME="en_US.UTF-8"
export LC_ADDRESS="en_US.UTF-8"
export LC_TELEPHONE="en_US.UTF-8"
export LC_MEASUREMENT="en_US.UTF-8"
export LC_IDENTIFICATION="en_US.UTF-8"
export LC_ALL=

That will set your environment for the SVN hook request to work with UTF characters!

Written by Alex (Shurf) Frenkel

May 19, 2011 at 5:26 pm

Posted in IDE, SVN

Tagged with , , ,

How to Add Folder Locations to the “Places” Menu on Ubuntu

with one comment

I was googling lots to understand how to add custom folder locations to the “Places” menu in my Ubuntu.

What I have found finally is that you simple need to open the location in the file manager (The file manager is named Nautilus) and drag the folder to the left side menu!

Simple as that.

Written by Alex (Shurf) Frenkel

February 3, 2011 at 10:39 pm

Posted in Uncategorized

Tagged with ,