BenV's notes

Archive for 2009

Torrent stuff

by on Nov.07, 2009, under Software

Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically:

  • It has to run on Slackware
  • It has to run as a daemon (in daemontools if possible)
  • There has to be an easy way to control and view the status, like a web based GUI.

(continue reading…)

Leave a Comment :, , , more...

Cry me a river!

by on Nov.06, 2009, under Boring

As I often instruct people to do:

Cry me a river

Cry me a river

Stolen from Wayfinder’s blog – check it out, it has many more funny face pics, not to mention great music!

Leave a Comment more...

Qmail + Spamdyke and fail2ban

by on Nov.03, 2009, under Morons, Software

Yesterday evening I was curiously looking at some tcpdump traffic that went through our dom0 of Xenbro. There seemed to be a ton of weird DNS requests. And with weird I mean spamlike domains, like After wondering for a bit I realized they were coming from our service domU that runs mail for the domain. (continue reading…)

Leave a Comment :, , more...

PHP – Produces Horrible Problems

by on Oct.27, 2009, under Software

That IS what it stands for, right?
Or maybe the last P is for Programs….. oh no, silly me. It’s for PEOPLE. Now I get it.
Anyway, the quote of the day:

configure: error: There is something wrong. Please check config.log for more information.

(continue reading…)

1 Comment :, , , more...

C compiler cannot create executables

by on Oct.26, 2009, under Software

Yeah, I bet you didn’t know that. You’re so stupid. (continue reading…)

Leave a Comment :, , more...

SOCKS, Opera, and brute force

by on Oct.21, 2009, under Software

Especially force, that’s what we need.
Because somehow Opera still hasn’t bothered to implement SOCKS proxy support. And if you would like to use… oh I don’t know… tor… or maybe simple ssh proxying support to test stuff from an external IP instead of from inside your local network, or for whatever your reason might be (working around your corperate firewall? ;))…. you have to use Firefox. Because they DO have SOCKS support. Strange. A case to bash Opera 🙂 (continue reading…)

2 Comments :, , more...

Another wordpress update

by on Oct.21, 2009, under Morons, Software

Version 2.8.5 is here! Some important security hardening going on, fixing a trackback DoS attack (or so they claim). Some more details over here. As usualy the automatic update failed for me, so once again the fix for this error:

Download failed.: Operation timed out after 60 seconds with 1538482 bytes received

Either patch it manually:

  • Edit wp-admin/includes/file.php and change line 448 to a more reasonable default.
  • The line sould become something like: $response = wp_remote_get($url, array('timeout' => 600));

Or use this patch:

--- wp-admin/includes/ 2009-10-21 17:03:47.000000000 +0200
+++ wp-admin/includes/file.php 2009-10-21 17:03:06.000000000 +0200
@@ -445,7 +445,7 @@
if ( ! $handle )
return new WP_Error('http_no_file', __('Could not create Temporary file'));

- $response = wp_remote_get($url, array('timeout' => 60));
+ $response = wp_remote_get($url, array('timeout' => 600));

if ( is_wp_error($response) ) {

[Download not found]

When I tried adding the above patch as a download (using the download monitor plugin) I got this failure:

File type does not meet security guidelines. Try another.

What the fuck guys, this is a TEXT file. Grepping through the sources I find the wp-admin/includes/file.php file to be the nazi. Apparently I’m not allowed (as site admin) to pass this current_user_can( 'unfiltered_upload' ). Security hardening, yeah… against idiots perhaps.
I’m expecting an update of either wordpress or the download monitor plugin soon.
Meanwhile I simply uploaded the file manually and added an existing download. Pfffrt, the hassle.

1 Comment :, , more...

MySQL 5.0 -> 5.1 on Slackware current

by on Oct.07, 2009, under Software

Slackware recently upgraded the MySQL version from 5.0 to 5.1, from the Changelog:

Sun Oct 4 00:17:50 CDT 2009
ap/mysql-5.1.39-x86_64-1.txz: Upgraded.
This bumps the version of the shared libraries to .so.16.0.0.

Yeah, that’s all great, but for me this broke on several of my machines. (continue reading…)

Leave a Comment :, , , more...

Slackware(64), Qmail and IPv6

by on Oct.06, 2009, under Software

Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU’s running, we soon ran into the need for a dns server and mailer.
Needless to say I don’t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it…), and my experiences with Exim and Postfix aren’t all too great either.
Sure, they work, but they’re too complex for my liking. I like to know what’s going on, so I still use my trusty old Qmail and Djbdns for mail and dns.
However, since those packages haven’t been updated in years, some newer features are missing. So I patch them 4 times over and stab them a bit so they work the way I like 😉 (continue reading…)

Leave a Comment :, , , more...

Net-snmp and lmSensors (and Cacti)

by on Sep.29, 2009, under Software

In order to get some disk and sensor stats I decided to recompile Net-SNMP on Xenbro. Since I did this before on my server at home (32 bit slackware-current) I figured it would be a breeze. Was I in for a surprise. Since I use quite a big configure string that slackbuild doesn’t handle yet I have it handy in a ‘bla’ file:

root@xenbro:/usr/src/net-snmp-5.5# cat bla
./configure --prefix=/usr --with-defaults --localstatedir=/var --sysconfdir=/etc --with-sys-contact="Jemoeder" --with-mib-modules="host disman/event-mib mibII/mta_sendmail smux ucd_snmp ucd-snmp/lmSensors ucd-snmp/diskio" --enable-shared --with-perl-modules="PREFIX=$PKG/usr INSTALLDIRS=vendor" --enable-embedded-perl --with-cflags="-O2" --with-libwrap --with-python-modules --with-ldflags=-lsensors --enable-ipv6 --disable-debugging --enable-static=no

However, when compiling like this both v5.5 and v5.4.2.1 of net-snmp gave me:

mkdir ucd-snmp/.libs
gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -O2 -Ulinux -Dlinux=linux -I/usr/include/rpm -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE -c ucd-snmp/lmSensors.c -fPIC -DPIC -o ucd-snmp/.libs/lmSensors.o
ucd-snmp/lmSensors.c: In function '_sensor_load':
ucd-snmp/lmSensors.c:943: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
ucd-snmp/lmSensors.c:943: error: 'data' undeclared (first use in this function)
ucd-snmp/lmSensors.c:943: error: (Each undeclared identifier is reported only once
ucd-snmp/lmSensors.c:943: error: for each function it appears in.)
ucd-snmp/lmSensors.c:964: warning: passing argument 1 of 'sensors_get_detected_chips' from incompatible pointer type
ucd-snmp/lmSensors.c:964: error: too few arguments to function 'sensors_get_detected_chips'
ucd-snmp/lmSensors.c:973: error: 'SENSORS_NO_MAPPING' undeclared (first use in this function)
ucd-snmp/lmSensors.c:974: error: incompatible type for argument 1 of 'sensors_get_label'
ucd-snmp/lmSensors.c:974: error: too many arguments to function 'sensors_get_label'
make[2]: *** [ucd-snmp/lmSensors.lo] Error 1
make[2]: Leaving directory `/usr/src/net-snmp-'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr/src/net-snmp-'
make: *** [subdirs] Error 1

Google was as useless as ever (only 1 thread about this who solved it installing some ancient version of lmsensors or something), so I had to dick around to get this to work.
First I wondered what was different about my server at home and Xenbro. 32 vs 64 bits obviously, but otherwise… not that much.
So I tried upgrading libtool from version 1.5 to 2.2.6a. Recompile wasted another 5 minutes of my life.
Then I read something about ucd-snmp/lmSensors vs ucd-snmp/lmsensorsMib. I have no idea what this is supposed to do, but I’d be better of not having read about it. Both options won’t compile because of the same compilation error above.

Finally after hours of cursing I installed lm_sensors 2.10 to /usr/local and hinted net-snmp to compile using -L/usr/local/lib, doing that made it it compile. You just have to push it a bit when it breaks… (and yes, I found out some older lm_sensors stuff was still lingering around on that home server). It kinda went like this:

# cd net-snmp-5.5/
# bash bla
# make
# cd agent/
# vim Makefile # change LD_FLAGS to include -L/usr/local/lib
# make
# cd ..
# make
# vim apps/Makefile # same edit as above
# make

Amazing enough it even works now. You’d expect it to crash and barf all over the place…. or at least I did.

Now finally back to what I wanted to do: SENSOR GRAPHS in Cacti!!!
A pretty much excellent description on how to do this is here: Eric A. Hall’s on Cacti and lmsensor readings.
His steps summarized:

  1. Get net-snmp to return sensor readings
  2. Download Cacti-netsnmp-lmsensors.tar.gz which I mirrored here: [Download not found]
  3. Untar, put files in right place, import templates in Cacti
  4. Add data queries and graphs to hosts

For more details check out his page, it has a detailed explanation. Thanks for building it Eric!

Then there’s disk stats. Half the links on the forums are hard to find or dead, so I’ll just take my own downloads. Easier for the next time I need it 😉
This is the original thread for snmpdiskio with the templates in here. Then there’s a missing download for a copy/paste version of this post. I’ll save the copy/pasting for you, just leech it if you need it (only for when your net-snmp fails!):
[Download not found]
Finally there’s a script that fetches the stuff here. Put that script in resource/snmp_queries/partition.xml
Import the two templates from the snmpdiskio-v0.9.4 tarball.
Next add the new snmp query (“Get Device I/O”) to your device (Devices -> $yourdevice -> at bottom select it from the pulldown menu). Create graphs for this device -> have fun.

I was going to add some images, but I’m too tired now. Hope you can get it to work, good luck 🙂

3 Comments :, more...


  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)