Archive for August, 2008

Timezone for Israel on HP-UX 11i and above

Thursday, August 21st, 2008

While Linux vendors tend to maintain and publish the whole zone and daylight saving (DST) information, most legacy Unix vendors do not. Especially when it comes to such a small country such as Israel.

The following solution was tested for HP-UX B.11.31, and would probably work for all 11i versions.

Israel timezone is called IST. Israel daylight saving timezone is called IDT.

The quick and dirty:

Edit /usr/lib/tztab and append the following lines at the bottom:

# Israel daylight savings
# Added by Ez-Aton. years 2008 to 2011 only. Simple and ugly.
0 3 28 3 2008 5 IDT-3
0 1 5 10 2008 0 IST-2
0 3 27 3 2009 5 IDT-3
0 1 27 9 2009 0 IST-2
0 3 26 3 2010 5 IDT-3
0 1 12 9 2010 0 IST-2
0 3 1 4 2011 5 IDT-3
0 1 2 9 2011 0 IST-2

Save (this is a write-protected file, so force saving) and then edit /etc/TIMEZONE to include the following TZ directive:

export TZ

Assuming you sync your time using NTP, all future logins will have correct Israeli date and daylight savings.

For further information, you can check man tztab and man environ

A new blog engine!

Tuesday, August 12th, 2008

I have moved to a new blog system. From Serendipity to WordPress. I hope this will be for the best.

During the process of importing the blog’s content, most posts got into the “uncategorized” category. I am working on it.

If you got here through some external links, you have probably got to the main page due to broken links. I hope that the search will work very soon, so you will be able to find the issue you were aiming at. In the meanwhile, as a workaround, I will add a plain (non-google) search inside the blog. Later on, when Google decides to index the site correctly, I will remove it.

During the migration process, I have noticed some comments which were ignored by me, by a mistake. I will respond to these ASAP.

The blog’s design is not fully implemented yet. I hope it will be soon.

Enjoy the blog!

Oreon (Centreon) issue with php pear

Sunday, August 10th, 2008

It appears in some cases, for some pieces of software (anyone said “open source and poorly documented?”) that every installation has its own quirks and issues. It seems that following the same pattern is not always enough. It can be caused by the day you have selected to download and use the external component which the software you are to install requires, or it can be caused by some mysterious configuration which you neglected to check, and should have had no relevance to the software you are to install whatsoever – but fate has it you are facing an issue you have never seen before, or an issue you did not expect to find.

Installing Oreon today had the same result – a minor thing didn’t work. Cause? Unknown…

When you use the software – a nice web system for configuring and viewing Nagios alerts (as Nagios itself is rather complicated to manage), you get on the top of some of the pages a wierd text – “PHP_EOLPHP_EOL” and so on.

PHP Pear should have had a constant named PHP_EOL which defines the way to terminate a line. In this case, it was undefined, and caused javascripts to fail to work.

The (ugly hack) solution I used was to find the oreon.conf.php file and add to it, at the bottom, the following lines:

if (!defined(‘PHP_EOL’)) {
define(‘PHP_EOL’, “n”);

Worked like a charm. FYI.

Hot adding Qlogic LUNs – the new method

Friday, August 8th, 2008

I have demonstrated how to hot-add LUNs to a Linux system with Qlogic HBA. This has become irrelevant with the newer method, available for RHEL4 Update 3 and above.

The new method is as follow:

echo 1 > /sys/class/fc_host/host<ID>/issue_lip
echo “—” > /sys/class/scsi_host/host<ID>/scan

Replace “<ID>” with your relevant HBA ID.

Notice – due to the blog formatting, the 2nd line might appear incorrect – these are three dashes, and not some Unicode specialy formatted dash.

RHEL5 disk performance collection (sysstat)

Wednesday, August 6th, 2008

Sysstat package, for me, is a must on any Linux machine I get to deal with. It allows for easy collection of performance data, and it allows easy postmortem of past (short past, anyhow) problems.

For me, the only change from RHEL4 defaults is by setting the time interval to one minute, in stead of the defaults of 10 minutes, as set in /etc/cron.d/sysstat

On RHEL5, however, this process by itself is not enough. RHEL5’s sadc does not collect disk performance information by default. This requires changing the same line, in the same file a bit more. For 64bit systems, the line inside /etc/cron.d/sysstat should look like this:

# run system activity accounting tool every 10 minutes
*/1 * * * * root /usr/lib64/sa/sa1 -d 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A

The changes from the default are marked in bold.

You need to clean up your past sa files, inside /var/log/sa/ for it to take effect. Wait for few minutes, and you can view disk information by running ‘sar -d