Nagios: Simple Oracle Check

November 28 2012

For Nagios, many, many Oracle plugins are available for checking database availability and performance. But if you just want to check if the instance is up and running (and not add more complexity), you can use the simple script provided here.

Read the rest of this entry »

Linux tar: Cannot change ownership to [..]: Permission denied

September 6 2012

In a script I was working on, the tar command always reported the following error when I tried to extract an archive:

Cannot change ownership to uid 1000 , gid 1000: Permission denied

Read the rest of this entry »

WMIC on Linux examples

June 18 2012

In a previous post I showed how to install the Windows Management Instrumentation (WMI) client for Linux. In this post, I wish to show a few ways on how to query a Windows-based host using the WMI client.

Read the rest of this entry »

BASH: here-document at line n delimited by end-of-file (wanted `EOF’)

April 24 2012

On one of our Debian hosts, we use bash scripts and cron jobs to automate certain tasks. One of these bash scripts downloads files from an FTP server and archives them. After upgrading the host machine to Debian 6.0.4, one of the bash scripts suddenly showed warnings:

/srv/foo/bar.sh: line 146: warning: here-document at line 140 delimited by end-of-file (wanted `EOF')

Read the rest of this entry »

Automating Database Startup and Shutdown on Red Hat

January 3 2012

Well, I was quite busy before the holidays, so here is another post I just keep for my reference.

For each database, I believe it is important to automate database shutdown and database startup. This way, in case of an emergency, a systems administrator can start and stop database services without the need for a database administator. Oracle provides an excellent article on this topic, but the Oracle documentation is quite generic. So I hereby provide a step-by-step guide for Red Hat Linux.

Read the rest of this entry »

BASH: Wait for log entry

January 27 2011

For a startup script, I needed to start JBoss and start another component as soon as the complete JBoss server was started. When you execute the “run.sh” script that comes with JBoss, it immediately exits and starts JBoss in the background (which is quite nice I think). Unfortunately, when I started the other component using this method, the additional program was unhappy, since JBoss was not ready yet. So I had to come up with a trick to delay the start of the additional program.

Read the rest of this entry »

BASH Setup in Solaris

January 5 2011

Coming from Linux distributions where BASH is usually already set up and configured, I had to find my way around in a UNIX environment first. So here I present the files necessary for a proper installation of BASH under Solaris 10 (yes, I know Solaris 11 Express is out :)).

Read the rest of this entry »