Fujitsu Forum 2012 has insights for the future of IT

Germany is known for it’s technology expos like CeBIT but for more detailed and in depth view about the state of information technology you might want to go to Fujitsu Forum like I did a year ago invited by LIFEBOOK4Life. This year it’s held November 7th and 8th at the ICM in Munich and enables you to get an insight what the Japanese multinational information technology equipment and services company and world’s third-largest IT services provider thinks about information technology and where the IT is going.

Fujitsu Forum is the largest IT-event in Europe which is visited by professional users and IT decision-makers, as well as Fujitsu channel and technology partners. In 2011 more than 10,000 IT experts from around the world attended the Fujitsu Forum in Munich. And I was one of them invited by Fujitsu LIFEBOOK4Life campaign. As I’m a LIFEBOOK4Life Insider there’s a chance to visit the Forum also this year so let’s look what events I’m looking forward to the most and why I would want to visit those.

Fujitsu Forum 2012’s motto is “Reshaping ICT – Reshaping Business”: How to combine business processes and IT to form a stable basis that will ensure growth and success in the future. Kind of redefinition of last year’s “Reshaping IT” theme. With keynotes, breakout sessions, exhibition area and expert talks there is plenty for everyone to see and listen. But as I last year got to experience the time is not enough for everything so you must choose your own agenda which is made easier with the Individual Agenda Builder.

My agenda contains mainly topics about how the workplace in changing and what new devices there is to expect and their use cases. As a software developer the technical development affects the software and provides new innovative ways to use software. So it’s good to know which things are just around the corner or little further away. Here is my take of the events I look forward to the most (my Fujitsu Forum 2012 Agenda, pdf). I think the events’ descriptions tell all the reasons to participate. It was hard to pick just three but managed to get it down to one Keynote and two Breakout Sessions.

Keynotes – strategic perspectives:

Keynotes are addressing the questions like “The direction of future IT developments?”, “Which technologies will be on the CIO agenda?” and “What strategic factors will be of importance to decision-makers?” and although as working in a big corporation it would be interesting to know how the CIO thinks, as a tech geek more interesting one is the future IT development. From the Keynote sessions I would attend “Deriving Value from the Connected Economy”.

“Deriving Value from the Connected Economy” by Benno Zollner, Fujitsu and Kim Stevenson, Intel:

The world is changing as new technologies enable information, opinions and idea sharing like never before. Such rapid evolution is breaking down the barriers for creating businesses and economic value. We see an opportunity to harness the knowledge and ideas of the world’s population as large- scale business potential. We have tools available to be ahead of the curve in supporting this transition; and more solutions become available. Having the right strategy to produce solutions customers want, leverage technology and enable employees is paramount. Inspiring examples of the strategies and tools that are needed to pace ahead of these transitions and enable value creation for company.

Breakout Sessions – IT perspectives:

There is around 50 breakout sessions which discuss technologies, best practices and innovative solutions that are relevant to the modernization and further development of IT so you can’t attend every one of them. For more business oriented people there is “the benefits and threats of the cloud”, “in-memory computing for “big data”” and “solutions for data centers that cut costs and increase IT flexibility” but for technology oriented geeks hearing about “new developments in IT mobility” and “behind-the-scenes looks at current IT-research” is something to look forward to. So “Tablets & More – Cool scenarios for hot devices” and “The War between Enduser Devices” are obvious choices.

“Tablets & More – Cool scenarios for hot devices” by Meinolf Althaus, Fujitsu

Media tablets and mobile centric applications are new top priorities for business users and IT. How can combinations of current and new technologies help you to securely and efficiently merge the opportunities offered by business and privately owned devices? Find out about the effective and secure blend of accessing business and private IT environments from new mobile devices.

“The War between Enduser Devices” by Thomas Meyer, IDC

New formats for enduser devices are appearing very quickly. Netbooks, Ultrabooks, Tablets, new types of thin clients and also operating systems such as Android are raining down on IT departments. This analyst presentation looks at what can be expected in the near future. Which device for which purpose and how to deal with such a complex range.

Expert Talks – specialist know-how transfer:

Sometimes a specific in-depth know-how is required and Expert Talks are the place to attend. They are focused on specific topics and supplement the strategic approaches outlined in the keynotes and the concrete information presented in the breakout sessions with specialist discussions in small groups. Expert Talks are ideal for those who want to exchange information, discuss specific issues in detail and share ideas with other specialists. There is many topics to choose like “How to mitigate the headache caused by BYOD?”, “Secure your valuable data: Easy to use and scaleable security solution”, “Android tablets in Business Environment – A challenge for CIOs?”, “New LIFEBOOK notebooks meet trend of consumerization” and “Oracle Applications Strategy”. Would like to go couple of those but my agenda is already full.

And between the events it’s a must to visit the exhibition which holds 3,500 square meters of innovations and presents over 250 highlights from Fujitsu and its partners. For example I look forward to get hands-on with Fujitsu STYLISTIC Q702 hybrid tablet PC and Windows 8 running on new touch devices and hear about a brand new way of running desktop environments.

But there is also something more. On the Wednesday evening singer-songwriter Amy MacDonald takes the stage at the Fujitsu Intel Celebration Night. Not to forget the delicious bratwursts and weissbier which I hope are provided also this year :) Technology, entertainment and nourishment: what could a professional user wish more?

Fujitsu Forum holds many interesting keynotes, sessions, insights and experiences which I last year got to experience. The chance to do it again this year is open so let’s hope I get to travel to Germany for Fujitsu Forum 2012 experience, meet other Insiders and see NDA devices like last year the Ultrabooks which Fujitsu released this Summer.

LIFEBOOK4Life Ultra Test Flight adventure starts

Fujitsu’s LIFEBOOK4Life is here again with “Ultra Test Flight” and new challenges for Insiders. This year it’s about Ultrabooks and the Autumn will be full of interesting tasks to fulfill. In the end if successful the Insiders can keep their Ultrabooks, be it U772 or U572. Last year I took part in Fujitsu’s “LIFEBOOK4Life: Accept no boundaries” campaign and tested LIFEBOOK S761 laptop. It was very interesting couple of months. This year is not going to be any different and looks like it will be even more exciting.

LIFEBOOK4Life: Ultra Test Flight challenges 40 independent IT- and lifestyle-bloggers (called Insiders) from all over the world to a quest through virtual airport passing all stations from check-in to the gate. Each station contains a solo and a group task in which the Insiders unveil the features of Fujitsu’s Ultrabooks (U772 and U572) in aspects of mobility, reliability, elegance, connectivity and security. In the end if an Insider solves at least seven test tasks he or she can keep the Ultrabook. There is also extra bonuses with a change to go to Fujitsu Forum 2012 in Munich, which I went last year, and the Top 10. will get a flight voucher.

There are total of 10 test tasks and couple of extra tasks for the enthusiasts. Last year there was overall of 15 tasks but unfortunately the project site is not available anymore. It was and will be quite brain teasing and interesting to solve those with travel themed and somewhat tongue-in-cheek like articles. For example “mobility” contains a task to pack a lightweight luggage with the five items and “security” is about discussing and showing which security feature is your favorite. “Elegance” is for thin-telligence and design & style as “connectivity” is for 3G/UMTS and 4G/LTE. And the fifth theme “reliability” is about features which combine German engineering with Japanese quality.

Fujitsu LIFEBOOK U772 unboxed

LIFEBOOK4Life: Ultra Test Flight started last Friday which was convenient as the same day I got my package from the local post office. As usual, everything starts with unboxing and as a special Silver Insider (last year went the extra mile and expressed extraordinary commitment) my package contained a red LIFEBOOK U772. In short: Intel Core i5-3427U (2.8 GHz, 3 MB), 4 GB RAM, 128GB SSD, Intel HD Graphics 4000, 14″ 1366 x 768 LED backlight and Anti-glare screen, 802.11 a/b/g/n, Bluetooth 4, 3G/UMTS, 4G/LTE, (WxDxH): 327 x 225 x 15.6 mm and 1.4 kg. I will later write a short review about it.

The project has also something for everyone. You who can take part in a raffle and win a flight. To improve your chances of winning you can earn badges which gives you an extra raffle ticket. Just comment on 10 different blog articles, “Like” 10 different blog articles, share 3 articles with your friends on Facebook and log in on 6 different days.

You can follow my quest at the LIFEBOOK4Life site from my profile or follow me in Twitter.

WordPress and problem with language files (.mo)

While testing the upcoming WordPress 2.3 I noticed that I had a problem with he localization. Defining the language with WPLANG had no effects and all the text were in English as they should have been in Finnish. I installed another instance of WordPress 2.2.3 and the problem was still there. Somewhat confusing because I had a working WordPress instance with the same PHP-version (php-5.2.4_pre200708051230-r2). The only difference was that the other box was 32-bit system and the other 64-bit. Although at that time I didn’t know what to look for.

After some googling I found a Spanish-blog which explained the “bug” and provided a solution. Unfortunately I don’t speak Spanish but the solution was clear with pieces of code to show the way. After I knew what to look for I found some discussions about this topic on WordPress Trac and an entry 2 weeks ago with a patch gettext-64-without-bitwise-ops.diff seems to get the thing fixed.

The problem is in the PHP-gettext which is used for translating strings. The file is located at wp-includes/gettext.php and in that file the problem is created by fixing a bug in PHP 5.0.2 on 64-bit systems. The counterfix is luckily an easy one and you just have to remove some bitwise operators.

The solution with problematic line on red and the fix on green:

115
116
117
118
119
120
121
122
123
124
wp-includes/gettext.php
$this->STREAM = $Reader;
$magic = $this->readint();
117c117
< if ($magic == ($MAGIC1 &amp; 0xFFFFFFFF) || $magic == ($MAGIC3 &amp; 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
---
> if ($magic == $MAGIC1 || $magic == $MAGIC3) { // to make sure it works for 64-bit platforms
>	$this-&gt;BYTEORDER = 0;
> } elseif ($magic == ($MAGIC2 &amp; 0xFFFFFFFF)) {
>	$this-&gt;BYTEORDER = 1;

The search engines <3

Update, 2008-02-05:
With WordPress 2.3.3 this bug is finally closed with some other minor bug fixes and security fix for xmlrpc.php.

Apache can't start after updating expat to 2.0.1

After updating to expat-2.0.1, it tells you to run revdep-rebuild -X --library=libexpat.so.0 but even after that apache2 couldn’t be started. It says that /usr/sbin/apache2 can’t find shared library libexpat.so.0. After some googling I found a message in Google Groups which deals with the problem.

The problem is that /usr/lib/libaprutil-0.so.0.9.12 which belongs to apr-util is still broken. But how can that be broken when you just ran the revdep-rebuild which should have fixed the problem. The reason is that by executing eix apr-util, you see that there are two versions of apr-util installed.

After re-emergeing the apr-util-0.9.12-r1, apache2 starts normally.

The problem is actually caused by the “-X” option of revdep-rebuild command, which emerges the best (currrently is the latest stable) packages available. In this apr-util case, it will emerge apr-util-1.2.8.

So for slotted packages, don’t use “-X” option for revdep-rebuild command.
Shaochun Wang

Quick Howto: Setting up SNMP and MRTG

This article might be a bit outdated on some parts but just Google if problems arise.


SNMP and MRTG graphs

Statistics and graphs are nice way to follow what the machine is doing. Just a little bit of configuration and scripts you can use f. ex. servers’, routers’ and firewalls’ operational statistical data from their Object Identifiers (OID) with the help of Simple Network Management Protocol (SNMP) and Management Information Base (MIB) which define the available OID functions.

For more detailed how-to, check out: http://www.siliconvalleyccie.com/linux-hn/mrtg.htm#_Toc92809393 or a bit Gentoo specific guide http://forums.gentoo.org/viewtopic-t-105865-highlight-mrtg+rrdtool.html

Tools for the job

From Gentoo package-format:

* [net-analyzer/net-snmp]
* [net-analyzer/mrtg]
* [net-analyzer/rrdtool]
* [net-www/apache]

SNMP

We want to restrict the use of SNMP to local network so we edit SNMP’s config file which contains the community string and other parameters. Our selected community string here is “humppa”.

/etc/snmp/snmpd.conf

com2sec    local    localhost    humppa
com2sec    network_1    172.168.1.0/24    humppa
com2sec    network_2    192.168.1.0/24    humppa

group    MyROGroup    v1    local
group    MyROGroup    v1    network_1
group    MyROGroup    v1    network_2

view    all-mibs    included    .1    80

access   MyROGroup  ""  v1  noauth  0  all-mibs  none  none

So now:

  • only 3 networks (localhost, 172.168.1.0/24, and 192.168.1.0/24) are allowed to use SNMP with humppa community string.
  • Every network is on the MyROGroup and defined to use SNMP version 1 protocol with all MIBs.
  • Only Reading the MIBs is allowed and thus the write section is “none”.

Start the SNMP service:

root@pikseli ~ # /etc/init.d/snmpd start
* Starting net-snmpd ... [ ok ]

Add the service to always start after reboots:

 ~ # rc-update add snmpd default
 * snmpd added to runlevel default
 * rc-update complete.

Test that the SNMP works with snmpwalk

~ # snmpwalk -v 1 -c humppa localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Linux pikseli 2.6.11-ck1 #1 Fri Mar 4 01:59:56 EET 2005 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (13374) 0:02:13.74
SNMPv2-MIB::sysContact.0 = STRING: xyz@qwe.fi
SNMPv2-MIB::sysName.0 = STRING: mysupercomputer
...
...
~ # snmpwalk -v 1 -c humppa localhost interface
IF-MIB::ifNumber.0 = INTEGER: 3
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: eth0
IF-MIB::ifDescr.2 = STRING: lo
IF-MIB::ifDescr.3 = STRING: eth1
...
...
~ #

MRTG

MRTG Graphs on mysupercomputer

MRTG (Multi-Router Traffic Grapher) is a tool to draw some graphs from different statistical sources and they can look like the image on the right.

Configuring MRTG

MRTG’s config file is usually found in /etc/mrtg/mrtg.cfg and the resulting files are usually found under the Web Server’s root (f. ex. /var/www/mrtg/).

Mrtg Config:

LogFormat: rrdtool
EnableIPv6: no
Options[_]: bits,growright

# System: My Super Computer
# Description: Linux mysupercomputer
# Contact: -
# Location: Finland

# Global configuration
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt, \
/usr/share/snmp/mibs/TCP-MIB.txt, \
/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt

Title[server.net]: a 10MB line to Internet
PNGTitle[server.net]: Internet Traffic
PageTop[server.net]: <H1>Link to the Internet</H1>
Target[server.net]: 1:humppa@localhost
MaxBytes[server.net]: 10000000
YLegend[server.net]: kbps
Options[server.net]: growright

# Established TCP Connections
Target[server.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:humppa@localhost
Title[server.estabcons]: Currently Established TCP Connections
PNGTitle[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]: <H1>Established TCP Connections</H1>
MaxBytes[server.estabcons]: 10000000000
ShortLegend[server.estabcons]:
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In
LegendO[server.estabcons]:
Legend1[server.estabcons]: Established connections
Legend2[server.estabcons]:
Options[server.estabcons]: growright,nopercent,gauge

# New TCP Connection Monitoring (per minute)
Target[server.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:humppa@localhost
Title[server.newconns]: Newly Created TCP Connections
PNGTitle[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]: <H1>New TCP Connections</h1>
MaxBytes[server.newconns]: 10000000000
ShortLegend[server.newconns]: c/s
YLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connections
Legend2[server.newconns]: New outbound connections
Options[server.newconns]: growright,nopercent,perminute

Target[server.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:humppa@localhost + \
ssCpuRawSystem.0&ssCpuRawSystem.0:humppa@localhost + \
ssCpuRawNice.0&ssCpuRawNice.0:humppamachine@localhost RouterUptime[server.cpu]: humppa@localhost MaxBytes[server.cpu]: 100 Title[server.cpu]: CPU Load PNGTitle[server.cpu]: CPU Load PageTop[server.cpu]: <H1>Active CPU Load %</H1> Unscaled[server.cpu]: ymwd ShortLegend[server.cpu]: % YLegend[server.cpu]: CPU Utilization Legend1[server.cpu]: Active CPU in % (Load) Legend2[server.cpu]: Legend3[server.cpu]: Legend4[server.cpu]: LegendI[server.cpu]: Active LegendO[server.cpu]: Options[server.cpu]: growright,nopercent Target[server.rootdisk]:hrStorageSize.4&hrStorageUsed.4:humppa@localhost * 4000 MaxBytes[server.rootdisk]: 12000000000 Unscaled[server.rootdisk]: dwym Title[server.rootdisk]: Disk / Usage ( / ) PNGTitle[server.rootdisk]: Disk / Usage ( / ) PageTop[server.rootdisk]: <H1>Disk / Usage ( / )</H1> ShortLegend[server.rootdisk]: B kilo[server.rootdisk]: 1024 YLegend[server.rootdisk]: disk utilization Legend1[server.rootdisk]: / disk size Legend2[server.rootdisk]: / disk used Legend3[server.rootdisk]: Legend4[server.rootdisk]: LegendI[server.rootdisk]: / disk size LegendO[server.rootdisk]: / disk used Options[server.rootdisk]: growright, gauge,nopercent Target[server.usrsys]: ssCpuRawUser.0&ssCpuRawSystem.0:humppa@localhost Title[server.usrsys]: CPU usr sys PNGTitle[server.usrsys]: CPU usr sys MaxBytes[server.usrsys]: 100 PageTop[server.usrsys]: <H1>Active CPU Load (usr sys) %</H1> Unscaled[server.usrsys]: ymwd ShortLegend[server.usrsys]: % YLegend[server.usrsys]: CPU Utilization Legend1[server.usrsys]: % (usr) Legend2[server.usrsys]: % (sys) Legend3[server.usrsys]: Legend4[server.usrsys]: LegendI[server.usrsys]: % (usr) LegendO[server.usrsys]: % (sys) Options[server.usrsys]: growright, nopercent

Checking the MRTG config

Execute the script env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 3 times. You get some errors but don’t worry.

Create or uncomment the following line in your cron.d so you get regularly updated graps (once in a 5 minutes)

/etc/cron.d/mrtg

0-59/5 * * * * root env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg > /dev/null 2>&1

Finally create a index page for MRTG (f. ex. http://localhost/mrtg/index.html) with

~ # indexmaker --output=/var/www/mrtg/index.html \
 --title="Power of Tech Under Control :)" \
 --sort=name \
 --enumerate \
 /etc/mrtg/mrtg.cfg

MRTG ja RRDtool

MRTG can log data with RRDtool which is better than the default log format. Just use the “LogFormat: rrdtool” line and you’re done. There is more information about RRDtool and MRTG on Oetiker’s site.

mrtg-rrd

“The mrtg-rrd.cgi is a CGI/FastCGI script for displaying MRTG graphs from data in the RRDtool format. It can make your monitoring system faster because MRTG does not have to generate all the PNG files with graphs every 5 minutes or so. Instead of this the graphs are generated on-demand when the user wants to see them.” http://www.fi.muni.cz/~kas/mrtg-rrd/

To use Mrtg-rrd.cgi just download it from the link above and place it on Apache’s cgi-bin -directory.

Extra scripts for extra statistics

Memory and Swap usage

The script: mem.pl

Lines for the mrtg.cfg:

Target[server.mem-swap]: `/usr/local/sbin/mem.pl`
Title[server.mem-swap]: Mem and Swap Usage
Unscaled[server.mem-swap]: dwym
MaxBytes[server.mem-swap]: 300000000
PageTop[server.mem-swap]: <H1>Mem and Swap Usage</H1>
#kMG[server.mem-swap]: k,M,G,T,P
LegendI[server.mem-swap]: Swap
LegendO[server.mem-swap]: Mem
Legend1[server.mem-swap]: Swap
Legend2[server.mem-swap]: Mem
YLegend[server.mem-swap]: Mem and Swap Usage
ShortLegend[server.mem-swap]:  
Options[server.mem-swap]: gauge,nopercent

Ping Round Trip Time

The script: ping.sh

Lines for the mrtg.cfg:

# Ping
Title[server.ping]: Round Trip Time
PNGTitle[server.ping]: Round Trip Time
PageTop[server.ping]: <H1>Round Trip Time</H1>
Target[server.ping]: `/usr/local/sbin/ping.sh`
MaxBytes[server.ping]: 2000
Options[server.ping]: growright,unknaszero,nopercent,gauge
LegendI[server.ping]: Pkt loss %
LegendO[server.ping]: Avg RTT
Legend1[server.ping]: Maximum Round Trip Time in ms
Legend2[server.ping]: Minimum Round Trip Time in ms
Legend3[server.ping]: Maximal 5 Minute Maximum Round Trip Time in ms
Legend4[server.ping]: Maximal 5 Minute Minimum Round Trip Time in ms
YLegend[server.ping]: RTT (ms)

Uptime in days

The script: uptime.pl

And the lines for the mrtg.cfg:

Title[server.uptime]: System Uptime
PNGTitle[server.uptime]: System Uptime
PageTop[server.uptime]: <H1>System Uptime</H1>
Target[server.uptime]: `/usr/local/sbin/uptime.pl`
MaxBytes[server.uptime]: 1000
ShortLegend[server.uptime]: days
Options[server.uptime]: growright,unknaszero,nopercent,gauge
LegendI[server.uptime]: Uptime
LegendO[server.uptime]:
Legend1[server.uptime]: Maximum uptime in days
YLegend[server.uptime]: Time (days)
 

Apache hits and traffic

I googled for some scripts to get Apache statistics but found none. Luckily I had one on my harddrive which does the trick. Just don’t remember where I got it.

The trick is to enable “server-status” -information in Apache’s configuration. Your httpd.conf needs to include something like the following:

<Location /server-status>
    SetHandler server-status
    Order allow,deny
    Allow from localhost
</Location>
ExtendedStatus On

After that you can see Apache status in http://localhost/server-status.

Next step is the script: webstats.pl.

The lines for the MRTG are:

# Apache bytes
# server-info gives us kBytes, original script outputs bytes
Target[server.apache-tkbytes]: `/usr/local/sbin/webstats.pl bytes`
Title[server.apache-tkbytes]: Apache Traffic
PNGTitle[server.apache-tkbytes]: kBytes per second
MaxBytes[server.apache-tkbytes]: 256000
PageTop[server.apache-tkbytes]: <h2>Apache traffic</h2>
#Unscaled[server.apache-tkbytes]: ymwd
ShortLegend[server.apache-tkbytes]: kB/s
YLegend[server.apache-tkbytes]: kBytes/second
LegendI[server.apache-tkbytes]:
LegendO[server.apache-tkbytes]:  
Options[server.apache-tkbytes]: growright, nopercent, noinfo, nobanner, integer,noi

# Apache hits
Target[server.apache-thits]: `/usr/local/sbin/webstats.pl hits`
PageTop[server.apache-thits]: <h2>Apache Hits</h2>
Title[server.apache-thits]: Apache Hits
Options[server.apache-thits]:  growright, nopercent, perhour,nobanner, noinfo, integer, noi
MaxBytes[server.apache-thits]: 12000
YLegend[server.apache-thits]: hits/hour
ShortLegend[server.apache-thits]: hits/hour
WithPeak[server.apache-thits]: wmy
LegendI[server.apache-thits]:
LegendO[server.apache-thits]:  
Legend2[server.apache-thits]: Hits per hour
Legend4[server.apache-thits]: 5 minute Peak

Postfix stats: mails sent and received

Joel Knight at packetmischief.ca has a nice script for getting stats from Postfix. The idea is to “determine the number of email messages delivered locally and abroad per unit time and to graph that data.” There is also Craig Sanders’s script to provide same kind of results but I found the Joel Knight’s script to be little better.

The whole thing is documented on those pages so check them out and get some nice statistics. The difference between Joel’s and Craig’s scripts is that with Joel’s script you can also draw graphs of rejected mails.

Gongrats! You’re all done;

Tuning Apache, PHP and MySQL

Normally putting up a web server with PHP and database is easy and the default settings are enough but sometimes there is need for tuning the performance. The server might be low on memory and the CPU and has (too) many things to handle. Also it is good to know how things work.

There is a great series of three articles on IBM’s developerWorks -site about Tuning LAMP systems. First article is about “Understanding the LAMP architecture”, second article concentrates on “Optimizing Apache and PHP” and final part is for “Tuning your MySQL server”.

More practical example is on Disruptive Library Technology Jester -blog which writes about WordPress/MySQL Tuning on a Pentium III with 512M RAM box which runs a mail server (IMAP, ClamScan, Spam) and an Apache (WordPress and stuff).

Article contains setting up Alternative PHP Cache and some options for database tuning focusing on memory management. About MySQL tuning the article points out Peter Zaitsev’s “What to tune in MySQL Server after installation” and ez.no documentation on Optimizing for read performance.

Syslog-ng and connections exceeded error

Couple of days ago I updated my home Gentoo box and after that syslog-ng was too full of connections. As always the remedy was near.

If you have app-admin/syslog-ng-2.0.4 and get errors like

syslog-ng[8827]: Number of allowed concurrent connections exceeded; num=’10’, max=’10’

to the syslog then read this helpfull topic from Gentoo forums.

There was also note in Changelog:

2.0.4:
Mon, 14 May 2007 11:47:48 +0200

IMPORTANT NOTES:
* This version of syslog-ng fixes a bug in enforcing the max-connections() limit for various stream-like sources (unix-stream and tcp). Previously this limit was not enforced, thus production environments may use an inadequate value. Validate your max-connection() settings before upgrading and check your logs for rejected connections.

In short, just change one line in /etc/syslog-ng/syslog-ng.conf to match with:
source src { unix-stream("/dev/log" max-connections(20)); internal(); pipe("/proc/kmsg"); };