Archive for the ‘Application’ Category

How to Extend Apple Mac OSX to External Monitor Only

Thursday, January 20th, 2011

Happy to get myself a 23″ LED monitor, never realize how convenient it is to use 1920 x 1080 resolutions, I can now multiple on 9 terminals at one time, crazy huh?

Here is how you can extend your Mac OSX display to external monitor only. Well, don’t forget you need an external keyboard to make yourself comfort at sitting posture ;)

  • on System Preference > Displays, choose mirror display
  • Put your laptop into sleep by closing the lid
  • Clicking and clicking on your keyboard/mouse to wake up your OSX, when it’s awake, your external monitor will become the only display
  • In order to wake your display on your Macbook, just press the keyboard on your Macbook

Unfortunately, I can’t find any tools/apps can switch the display to external monitor. If you found one, do let me know.

Top 20 Favorite Free WordPress Themes

Tuesday, January 18th, 2011

One of the coolest stuff of using WordPress is the Free Themes. Some people buy premium theme for better design and management. I personally hardly spend buying premium theme, as I think it’s not necessary for me yet (for time being). I would like to introduce you… My top 20 all time favorite Free WordPress Themes.

Theme 01 Blue Steel

Theme 02 xPlosive Reloaded

(more…)

Fixed Cacti Spine 0.8.7g Problem on FreeBSD

Wednesday, October 27th, 2010

On latest release of Cacti Spine 0.8.7g, it has new Multi threaded host polling feature. After upgrade Cacti Spine from version 0.8.7e to 0.8.7g, the graphing stopped working on FreeBSD 8.1 box. When we check the process with “top” command, it seems like spine process is hang and it utilizes 100% of CPU usage.

While doing verbose logging on spine, we saw the message “Spine Timed Out While Processing Hosts Internal” freezing until it reaches the script time out at 40 seconds. The logs didn’t provide much info and the actual fixes are available at Cacti Official Spine Patches website. After apply the patches, Spine 0.8.7g is working on the FreeBSD’s box. Most of our packages installation are through FreeBSD ports, I guess that we have to check on Cacti’s Official website to look for patches. Or the maintainer should grab the latest patches and update from FreeBSD ports :)

If Spine installation is from FreeBSD ports. Here is the step by step to fixed Spine 0.8.7g problem.

  • Go to /usr/ports/net-mgmt/cacti-spine/
  • Perform make clean to wipe off previous compiled files
  • Do make extract to extract the source files
  • On current directory, go to work/cacti-spine-0.8.7g/
  • Download the latest patch from Cacti’s website and apply the patches
  • Make to build the app from patches
  • Make deinstall to uninstall current cacti
  • and finally make install to install patched spine into binary folder.

shell> cd /usr/ports/net-mgmt/cacti-spine/
shell> make clean
shell> make extract 
shell> cd work/cacti-spine-0.8.7g/
shell> wget http://www.cacti.net/downloads/spine/patches/0.8.7g/unified_issues.patch
shell> patch -p1 -N < unified_issues.patch
shell> make 
shell> make deinstall
shell> make install

Building PHP Web App in 15 minutes with Symfony Framework

Monday, August 23rd, 2010

Last year, I gave a talk at Coscup 2009, an Open Source Conference in Taipei on PHP web development with Symfony Framework.

You might interested to know what Symfony can help on rapid development on PHP, and here are the videos. Thanks to Coscup fellow and they are really helpful. Sadly can’t be there this year for Coscup 2010.

How to Install Cacti Plugin Architecture

Tuesday, August 17th, 2010

Cacti Plugin Architecture allow you to run useful monitoring plugins on Cacti. There are several good plugins like Thold, Aggregator and Weathermap which give you comprehensive network device monitoring.

There are a few steps involve In order to install Cacti Plugin Architecture. First we will need to backup current cacti files, and overwrite the files for Cacti Plugin Architecture and lastly to make some changes on configuration files in order to activate Cacti Plugin Architecture.

Installing Cacti Plugin Architecture

Cacti Plugin Architecture can be downloaded at Cacti Users website. The demo I am going to show is to download Cacti Plugin Architecture version 2.8 on Cacti version 0.8.7g.

Before installing Cacti Plugin Architecture, lets make a backup copy of your cacti files, in case something goes wrong, you can roll back to the original files. During the backup, we are going to exclude rra and log directory.

First change directory to the directory which located Cacti files, in FreeBSD would be /usr/local/share


shell> cd /usr/local/share
shell> tar -zcf cacti.backup.tar.gz --exclude=rra --exclude=log cacti

After backup, it’s now safe to replace your cacti files with cacti architecture files. First untar Cacti Plugin Architecture which you have downloaded earlier.


shell> tar -zxf cacti-plugin-0.8.7g-PA-v2.8.tar.gz

After untar-ed cd to plugin architecture folder and edit config.php.dist file with your mysql database credentials. Follow with rename the file to config.php


shell> tar -zxf cacti-plugin-0.8.7g-PA-v2.8.tar.gz
shell> cd cacti-plugin-arch
shell> vi include/config.php.dist
shell> mv include/config.php.dist include/config.php

In include/global.php, edit MySQL database credentials as well.


shell> vi include/global.php

Next, create the database table which required by Plugin Architecture. The file is located at cacti-plugin-arch directory with file name pa.sql.


shell> mysql -u username -p cacti < pa.sql

Now, it's all good, copy all the files into cacti directory. You cacti directory might be different from mine directory path.


shell> cp -rf * /usr/local/share/cacti/

The installation for Cacti Plugin Architecture is done. In order to access to Plugin Setting. Log on to Cacti, go to User Management, click on Admin, check Plugin Management on realm management and Save.

You should see Plugin Management on your left menu bar. On the next post we will go through the plugins for Cacti Plugin Architecture.