Aug 302013
 

As I mentioned – I’m migrating my sysadm tasks from Perl to Python, and Windows is just one of them.

This is a real case, I like VirtualBox as a neat visualization container, and spending lot of time on using it, actually there are always 2~3 VMs running on my laptop while another 4~5 lying on HDD. However, I have different requirements for different types of VMs, like for Windows VM, I used to launch them in GUI mode so that I can use another Windows environment, but for Linux and other *nix machines I used to launch them in headless mode and use putty (another neat tool 🙂 ) to access. Continue reading »

Aug 282013
 

Just leave a note here since I cannot recall this from time to time …

  1. git branch new_branch
  2. git checkout new_branch
  3. git push origin new_branch
  4. (git commit, git push, …)
  5. git checkout master
  6. git merge new_branch
  7. git push

Actually it’s pretty straightforward, but I just cannot memorize … especially step #3, sigh …

Aug 282013
 

Per history, this had been there for several months, seems nagiosgraph’s rrd data updated  sometime, and it seems this related to upgrade.

I never paid too much attention on this as nobody else, except me, watching those performance data graphs. However, today I do need to solve this as it’s always bothering that you cannot get data whenever you do need it.

Long story short – and stupid me, obvious a while back whenever I applied my patch to nagios.cfg, I didn’t comment out the first process_performance_data=0, and obviously second process_performance_data=1 didn’t overwrite the first one. Also, even with process_performance_data=0 which disable performance data processing, nagios still processes performance data every time it got restarted, and this cause all mysterious problems.

I do believe nagios behaves wrong in this case – it’s a common sense that configuration can be overwritten by later one with same key, and if configuration tells you don’t do something, DON’T do it even in edge cases, otherwise people will get confused and made debugging really difficult.

Aug 222013
 

I’m working on a set of data refreshment scripts, which get data from file, do some transform, then send to a HTTP interface. Since the HTTP interface is kind of slow compare with reading and transforming data, I have several forked children processes to handle HTTP part.

Everything was done by Perl about 6 months ago, and everything seems good … until I started picking up Python. First sight is that Pyhon program is about 50% of Perl in term of LOC, which makes it easier to read, but seriously I don’t care about this too much as the logic is quite simple, however, when I tested Python programs and found that they are at least 50% faster than Perl’s, I felt nervous.

Two examples – Perl takes 13 seconds, Python takes 5, Perl takes 34 minutes, Python takes 10. Actually I’m really nervous at this moment thinking of my poor Python skills, I always worry if I made anything wrong with the translation (from Perl to Python), even I have verified result data for quite some times.

Will dig in after converting all scripts to Python.

Aug 082013
 

It was just for fun, and this would be a good exercise for potential migrating my AT&T phone to some other images – I need hotspot feature but it’s a premium feature from AT&T …

Back to Kindle Fire, the process was pretty simple – root it, flash with new root image and gapp, that’s it. However, after that it seems some Apps are not that stable, crash or slow respond from time to time, though some other Apps run smoothly. I’m not sure so far if it is problem from Apps (i.e. compatibility issue with Jelly Bean), or it is Jelly Bean I was using is having problem with Kindle Fire (incompatible or poor hardware). I will play with them for a while and post here if I see anything interesting.

Aug 052013
 

Working on glusterfs test environment as mentioned here, so far everything’s working with some headache.

  1. have 4 nodes up and running and join into same pool, make all extra disks (sdb, sdc, sdd) XFS (fdisk then mkfs, so sdb mentioned below is actually sdb1)
  2. create distributed-replicated volume gfs_v0 with gfs11:sdb+gfs12:sdb and gfs11:sdc+gfs12:sdc
  3. mount gfs on all these 4 boxes (I don’t have dedicated client hosts …)
  4. copied 16 450M~500M tgz files to gfs_v0, everything looked fine
  5. Continue reading »

Aug 022013
 

I think I’m going to play with Perl, PHP, and Python at almost the same time for some time, and thinking of the fact that dynamic graph is one of the most important feature for web pages, I think I need to find a cross-language solution.

I’m happy with PHPlot and decide not to touch GD::Graph, and I came across GDChart which seems to be good in cross-platform/cross-language area. I will give it a try and will post the result here.

Aug 022013
 

Here’s my plan.

I have 4 servers named them as gfs[11-14], each machine has 4 disks, with sda allocated for root, swap, etc, and sdb-sdd as data in XFS.

I’m going to run distributed-replicated volume with replication 2, and I want to keep highest availability, as much as I can. So the layout will be something like this: Continue reading »

Aug 022013
 

I could not see ads from Google AdSense in the past several weeks, but weird enough, I still have revenue :P. I changed to another AdSense plugin but it’s still the same. I don’t think Google’s service is having problem, especially for this long, so it could be either my account is having problem, or Google knows it’s me so refuse to show me ads, or my IP is blacklisted (both office and home? cannot be …).

Anyway, will keep watching this for some time but it’s definitely not urgent and important … I think all I’ve got from Google for more than a year is less than $10, sure, it’s not Google’s problem, it’s me not getting the site popular :D.