Posts

Showing posts with the label script

Partial HTML5 support in IE8 without shims or javascript

Image
Today, I stumbled across something strange in IE8 where it was able to identify and render HTML5 elements like <section> and <article> without the use of the HTML5-shiv or even without having to use document.createElement() . I figured it had to do with an "xmlns" attributed which accidently landed up on one of the <section> tags in my html. To illustrate my point, I'll use variations of the following HTML: <!DOCTYPE html> <html>   <head>     <style>       .outer,.middle,.inner {         padding: 20px;       }       .outer {         border: 1px solid black;         background: lightblue;       }       .middle {         border: 1px solid red;         background: yellow;       }       .inner {         border...

Errors while trying to monitor Asterisk through Nagios

Today, I was trying to configure nagios to monitor an asterisk setup. I installed the nagios-plugins-check_sip plugin available for CentOS. I also had check_asterisk downloaded from here just to try out both. Now, check_asterisk and check_sip are perl scipts which can be used to monitor an asterisk setup. When run through the command line, they seem to work fine, i.e: given that asterisk or any other sip server is listening and your command is correct, you should get output similar to this: ;SIP/2.0 200 OK, 0.000585 seconds response time, cnt=1 Although, that's exactly what I got, it didn't work the same way through nagios, I was getting the following as the output from the plugin. (Service check did not exit properly) After enabling debug info for nagios, I found this in the logs, HOST: remotehost, SERVICE: Asterisk, CHECK TYPE: Active, OPTIONS: 1, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: No, RETURN CODE: 3, OUTPUT: **ePN failed to compile /usr/lib64/nagios/plugins/chec...

Vnc server on a different port

The vncserver script seems to contain most of the configuration for the vnc server. In order to start vnc on an arbitrary port number, I started looking around in /etc, for any configuration relating to vnc. But I could not find anything there. As I was looking through the script /usr/bin/vncviewer, I found that the port number was derived using the display number which was given as a parameter at line 125 of that file. $vncPort = 5900 + $displayNumber; The only advantage of doing this is that you can start multiple instances of vncserver on one machine without having them fight for a single port number. If you need to start the vncserver always on port number 5900, you can change the line to something like this: $vncPort = 5900; Obviously, if you do this, it then becomes your responsibility to make sure no other instance of vncserver or any other service is running on port 5900.