machinedots is wrong and not all processes killed on stop

Bug #1380671 reported by Joao Matos on 2014-10-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xymon (Ubuntu)
Undecided
Unassigned

Bug Description

Hi guys

the init file configuration is wrong

/etc/init.d/hobbit-client:
[ -z "$MACHINEDOTS" ] && MACHINEDOTS="`hostname -f`"

this is searching for a variable not set and then sets the machine name using hostname -f

should be:
MACHINEDOTS
The hostname of the local system. Default: Taken from "uname -n".

https://www.xymon.com/xymon/help/manpages/man5/xymonclient.cfg.5.html

the reason is that uname -n takes only the name part of hostname and hostname -f takes the fqdn

I've also noticed that every time the init script gets executed it doesn't kill all the processes, there is "trash" left behind

hobbit 19162 0.0 0.0 4400 612 ? S 15:53 0:00 sh -c vmstat 300 2 1>/var/lib/hobbit/tmp/hobbit_vmstat.hostname-19132 2>&1; mv /var/lib/hobbit/tmp/hobbit_vmstat.ISSV-hostname /var/lib/hobbit/tmp/hobbit_vmstat.hostname
hobbit 19164 0.0 0.0 6508 516 ? S 15:53 0:00 \_ vmstat 300 2
hobbit 19233 0.0 0.0 4400 616 ? S 15:53 0:00 sh -c vmstat 300 2 1>/var/lib/hobbit/tmp/hobbit_vmstat.hhostname 2>&1; mv /var/lib/hobbit/tmp/hobbit_vmstat.hhostname /var/lib/hobbit/tmp/hobbit_vmstat.hostname
hobbit 19235 0.0 0.0 6508 516 ? S 15:53 0:00 \_ vmstat 300 2
hobbit 19831 0.0 0.0 8608 680 ? Ss 15:54 0:00 /usr/lib/hobbit/client/bin/hobbitlaunch --config=/etc/hobbit/clientlaunch.cfg --log=/var/log/hobbit/clientlaunch.log --pidfile=/var/run/hobbit/clientlaunch.pid
hobbit 19832 0.0 0.0 4400 696 ? S 15:54 0:00 \_ /bin/sh /usr/lib/hobbit/client/bin/hobbitclient.sh
hobbit 19842 0.0 0.0 4400 696 ? S 15:54 0:00 \_ /bin/sh /usr/lib/hobbit/client/bin/hobbitclient-linux.sh
hobbit 19871 0.0 0.0 4400 616 ? S 15:54 0:00 \_ sh -c vmstat 300 2 1>/var/lib/hobbit/tmp/hobbit_vmstat.hosntame 2>&1; mv /var/lib/hobbit/tmp/hobbit_vmstat.hhostname /var/lib/hobbit/tmp/hobbit_vmstat.hostname
hobbit 19873 0.0 0.0 6508 512 ? S 15:54 0:00 | \_ vmstat 300 2
hobbit 19872 0.0 0.0 4308 356 ? S 15:54 0:00 \_ sleep 5

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

installed xymon-client 4.3.0~beta2.dfsg-9.1ubuntu0.1

Kind regards,
Joao

Joao Matos (joao-matos) on 2014-10-13
description: updated
Revision history for this message
Axel Beckert (xtaran) wrote :

Please file separate bug reports for separate issues. This bug report contains two completely independent issues.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers