Archive for the ‘Technical’ Category

Upgrading a Cisco 7960G

Wednesday, April 19th, 2006

Recently we bought a “new” set of 7960G Cisco IP phones. They are refurbished and apparently they are provided with callmanager firmware by default. We don’t want the CM stuff, as we’re using SIP everywhere. At first I couldn’t get a phone to dig a SIP firmware, which I had lying around. To upgrade a phone, take the following steps:

  1. Copy the image files to your TFTP directory.
  2. Create a SIPDefault.cnf file with the line: image_version: “P0S3-07-3-00”
  3. Create a SIP.cnf file with the same line.
  4. Create an OS79XX.TXT file with the line: P003-07-3-00
  5. Boot the phone.

Now you should be done. It’ll start upgrading after it boots and boot right into the SIP image afterwards. Be aware that this only works when you have the right image files in place. Also, it appears that you can’t upgrade phones which don’t have UAL/AL firmware installed. I haven’t verified it, but I read it on some forum somewhere.

When things don’t work, try to run a tcpdump -pni eth0 ‘udp port 69’ to see what files it’s looking for.

When you get stuck, pass me a note and maybe I can help out a bit.

Cheers πŸ™‚

Configuring traffic shaping on extreme

Tuesday, April 11th, 2006

We have a somewhat overloaded NRP on our DSL network. Apparently there are a bunch of users on there who do lots of newsleeching. Although it isn’t a very nice solution, the decision was made to do some traffic shaping on port 119. I did it before, when some link was overloaded, but to memorize how I did it I’m just going to put it here πŸ™‚

Take the following steps:

  • Log into the extreme
  • Configure an empty qosprofile: config qosprofile qp2 minbw 0% maxbw 30%
  • Create an accesslist: create access-list aclname tcp destination ip-port any source any ip-port 119 permit qosprofile qp2 ports any precedence 100

That’s all πŸ™‚

You can see the effect right away with: show access-list aclname.

Bye now.

o/~

dreaderd dserver.hosts priority

Tuesday, April 4th, 2006

We’ve had some problems with articles missing on our news platform. Today we actually found the problem and solved it. We had our spooler servers on the reader boxen configured with the same priority. We ran some tests on it to check when the reader found an article to be missing. At that point we could only see that it occurred at random times. Then we changed the priority from the same per spooler to incremental. So it sorta looks like this:

  • spooler1 s1Rp119 cache=off
  • spooler2 s2Rp119 cache=off

This actually worked. Although we don’t know yet why this is the case, we’re glad enough as it is it does. When I have some spare time left, I’ll dig into the dreaderd source to find out how this can be caused. The weird thing is that dreaderd doesn’t really give any notification as of why it is missing articles, unfortunately.

Oh well, enough other problems to take care off πŸ™‚

o/~

Unicode en character sets

Monday, March 27th, 2006

To generate PDF’s on the fly, for standard letters and stuff, I started to use fop. This application can generate PDF’s, SVG’s or even HP PCL from an xsl/fo file. You can find more information at the apache fop site. Anyway, the PDF’s to be generated may contain accented letters like an Γ― or an ΓΉ. This needs to be converted to a iso-8859-1 or -15 character number, as those letters would otherwise be displayed as mangled characters.

Customer information is stored in a mysql database. Luckily, mysql is using the latin1 (aka iso-8859-1) by default to store data in tables. This way, it’ll be easy to convert characters with an ascii value larger than 127 to a &#number; value. Everything below 127 can just stay as it is, because it’s just plain ascii.

The php ord() function returns the ascii character number for a given character. So, to convert a string to something usable in xml/html, one would use a function like this:

function latin2entities($string)
{

$tmp = “”;
for ($i = 0; $i < strlen($string); $i++)

if (ord($string[$i]) > 127)

$tmp .= sprintf(“&#%s;”, ord($string[$i]));

else

$tmp .= $string[$i];

return $tmp;

}

Couldn’t be easier πŸ™‚

Besides that, the euro sign appears to have a unicode character number. To use it in xml with iso-8859-1(5), you’d have to use €: € See πŸ™‚

Lots of useful information on character set is yet to be read, when I have time..

Linux nfs locking issues

Thursday, March 23rd, 2006

Today I ran into a kernel whining about locking failures on the nfs box. It started immediately when I took the box into production. The kernel was uttering something like:

lockd: cannot monitor $ipaddress
lockd: failed to monitor $ipaddress

It appears I forgot to install the nfs-common debian package, which installed rpc.statd. When statd isn’t running, this behaviour will appear πŸ˜‰ The idea behind statd is that it gives some sort of lock recovery when an NFS box goes down.

Another thing to remember when this shows up πŸ™‚

o/~

Odd behaviour infortrend/LSI/2.4.31

Wednesday, March 22nd, 2006

At some point, a few disks went offline in one of our newsspoolers. The newsspooler is running linux kernel 2.4.31 (never change a winning team), with 2 infortrend 12-drive raid boxen connected to LSI (mpt) SCSI controller. Anyway, when I got the message from nagios, saying that something was going on on that box, I logged onto it, took a look at dmesg and saw that some disks were gone. They indeed were. As I hadn’t seen this before on any of our boxes with this same configuration, I took a look at the array on which the offline disks were connected to. The array mentioned nothing else than bad sectors on one of the disks.

As I didn’t want to screw up the filesystems on the offline disks, I then decided to reboot the raid array. The reboot went nicely as always. After that, I unloaded the mptscsih and mptbase kernel module, and reloaded it. The disks showed up normally again.

One or two days later, the same thing happened on the same box, with disks on the same array. I didn’t repeat the same procedure however, but just reloaded the mpt modules. It worked, without even rebooting the array 😐

The bad thing is that I can’t decide where the problem lies. As the raid array was complaining about bad sectors on some disk (stupidly I forgot to see which one it was), that might be causing trouble. However, that shouldn’t be a reason to get offline disks. On the other hand there’s the raid controller. Although I’ve seen more issues with the fiber channel LSI controllers, I haven’t seen any scsi error messages from the kernel. Normally when there’s scsi woes, the module will complain about it, and in all 4 (!) times it happened, there was nothing..

Anyway, we’re going to install a new box tomorrow morning and migrate the data on the box to the new one.