Oct 102013
 

After several days stuck in various problems, it seems I’m making progress now.

First good news came from financial side … I found this site which is good for on-demand Mac “rental”, and obviously it saved me at least $200 (if I was to go with a refurbished Mac Mini). Now I just leave $30 in my account, and occasionally log on to build my Apps. It was said that you have to log in at least every 60 days, or your money will be gone, this makes sense to me and does not bother me at all. Continue reading »

Oct 032013
 

Learnt from the mailing list that I should not export mounting point as a brick directly, instead I should create a sub-directory under the mounting point and take it as brick, this will make life much easier later on whenever you have to do migration or re-organization (like changing replica).

Developers of GlusterFS are thinking of retiring replace-brick, from the mailing list I can see they have good point to do so (especially existing codes for replace-brick is too bad to be improved :P), however, as a (sort of) ops guy, I still prefer they can keep it since it makes ops’ life much more easier, but obviously they don’t quite agree with all requests/challenges to keep it. Anyway, it seems life will not end, it will just become a little bit troublesome, and if this is the trade-off for stability and/or performance, I’m fine with it.

Oct 032013
 

I think it was in year 2005 or 2006 that I migrated everything from CVS to SVN, and it was the time that my company was doing that as well. Now I’m migrating to git, and of course, my current company is doing the same thing :P.

Guess everybody knows the reason … let’s say it’s offline support, that you don’t have to connect to sever to do commit. Further more, subversion does not work well on VirtualBox’s shared folder, while git has no problem at all, I guess people like me who needs to work on both *ix and Windows platforms have to have this kind of support.

And this is the time to see how many projects I have, WeirdBox is a great thing to keep thinking of I’ve play with the codes for several years, aws-browser is obviously another thing to keep thinking of it’s my first app on iOS and AWS (EC2 and S3), XMPP Mail Alert has to be migrated as I’m using it at this moment (for a friend’s web site). I cannot recall anything else but will post here if I find any.

And I’m using github, because of feel like safe? At least it’s not that vulnerable as other small players.

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.