8 Apr 2008, 5:41pm
General
by Mark

leave a comment

Twubble: Expand your twitter bubble

Twubble: Pretty cool if you are into that sort of thing. In case you are wondering, I am LaughingLizard on twitter.

28 Mar 2008, 2:16pm
General:
by Mark

leave a comment

Cheap Power Adapter for ASUS Eee PC

Source: WikipediaI caught on the ASUS Eee PC bug a few months ago and bought one for myself but it was annoying to have to carry the power adapter to work everyday because it reduced the portability of the device. However, I looked everywhere for a decent power adapter that would work on the Eee PC. It uses a very weird 9.5V 2.5A draw which is uncommon and not found in most universal adapters. Car adapters work and they are cheap but the amperage is hard to get in 12 v cigarette adapters for the home. The best I could do with a universal adapter was 9V and 1000mA The EeePC would power up on the adapter but it kept switching between charging the battery and on battery power every second.

Then one of my co-workers found AllElectronics.com and we found an adapter that works. It was $17 shipped and it works just fine on my EeePC. The model number is PS-930 and you can buy it here. It is a 9V adapter wth a 3A draw and it performs wonderfully. Hope this helps someone.

Custom WordPress database error pages

Custom WordPress database error pages: This is an interesting article on how to setup WordPress to display custom database error pages and even send out an email to the owner of the blog in case of database failure.

This means that should your database fail, and someone would open your front page at example.com, he would be served that error page with a 200 OK header. If that someone were a search engine, that’s what it would index… If the search engine encounters a 500 error, it will not index that page and just wait for your server to be fixed again. That means not making sure it sends a 500 header is a huge risk.

I am really loving Safari for Windows

Source: WikipediaI never thought that this would be the case but I am really enjoying Safari for Windows. Customization was really simple as should be expected but the speeds are astounding. Safari seems to render visibly faster that any of the three other browsers that I was running (IE, FF, Opera). The only drawback is that I do not have access to the various extensions that Firefox offers, many of which I have gotten quite used to. I guess that is the switching cost that Apple is going to have to bare. I have not looked into it but I wonder if Safari has a similar pluggable interface or has any tools in development that would allow for FF extensions to be imported into Safari and used with some compatibility.

In the related articles below are links that explain the recent changes in the Safari license that *now* allows Windows computers to run Safari.

10 Feb 2008, 10:51pm
General
by Mark

3 comments

Boy, it is 5F outside!!

Boy, it is 5F outside!!

10 Feb 2008, 9:14pm
General
by Mark

leave a comment

Since Oooops is abandoned

Here is the instructions and such from the WayBack Machine.

 

rrdtool

background…

my home network is built upon a wireless LAN using Orinoco RG-1000. however, the network performance from my linux server to Internet is poor due to the server location is separated from a ‘thick’ concrete wall. i need some tools to monitor the details such as signal strength, link rate… etc.

mrtg is the first things come to my mind. i search thru google.com and discovered Martin from Western Austrila has already do a great job using rrdtool.

mrtg has a long history in the Net and many people are using it around the world. mrtg does not only collect data every 5 mins, but also generate graph every 5 mins. the graph generation is cpu & io intensive and it limited the scability of mrtg. author of mrtg reimplement mrtg as rrdtool (round robin database) and it separated data acquisition and presentation.

my idea…

Martin from Western Austrila have a good demo how rrdtool integrate to monitor linux wirless interface. martin also indicated that mrtg cannot be used to measure negative and fraction value, but rrdtool can. however, martin’s script required server to generate graphs every 5 minutes and store them into disk.

i rewrite the code and separate the task of data collection and graph generation. perl script is used to collect data and store it into rrdtool database. php will be used as a server script to generate graph on-demand. i called it drrdgraph (dynamic rrdgraph). it should be easy to integrate into your webpage or add you customer code to limit the access of graph.

screen shot…

here’s a screen shot of dynamic rrdgraph page. it has a similar look of mrtg!!

sample graph

requirement…

you’ll need…

i install redhat 8.0 on my linux box and it recogized my Orinoco siliver card during installation. however, if you have problem on wireless interface, have a look at linux wireless lan howto.

hints: support on usb-based wireless card is limited. if your desktop/laptop have pcmcia adapter, get a wireless pc card. i prefer ISA-based pcmcia adapter especially for compaq desktop as there is problem on ricoh chipset, PCI-based pcmcia adapter. trust me, i try it on my compaq already.

installation…

installation of rrdtool is straightforward. if you got rrdtool tarball, untar it and follow README instruction. if you are using redhat, simply get the rpm package and type…

rpm -Uvh rrdtool*.rpm

you should download dynamic rrdgraph, untar it under your html root document tree. four perl scripts for capturing cpu, ethernet traffic, wireless and memory usage are included as examples. you should move them to /var/rrd/ and chmod 755.

mkdir /var/rrd/
mv script/* /var/rrd/
chmod 755 /var/rrd/*

creating database…

same to marty website, i also use the same rrdtool database to store wireless data such as SNR, signal, noise and link rate details. Here’s the command to create the database…

rrdtool create /var/rrd/eth1w.rrd -s 300	\
         DS:snr:GAUGE:600:0:60			\
         DS:signal:GAUGE:600:-105:-50		\
         DS:noise:GAUGE:600:-105:-50		\
         DS:rate:GAUGE:600:0:11			\
         RRA:AVERAGE:0.5:1:576			\
         RRA:AVERAGE:0.5:6:672			\
         RRA:AVERAGE:0.5:24:732			\
         RRA:AVERAGE:0.5:144:1460

four data sources (snr, signal, noise and rate) are created and this command create four aggregates too (2-day of 5-min average, 2-week of 30-min average, 2-mount of 2-hour average and 2-year of 12-hour average). please refer to rrdtool create” manpage for details explanation.

collecting data…

configure the following perl script eth1w.pl and make sure path and interface are good to your system.

# define location of rrdtool binary
my $rrdtool = '/usr/bin/rrdtool';
# define location of rrdtool databases
my $rrd = '/var/rrd/eth1w.rrd';
# define the wireless interface
my $iface = 'eth1';

run the script. if it’s good, you should get the following output.

> /etc/rrd/eth1w.pl
eth1 link stats: snr: 22 dB, signal: -76 dBm, noise: -98 dBm, rate: 5.5 Mbits/s

to automate the data collection, schedule the script to run every 5 minutes by setup a cron job. edit /etc/crontab and add…

# rrd
# get wireless link details (snr, signal, link rate)
00-59/5 * * * * root /etc/rrd/eth1w.pl > /dev/NULL

viewing graph…

edit config.php and make sure path is correct to your rrd database. samples for wireless, cpu, memory usage and ethernet traffic are included.

use your favourite web browser and select drrdgraph.php. a dropdown menu should be available for your selection for graph display.

it’s also easy to put the code inside your portal or add your authorization code for per user view. i integrate drrdgraph here and you could see my server statistic online.

other databases used…

you can use your imagination to create round robin database to store the data and display it thru my drrdgraph. commands for creating other rrdtool database are also shown here for your reference.

cpu0.rrd- three datasources are created using DERIVE. lower and upper values are set as 0 and 100 respectively (percentage).

rrdtool create /var/rrd/cpu0.rrd -s 300	\
         DS:user:DERIVE:600:0:100	\
         DS:nice:DERIVE:600:0:100	\
         DS:system:DERIVE:600:0:100	\
         RRA:AVERAGE:0.5:1:576		\
         RRA:AVERAGE:0.5:6:672		\
         RRA:AVERAGE:0.5:24:732		\
         RRA:AVERAGE:0.5:144:1460

eth1.rrd- two datasources are created using DERIVE. lower and upper values are set as 0 and 10^6 respectively (10^6 = 1000000 = 1m).

rrdtool create /var/rrd/eth1.rrd -s 300	\
         DS:in:DERIVE:600:0:1000000	\
         DS:out:DERIVE:600:0:1000000	\
         RRA:AVERAGE:0.5:1:576		\
         RRA:AVERAGE:0.5:6:672		\
         RRA:AVERAGE:0.5:24:732		\
         RRA:AVERAGE:0.5:144:1460

mem.rrd- i use a single database to store main memory and swap memory so there are four datasources created as GAUGE. lower and upper values are set as 0 and 10^9 respectively (10^9 = 1000000000 = 1g). if you have more memory, set the upper limit to higher.

rrdtool create /var/rrd/mem.rrd -s 300		\
         DS:memused:GAUGE:600:0:1000000000	\
         DS:memfree:GAUGE:600:0:1000000000	\
         DS:swapused:GAUGE:600:0:1000000000	\
         DS:swapfree:GAUGE:600:0:1000000000	\
         RRA:AVERAGE:0.5:1:576			\
         RRA:AVERAGE:0.5:6:672			\
         RRA:AVERAGE:0.5:24:732			\
         RRA:AVERAGE:0.5:144:1460

download

you can download and integrate drrdgraph from here

my server stat

you could see demo at my server statistics. let me know if you have any comment on the php!!

10 Feb 2008, 8:48pm
General:
by Mark

leave a comment

Rewrote some of the frequently generated …

Rewrote some of the frequently generated files to be cached, tweaked the mysql server some more before the load hits. Coincidentally, the Mysql Performance tuning script at http://day32.com/MySQL/ was a great starting point.

Getting two servers in the same network …

Getting two servers in the same network segment of the same datacenter (by request) is impossible through 1and1, so I moved the blog to its own server. Weirdness should subside by tomorrow, I hope.

6 Feb 2008, 4:58pm
General
by Mark

leave a comment

New SQL server coming online, that shoul …

New SQL server coming online, that should reduce some of the load times

5 Feb 2008, 10:21pm
General
by Mark

leave a comment

Now where is that troll commenter …

Now where is that troll commenter plugin when I need it?

Maybe this could become a weblogtoolscol …

Maybe this could become a weblogtoolscollection.com group Twitter. That would be interesting!

5 Feb 2008, 7:42pm
General:
by Mark

leave a comment

I received a fix for the WP-Forum issue …

I received a fix for the WP-Forum issue from a helpful reader, but I think it might be better to let people disable it until there is a fix from the author.

I wonder how WordPress is handling upgra …

I wonder how WordPress is handling upgrade notifications if just the xmlrpc.php file is upgraded on the server (in this case)?

updating all wordpress installs to 2.3.3 …

updating all wordpress installs to 2.3.3.

3 Feb 2008, 7:31pm
General:
by Mark

2 comments

Really want the eeePC from Asus but I th …

Really want the eeePC from Asus but I think I am going to wait for the Everex to come out before I commit. I wish MACs weren’t so expensive!

3 Feb 2008, 6:00pm
General
by Mark

leave a comment

Found it!! That was easy?!

Found it!! That was easy?!

3 Feb 2008, 4:56pm
General
by Mark

leave a comment

Because of the unfreezing process, I hav …

Because of the unfreezing process, I have no inner monologue. ZZZzzzzzzz

I think I like CareerBuilder.com much be …

I think I like CareerBuilder.com much better than Monster.com SimplyHired.com (from LinkedIn.com) is also better than Monster. I wonder if there are any stats about “likability”.

3 Feb 2008, 1:02pm
General
by Mark

leave a comment

Error code 1000008e sucks. This 8600GT c …

Error code 1000008e sucks. This 8600GT card is starting to get on my nerves. I might have to RMA it.

Still looking for the elusive Paypal Ban …

Still looking for the elusive Paypal Banner Plugin for WordPress

2 Feb 2008, 8:21pm
General
by Mark

leave a comment

Why is Bad Behaviour so SQL intensive??

Why is Bad Behaviour so SQL intensive??

Spam bots are really starting to suck ag …

Spam bots are really starting to suck again. I am going to have to look to purchase another MySql server. Arrrgghhh!

2 Feb 2008, 5:24pm
General
by Mark

leave a comment

I really like the idea of having my own …

I really like the idea of having my own twitter. Checking out OpenAds and BTDSoft Paypal plugin. I wonder if I can write something like that on my own without having to spend oodles of time on it.

2 Feb 2008, 5:19pm
General:
by Mark

leave a comment

This is interesting. Testing Prologue

This is interesting. Testing Prologue

Youlicit – Find like minded sites

Youlicit: Thanks to a post on Lifehacker, I found this search engine that suggests sites of similar nature from your search request. They also have a Firefox extension that can suggest sites of similar nature much like Stumbleupon. I am not sure I am that starved of browsing material that I would use something of this sort but I found the results for weblogtoolscollection.com interesting. Apparently we concentrate too much on Wordpress plugins and not much else. ;)

16 Sep 2007, 9:30pm
General
by Mark

leave a comment

WordPress vs Drupal

WordPress vs Drupal: Mostly fair look at WordPress Versus Drupal for building various types of on demand applications and communities.