Nagios: Simple Oracle Check

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.

In an earlier post, I showed how to install SQL*Plus on Debian and based on that tutorial, I wrote a little shell script to query a database (I called it check_oracle_dual.sh):

Read the rest of this entry

SQL*Plus on Debian

In this article, I will describe the steps necessary to install Oracle SQL*Plus on a Debian host. I am using Debian 6.0.5 and will install the “Instant Client” package from Oracle (version 11.2.0.3). First, we will prepare the system for the installation, download the installation package, set all the necessary variables, start SQL*Plus and connect to an instance. So let’s get started…

Before we begin the package installation, we need to make sure the necessary prerequisite packages are installed. Oracle Instant Client requires the libaio package, so let’s install that:

Read the rest of this entry

insserv: script vzreboot: service vzreboot already provided

With Debian 6, the Debian distribution made the jump to a dependency based boot sequence using LSB tags. So when you update your current Debian installation, you might encounter some problems when your scripts are not properly prepared. Such as the following message:

insserv: script vzreboot: service vzreboot already provided!

The full message reads like this:

Read the rest of this entry

Debian: Script for SFTP users

When using a server with multiple external users, one thing that regularly comes up is that users want to access a folder on the server, such as the root folder for a webserver. This way every user can manage their files and upload new content. This can be achieved securely with SFTP, which uses the SSH protocol for file transfers.

In this article, I provide a simple script to create new users with minimal preparation and all correct settings. The text is based on the following article on debian-administration.org: OpenSSH SFTP chroot() with ChrootDirectory.

Read the rest of this entry

Linux LVM How-to: Adding a new partition

Since I started out with Linux (so about six years ago), I always used the Linux Logical Volume Manager (LVM) to partition my tables. First it was just because it seemed easier to configure my harddisks with it (also, the installer usually provided a nice option to do so), but in the last few months I had the possibility to work more with LVM and got to know some nice features.

One thing I regularly have to do is to extend an existing logical volume on a server. This article focuses on extending a logical volume with the help of LVM.

Read the rest of this entry

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

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')

Whoops, so let’s look into it. The change was probably introduced with the new version of bash:

Read the rest of this entry

Nagios – Error: Could not stat() command file

So there I was. I just installed Nagios on a brand new Debian (6.0.3) host, I was greeted with the following error message after logging into the Nagios web interface and clicking a link that uses external commands:

Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'

What? Well, after making sure my configuration is correct, I figured that this must be some kind of permission problem…

Read the rest of this entry

Linux RAMDISK with tmpfs

The Linux kernel provides the tmpfs, which basically creates a file system in memory. This temporary file system can be used to store temporary data, such as caches or log files. Read more about tmpfs in the kernel documentation: tmpfs.txt

After reading this excellent article about using tmpfs in Linux, I decided to put it to the test. Even though the Linux kernel already does a good job caching files, I wanted to see the performance of this solution by applying different loads on it. For this, I am using the IOzone tool I already used for my ZFS tests (1) (2) and my Amazon EC2 IO test.

Read the rest of this entry

Debian with a vanilla kernel

So one might want to ask why you’d want to sacrifice the fantastic stability and openness of Debian to install a vanilla (= original) kernel (Debian currently has 2.6.32). There are quite a few reasons for doing so. For example, the current kernel (2.6.38) has TRIM support, which is something I am looking for when using SSDs. Also, maybe you want to have a bleeding edge kernel just for the fun of it. So lets get started.

First order of business is to download a few packages, download the latest kernel from kernel.org and then unpack the kernel in /usr/src/:

Read the rest of this entry

BASH Setup in Solaris 10

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 :)).

So after installing the BASH package (see my other post on setting up Solaris), you might find your new shell to be kinda boring. Also, it simply shows up as bash-3.00#, which by itself does not tell you a lot. So lets improve it a bit.

Read the rest of this entry

Hello world

My name is Simon Krenger, I am a Technical Account Manager (TAM) at Red Hat. I advise our customers in using Kubernetes, Containers, Linux and Open Source.

Elsewhere

  1. GitHub
  2. LinkedIn
  3. GitLab