www.dflc.ch

Sysadmin and cooking recipes

April 9, 2015
by davide
0 comments

Managing VmWare tools service on Centos 6

What ?

Looking at the vSphere console on a Centos 6 guest, you’ll see that the VmWare agent is installed but not running.

Why ?

The script which control the vmware agent “service”¬† for Centos version 6 is not in the right location.
It should be in

but here’s the script location

How to fix it ?

So how to fix the problem ? Simple as described below

Continue Reading →

November 26, 2014
by davide
1 Comment

Shell: Fixing shell script with ^M as carriage return character(s)

What appen ?

Running a shell (bash, sh, tcsh, or whatever) script fail with the error below

The source of the problem is that this file have been edited on Windows system (see below)

The ^M characters are carriage returns. Windows and DOS terminate lines of text with CR (^M, or ASCII code 13) followed by LF (^J, or linefeed, ASCII code 10). Linux uses just LF

if you edit this script vith vim in binary mode, you’ll see one or more ^M character(s)

$ vim -b script

Continue Reading →

October 7, 2014
by davide
0 comments

Yum – Find package(s) installed from a specific repository

I was looking for a way to list all packages installed from a specific yum repository on my server.

Here’s below how I did it

First, install yum-utils package

Then run the command below (replace repo_name by your repository)

Enjoy !!!

September 18, 2014
by davide
0 comments

Home and End keys not working on Suse

Using PuTTY to connect to an SLES or OpenSuse server work well except the fact that Home and End keys are not working at all ūüôĀ

After “Googling” I’ve found the solution.

Solution:

Modify the file

and comment those two lines (approx. line 140)

Restart another ssh session and enjoy your Home and End keys

Source:

http://www.thingy-ma-jig.co.uk/blog/12-12-2008/opensuse-110-windows-putty-ssh-no-home-key

July 4, 2014
by davide
1 Comment

Nagios tips – Troubleshooting check_ping failure

This morning, I received (again) several notification by mail about check_ping from my Nagios server

So I’ve tried to ping this host from the command line using his fqdn

But trying using check_ping Nagios plugin failed

check_ping -H host.domain.com -w 3000.0,80% -c 5000.0,100% -p 5

After some “Googling” …

I’ve found out that I’d need to force ipv4 for check_ping command

What I did was to modify the commands.cfg file like below

Then reloaded Nagios