Tips
Graphing Java JMX Object values with Ganglia and Python using JPype
Case Study Tips Programming
May 31, 2010 | COMMENTS

With Ganglia, graphing a large number of servers has never been so easy... Ganglia is a scalable distributed monitoring system for high-performance computing systems such as clusters and Grids. Ganglia let you create any kind of module in C/C++ or Python. You can also use the command line tool Gmetric and then the scripting language of your choice. The problem with Gmetrics is that you can’t keep your data organized by group and it’s getting harder to poll values in an efficient way. Few months ago I needed to monitor some JMX values returned by a Java daemon.

Continue Reading
Flash - How to fix the "Security sandbox violation: BitmapData.draw"
Tips Programming
August 30, 2009 | COMMENTS

The "Security sandbox violation" message is a common problem for any Flash developer who try to do a Snapshot of an RTMP Stream. There was a couple of workaround but they stopped working since Flash Player 9.0.115 as it was considered as a possible bug. So, now how to do a proper snapshot of an RTMP stream ? The answer is simple but you’ll need to have the control on the streaming server, whatever it is FMS or Red5.

Continue Reading
MySQL - Impact of multiple column indexes misuse
Tips Case Study
February 13, 2008 | COMMENTS

Here is a quick picture about the impact of MySQL indexes misuse. At work, our developers made a new release of their search engine using MySQL fulltext indexes, unfortunately they didn’t implement it correctly. The impact was a huge load on all our database servers. To find the trouble, I had to redirect the SQL search flow to a specific server and check for the slow queries then reproduce it with EXPLAIN. Don’t need a long time to find that the search query did an invalid usage of the fulltext index and the "Match / Against" syntax. In fact, the fulltext index was a multiple column fulltext index, in such case you have to specify ALL the column present in your index, else the index won’t be used by MySQL...

MySQL - Fulltext Indexes (MATH / AGAINST)
Printing a sequence of letters or numbers
Shell Tips
January 14, 2008 | COMMENTS

Some times, while scripting in your favorite shell (I mean Bash !! 😃 you need to print a sequence of letters or numbers. Don’t write it yourself ! Script it using seq or curly braces !

nicolas@macvin:~$ seq 1 10
1 2 3 4 5 6 7 8 9 10
nicolas@macvin:~$ seq 0 2 10
0 2 4 6 8 10
nicolas@macvin:~$ echo {1..10}
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
nicolas@macvin:~$ echo {a..g}
a b c d e f g
1
2

Hope this will help you while doing a loop or building some hash directories :

nicolas@macvin:~$ mkdir -p test/{1..10}/{1..10}

Enjoy !

How to flush DNS Cache in Mac OS X ?
Shell Tips
January 3, 2008 | COMMENTS

Joy ! I just get my new [Mac Book Pro][1] (2Go RAM / 2,4Ghz Core 2 Duo / 160Go HDD / etc.). So I’m playing a lot with [VMware Fusion][2] and multiple host (debian, ubuntu, solaris, windows, etc.) with a great fluidity ! A big improvement for me who was working with an old DELL Laptop with 1Ghz Celeron and 512Mo of Ram...

But, while playing with my new laptop and my multiple virtual instances I needed to flush my DNS Cache. So, here come the tips :

With Mac OS X <= 10.4 :

macvin:~ root# lookupd -flushcache

With Mac OS X > 10.5 :

macvin:~ root# dscacheutil -flushcache