Author Archives: Curu Wong

Some notes on MySQL replication configuration

server version MySQL supports replication from one major version to the next higher major version, but not the reverse. That’s to say, version of slave should newer than or equal to that of master. Also, do not use 3 different … Continue reading

Posted in Database, System Administration | Leave a comment

Trace command call chain on Linux

A tool to trace command call history with chained output Continue reading

Posted in Perl, System Administration | Tagged , | Leave a comment

Open application in other language in Gnome

Due to the bad(or even ugly compared to Windows 7) look and feel of Chinese character in my Gnome desktop, I set my default language to English, then everything looks better. However, I want some special application to show up … Continue reading

Posted in Linux Desktop | Tagged , | Leave a comment

peek the source – Another troubleshooting method for open source software

Today I read a security article on the nginx fastcgi PATH_INFO (Chinese version on 80sec). I currently maintain several sites with nginx+php-fpm, so I decide to do some test and see if my configuration is in danger. However, when I … Continue reading

Posted in Security, Web | Tagged , , , , | Leave a comment

A journey to troubleshooting by sersync exclude bug

For the last half year, one of our file distributing syststem goes out of sync occasionally, which bothered me a lot. The simplified system workflow looks like this:

Posted in Programming, System Administration | Tagged , , , , | Leave a comment

extract databases or tables from mysqldump

I wrote a simple fast and flexible perl script called xmysqldump.pl to extract databases/tables from mysqldump sql file, you may download it from here. Usage: ./xmysqldump.pl -h|–help This page ./xmysqldump.pl -l|–list [file.sql …] List databases and tables ./xmysqldump.pl -a|–all-tables [file.sql … Continue reading

Posted in Perl, Programming, System Administration | Tagged , , , | 5 Comments

Setup Linux as wifi hotspot with NetworkManager

First of all, note that if your wireless card does not support master/hostap mode, you can only use ad-hoc mode, which allows only one device to connect. Secondly, NetworkManager only support WEP for ad-hoc mode, so don’t select other Security … Continue reading

Posted in Linux Desktop | Tagged , , , , | 5 Comments

why squid listen on high udp port number

When starting squid with the default configuration (compiled from source), you may notice that the squid process listens not only on TCP port 3128, but also a high UDP port. netstat -tlunp | grep squid tcp 0 0 :::3128 :::* … Continue reading

Posted in System Administration | Tagged , , | Leave a comment

Linux系统编程知识在运维排错中的应用

1.    谁偷了我的磁盘空间? 发现大小为10G的/home分区磁盘空间使用了9.8G,但是通过du得到的大小却是5G. 另外的4.8G空间哪里去了呢? df -Th /home Filesystem    Type    Size  Used Avail Use% Mounted on /dev/sda3      ext3     10G   9.8G  0.2G  98% /home du -hs /home 5.0G    /home/ du和df都不太可能出错,文件系统也没有损坏的迹象,那问题出在哪儿呢?查看unlink系统调用的手册页:

Posted in Programming, System Administration | Tagged , , | Leave a comment

Bash quote trap: why rsync exclude pattern not work

A friend wanted to sync all his files to a remote host, exluding the source files(those with suffix .c, .cpp, .h, .hpp). First I wrote this script #!/bin/bash ####sync.sh (version 1): sync files to remote host### SYNC_DST=’xxx@example.com::sample_project’ SYNC_OPT=’ –exclude=”*.[ch]” –exclude=”*.[ch]pp” … Continue reading

Posted in Bash, Programming, System Administration | Tagged , , , | 2 Comments