Archive for March 11th, 2011

How to track server disk activity on Linux with iostat

Friday, March 11th, 2011

If you need to check the read/write throughput on a Linux just like I needed recently you might want to checkout iostat

This little handy tool is part of the Linux performance tools bundled together in the package sysstat

There is plenty of information that iostat can provide you with concerning your hard drive activity however the most basic one which I need and use is:

debian:~# watch iostat -p -m

You will get output from the command similar to:

Every 2.0s: iostat -p -m Fri Mar 11 14:11:14 2011

Linux 2.6.26-2-amd64 (debian) 11/03/11 _x86_64_

avg-cpu: %user %nice %system %iowait %steal %idle
2.61 0.07 1.45 0.78 0.00 95.08

Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
fd0 0.00 0.00 0.00 0 0
sda 20.54 0.66 0.24 15546337 5620965
sda1 20.06 0.65 0.23 15431880 5407656
sda2 0.48 0.00 0.01 114455 213309
sdb 20.04 0.59 0.29 14032121 6836186
sdb1 20.02 0.59 0.29 14026659 6830632
sdb2 0.02 0.00 0.00 5460 5553
md0 62.91 0.10 0.22 2421986 5306950

In the above command I also use the watch command in order to execute the iostat -p -m command continuously every 2 seconds to refresh the output results.
The -p option without an option will automatically show statistics for all hard drives and the -m option is passed in order to show the statistics in megabytes instead of blocks

A full-featured cool post editor like MS-Word for WordPress Blogs (FCKEditor)

Friday, March 11th, 2011

I have recently installed a new blog for my younger sister and thus am establishing a number of handy plugins to make her blog more convenient for writting posts etc.

The default text editor embedded with the default wordpress install is very unflexible and thus I looked around on the net for good substitutes which will enable my sis to feel a bit like using MS-Word.

The plugin that “made the day” was FCKEditor . The installation of the FCKEditor plugin is just like any other easy to install wordpress plugin and in newer wordpress installations for instance in ver. 3.1 it can be searched directly online and installed with 2 simple clicks.
After the plugin succesful installation I enabled it and voilla, that was all. The plugin automatically overwritted the default wordpress html editor and added up a dozen of edit buttons like you can see in the screenshot below:

wordpress fsckeditor screenshot

How to Add new links to PHPBB forum navigation bar on prosilver theme

Friday, March 11th, 2011

I own a phpbb forum which uses the prosilver phpbb theme and I wanted to add a link to external website in the navigation header of the forum.
Here is how I did it:

On phpbb forum installation on Debian Linux the file which needs to be changed is called overall_header.html
The overall_header file name is found on 4 times on my install, as follows:

/usr/share/phpbb3/styles/prosilver/template/overall_header.html
/usr/share/phpbb3/www/adm/style/overall_header.html
/var/cache/phpbb3/cache/ctpl_admin_overall_header.html.php
/var/cache/phpbb3/cache/tpl_prosilver_overall_header.html.php

The files which I had to modify to add my external link to the forum navigation bar were:

/usr/share/phpbb3/styles/prosilver/template/overall_header.html
/var/cache/phpbb3/cache/tpl_prosilver_overall_header.html.php
Therefore to add the external link to the forum edit the two files overall_header.html and tpl_prosilver_overall_header.html.php

In each of the files look up for the code:

<ul class="linklist navlinks">

After the end of this code section which ends up with >/ul< add the following html code:

<ul class="linklist navlinks2"><li><a href="http://newurladdr.com"> newurladdr </a> •</li>
<a href="http://newurl.com"> newurl </a>

</ul>

Now save the files and go to your forum, the newly added links will show up. Enjoy