Blog

MySQL: checking replication with mk-table-checksum

On 26.09.2011, in mysql, by Oleksii Tykhonov
0

Here is a simple way to check if your database on master and slave server have the same data. We will use mk-table-checksum from maatkit tools for this purpose. Note! Never do it on the production server! Or use it on your own risk! As stated: mk-table-checksum executes queries that cause the MySQL server to [...]

Read more

Using RRD with Python: short introduction

On 22.09.2011, in python, supportex.net-blog, by Oleksii Tykhonov
0

RRDtool is a great facility which aims to replace MRTG and was written by Tobias Oetiker. RRDtool provides powerful features for collecting and visualizing various system metrics like network traffic, MySQL counters or whatever you want. It’s always good idea to know what is going on under the hood of your server. Managing servers we [...]

Read more

Fixing ‘Missing dependency Cache::Cache at /usr/share/munin/plugins/mysql_’ error

On 21.09.2011, in supportex.net-blog, by Oleksii Tykhonov
0

While installing MySQL plugins for munin in Fedora 15 you may encounter this problem: [root@monitor plugins]# /usr/share/munin/plugins/mysql_ suggest Missing dependency Cache::Cache at /usr/share/munin/plugins/mysql_ line 716. [root@monitor plugins]# It means that your system lacks perl-Cache-Cache and perl-IPC-ShareLite packages. After installation you can proceed: yum install perl-Cache-Cache perl-IPC-ShareLite [root@monitor plugins]# /usr/share/munin/plugins/mysql_ suggest bin_relay_log commands connections files_tables innodb_bpool [...]

Read more

Getting list of available for update packages in Fedora and Debian

On 21.09.2011, in supportex.net-blog, by Oleksii Tykhonov
0

If you need to get list of available packages for update in Fedora you can use next command: yum clean all && yum check-update And the same for Debian: apt-get clean all && apt-get -qqs dist-upgrade -qq options stand for quite output and -s stands for simulation with no action. Didn’t find the answer to [...]

Read more

Adding SSH keys for password-less login with non standard SSH port

On 21.09.2011, in supportex.net-blog, by Oleksii Tykhonov
0

As you may know you can login to your SSH server with use of DSA/RSA keys without entering password. The simplest way to add key to the remote server is ssh-copy-id script. Here is an example of how you can add key if you use non standard SSH port: ssh-copy-id -i /home/myuser/.ssh/id_dsa.pub “myuser@example.com -p 2222″ [...]

Read more

Cleaning ‘Failed actions’ message in Pacemaker/Corosync cluster setup

On 20.09.2011, in supportex.net-blog, by Oleksii Tykhonov
0

Sometimes when using Pacemaker/Corosync-based cluster you can see warning message in crm_mon output: Failed actions: drbd_mysql:0_promote_0 (node=node2.cluster.org, call=11, rc=-2, status=Timed Out): unknown exec error  To clean it up you can use command crm_resource which checks health of resources: [root@node1 ~]# crm_resource -P Waiting for 1 replies from the CRMd. OK [root@node1 ~]# To check [...]

Read more

Automatic GeoIP database update

On 16.09.2011, in supportex.net-blog, by Oleksii Tykhonov
0

Free binary GeoLite Country database is being  updated every month. To update it automatically you can  put this script to cron at the beginning of a month. [root@playground ~]# sh -x /usr/local/sbin/geoip-update.sh + cd /usr/share/GeoIP + wget -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz + gzip -d -f GeoIP.dat.gz [root@playground ~]# That’s it. Didn’t find the answer to your question? [...]

Read more

RPM: building proctitle for PHP

On 30.08.2011, in supportex.net-blog, by Oleksii Tykhonov
0

Sometimes it’s convenient to change PHP script name, it allows to check if it’s running by typing just pstree. You can perform that with use of proctitle. Unfortunately there is no rpm for this package for Fedora 15. So to use it you need to build it. Firstly you need to download source package to [...]

Read more

RPM: how to build Redis library package for PHP

On 25.08.2011, in supportex.net-blog, by Oleksii Tykhonov
2

At Supportex we use Redis a lot. It’s extremely fast and doesn’t consume a lot of resources.  Besides it’s easy to use for developers (especially for those who worked with Memcache). Unlike Python which has only one mature client, PHP has various of them.  For instance, Predis, phpredis,  Rediska, etc. We prefer phpredis. It’s written [...]

Read more

Bash: check if a zip or a rar file has password-protection

On 22.08.2011, in supportex.net-blog, by Oleksii Tykhonov
0

If you need to check if zip or rar file has password protection you can do it this way. For zip fip: And for rar: Didn’t find the answer to your question? Ask it our administrators to reply we will publish on website.

Read more