Friday, December 18, 2015

Free VPS

I launched free VPS service not so long ago. The current node is using OpenVZ for virtualization, but I am working on setting up OpenNebula as a control panel for KVM based nodes. Current node specs:

1 vCPU core
128MB RAM
64MB vSwap
Unmetered bandwidth (100Mbps shared port)
IPv4 NAT (up to 20 port forwarded)
IPv6 on request

If you are interested, click here - Free VPS

As always, feel free to post comments about the service here.

Wednesday, August 15, 2012

Gentoo Portage SquashFS + zsync

If you are Gentoo user and you're wondering about how to reduce portage tree disk usage and makes emerge --sync faster, this article is for you.

Lets talk about key problems of portage tree:
  • Large disk usage because of uncompressed text data
  • Heavy inode usage because of huge amount of files
The above problems result in excessive disk I/O during emerge operations. The most popular solution is to squash the portage tree. It is well-described in this article. But I've made an easier script that can handle all the headache for you. I hope you like it! :)

Wednesday, March 24, 2010

Mysql Unknown Variable character-set-server

If you've recently upgraded to MySQL 5.1.45, you might experience a problem running mysql client. The error message says:

/usr/bin/mysql: unknown variable 'character-set-server=utf8'

The reason is that mysql client no longer supports character-set-server parameter. Actually I don't know why, the official ChangeLog doesn't
include any explanations. The solution is to disable character-set-server option
inside /etc/mysql/my.cnf

[mysql]
character-sets-dir=/usr/share/mysql/charsets
#character-set-server=utf8

Wednesday, January 27, 2010

Vim Terminal Commands

There is a possibility to run terminal commands inside Vim. Just type:

:! command [Hit Enter]

Also you can invoke a shell inside Vim:

:! bash [Hit Enter]

Also Vim has third party addons (vim-shell) that allow to use shell in more natural manner. But I would not recommend you to use Vim this way. There is much better way to achieve the same things - just use screen. It allows you to split your terminal vertically by pressing Ctrl-A S. Then you can use Ctrl-A Tab or Ctrl-A Ctrl-I to switch between them.

Monday, November 23, 2009

Xorg events repeated twice

I've recently upgraded to xorg-x11 1.6 (it is shipped with several up-to-date Linux distributions like OpenSuSe 11.2) and encountered a problem with my keyboard. All keypresses repeated twice, which made impossible to use xorg-server. After looking through /var/log/Xorg.0.log I found that somehow Xserver decided to add my keyboard twice. So all events from the keyboard were processed two times. I fixed this problem by adding this line to xorg.conf into Section "ServerFlags" block
Option "AutoAddDevices" "off"

Monday, November 2, 2009

Alsa Audio Meter

If you need to watch the realtime sound output level on some graphical meter, you might consider difficult to find the program for these needs. After some searching I found nice software called ameter especially for these functions. This program can be used with the most of ALSA and OSS apps.
After program installation you should create .asoundrc in your home directory with the following contents:

pcm_scope.ameter {

type ameter

}

pcm_scope_type.ameter {

lib /usr/local/lib/libameter.so

}

pcm.ameter {

type meter

slave.pcm 'hw:0,0' #can be hw or hw:0,1 etc...

scopes.0 ameter

}

pcm.dsp0 ameter


The program source can be downloaded from here

Also I have created an ebuild for easy installation on Gentoo Linux. Simply add it to your local overlay

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

DESCRIPTION="Alsa meter plugin for audio software with GUI"
HOMEPAGE="http://laugeo.free.fr/ameter.html"
SRC_URI="http://laugeo.free.fr/ameter-0.44.tar.gz"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND="media-libs/alsa-lib
media-libs/libsdl
media-libs/sdl-image
sys-devel/automake:1.7"
RDEPEND="${DEPEND}"

RESTRICT="mirror"

src_install() {
make DESTDIR="${D}" install || die "make install failed"
}

Thursday, October 15, 2009

Run hddtemp as user

If you want to get temperature of your hard drive, you can simply run

# hddtemp /dev/sda

This method has one disadvantage - hddtemp must be executed as root, otherwise you will get

/dev/sda: open: Permission denied

But there is a quick solution to run hddtemp as a normal user. Most Linux distributions have hddtemp daemon. After you run it you should be able to use just telnet or netcat as a normal use to get your hard drive temperature:

~ telnet localhost 7634