Debian: Issues with poller.php in latest Cacti (0.8.7a)

monitoring 2 Comments »

Prehistory: Upgraded cacti to 0.8.7a a couple of weeks ago during a regular “apt-get dist-upgrade” run.
Today I checked my Cacti installation to gather some intel on a performance/latency issue that we are currently encountering on a network link. As all graphs are blank since mid of October (hey, I am only checking in to Cacti when there are issues to take care of) I went ahead and tried to manually run the poller:

root@host: [~] /usr/share/cacti/site/poller.php
/usr/share/cacti/site/poller.php: line 1: ?php: No such file or directory
/usr/share/cacti/site/poller.php: line 2: /bin: is a directory
/usr/share/cacti/site/poller.php: line 3: +-------------------------------------------------------------------------+: command not found
/usr/share/cacti/site/poller.php: line 4: syntax error near unexpected token `|'
/usr/share/cacti/site/poller.php: line 4: ` | Copyright (C) 2004-2007 The Cacti Group |'

Looking at the source of poller.php did not really reveal anything obvious which made me start searching the Cacti forum, Google and Debian Bugs. Looks like I am pretty much alone with the problem so far…

Probably that’s the price you pay for running cutting edge (*zang*) Debian unstable.

fsck.

SNMPD: Remotely query return code of scripts

monitoring, systems No Comments »

To remotely check the return code of a script via snmpd add the following to snmpd.conf:
exec myname /path/to/script
After recycling the snmpd daemon the return code could be obtained via the following OID:
1.3.6.1.4.1.2021.8.1.100.1
If you have more than one exec line the last digit is incremented by one for each script.

CPU Hardware Virtualization support

systems, virtual 1 Comment »

Run the following command to find out if your cpu supports hardware virtualization:

egrep '^flags.*(vmx|svm)' /proc/cpuinfo

AMD processors would have the svm flag set and Intel processor the vmx flag.

Please note that hardware virtualization also needs to be enabled in the bios before being usable.

Debian: paste with mouse in vi

systems No Comments »

Ever wondered why vi(m) automatically inserts tabs on each line you paste using your mouse with middle-click (and with each line more an additional tab gets added)?

This has been annoying me for years, so I finally went and started searching for a solution. In the end it’s oh-so simple. When you are in vi, enter “:set paste” before you insert something into a buffer with your mouse middle-click. Interestingly Debian seems to be the only distribution where this is off by default.

vi: replace newline

systems No Comments »

In order to replace a newline character in vi, say by the string “, ” the following command should do while being in vi:
:%s/\n/\,\ /g

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in