HowTo play with SNMP

This mini HowTo describes how to use the SNMP client tools to retrieve human readable information from devices running an SNMP daemon. In the examples below mini-snmpd is used as the daemon and as client both the command line net-snmp tool and the snmpB GUI are used. Personally I use both Ubuntu and Debian, so the tools I use to download the clients will reflect that. See your respective UNIX distro’s help pages for how to install these client tools in your operating system. [Read More]

HowTo run pimd on FreeBSD

This is not a proper HowTo, more of a “note to self” after having created a setup to test pimd issue #57. For these notes the following virtual topology, running on Ubuntu 15.10 with Linux 4.2 and Qemu 2.3.0, is used: .--------. net1 .----. net2 .----. net3 .----------. | Sender |------| R2 |------| R3 |------| Receiver | '--------' '----' '----' '----------' The networks between the boxes are actually Linux bridge devices (br), on which you may have to disable IGMP/MLD snooping to get pimd to run smoothly. [Read More]

HowTo use NetBSD pre-built packages

Reminder to self: you need to set up the PKG_PATH to the correct FTP URI. Also, use the correct ARCH, otherwise the installer complains. Do not use amd64, but rather x86_64. Here it is, you’d think this be something the installer could set up a default for … PKG_PATH=ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/6.1.5/All/ The simply pkg_add -v git Or so you might think! As this blog points out, you also need to install some root certificates to get HTTPS/SSL working. [Read More]

HowTo run pimd on OpenBSD

This is an introduction to HowTo run pimd on OpenBSD. I keep it around mostly as a reminder to myself when testing new pimd releases, maybe someone else can make use of it as well. First of all, my sincere thanks to the OpenBSD team for, not just an awesome UNIX distribution, but also for their good taste in shipping a MULTICAST enabled kernel in the base distribution! On both NetBSD and FreeBSD there is a bit of work to get multicast support, which is one of the reasons for my not writing a HowTo for either of them atm. [Read More]

HowTo: Using -lite with a GIT-based application

Years ago while looking for a fast init replacement for work, I found Finit. Originally written by Claudio Matsuoka to act as a drop-in replacement for the Asus EeePC fastinit, “gaps filled with frog DNA …“

Until I found Finit I had always been in awe of those venturing into the realm of PID 1. However, learning from the simplicity of Claudio’s code I realized that although PID 1 at times is indistinguishable from magic, it is really not that hard to master. My version of Finit is available on GitHub.

The code is open sourced under the very liberal MIT/X11 license, and much of its frog DNA has proven very useful to me over the years. This blog post is about how that frog DNA can help you fill gaps in your projects …

[Read More]

HowTo: Push to multiple GIT repos with one command

So, now that I have http://git.troglobit.com setup as a backup GIT repo to https://github.com/troglobit, I needed a simple way to always push to both repos – best way for me is to always hook into my regular work flow, otherwise I’d just forget. The git-remote(1) man page to the rescue, it describes the set-url --add sub-command:

git remote set-url --add origin ssh://git.troglobit.com:1234/srv/git/watchdogd.git

Now, with a simple git push followed by git push --tags I had now pushed to both the GitHub repo as well as my own server!

[Read More]

HowTo: Apache with Gitweb on Debian 8.1

I’m posting this in case anyone else gets stuck setting up Apache with Gitweb. Also as a reminder to myself in case I ever need to set up this all over again.

  1. You have all your eggs in one basket (GitHub), and
  2. You really like that shiny basket, but
  3. You know you’re clumsy and usually drop baskets yourself.
  4. You are wise (yes you are!) and realize you need another basket, so
  5. You set up a server and a domain yourself …

OK. Let’s start simple, since you are already running the latest Debian you fire up the command line and install the basics:

sudo apt-get install gitweb apache2

So it’ll complain, you’ll clarify your request and soon all required packages are on your server. Now what?

Debian has already set up http://localhost/gitweb for you, and if you have a domain already you should go ahead and edit the master file for that:

editor /etc/apache2/sites-available/000-default.conf
service apache2 reload

If you want to use that for your gitweb needs, then you’re done!

[Read More]

HowTo: Add Multicast Routing to FreeBSD kernel

This is a very short blog post, mostly intended as a reminder to myself. Basically, there are two methods of adding multicast routing support to the FreeBSD kernel: Rebuild the kernel with options MROUTING Load the kernel module: kldload ip_mroute The kernel rebuild assumes the src.txz set was installed previously. cd /usr/src cd sys/amd64/conf cat GENERIC | sed 's/GENERIC$/MULTICAST/' > MULTICAST echo 'options MROUTING # Multicast routing' >> MULTICAST echo 'options PIM # Enable for pimd' >> MULTICAST cd - make kernel KERNCONF=MULTICAST reboot That’s it. [Read More]

HowTo: Add Multicast Routing to FreeBSD kernel

This is a very short blog post, mostly intended as a reminder to myself. Basically, there are two methods of adding multicast routing support to the FreeBSD kernel: Rebuild the kernel with options MROUTING Load the kernel module: kldload ip_mroute The kernel rebuild assumes the src.txz set was installed previously. cd /usr/src cd sys/amd64/conf cat GENERIC | sed 's/GENERIC$/MULTICAST/' > MULTICAST echo 'options MROUTING # Multicast routing' >> MULTICAST echo 'options PIM # Enable for pimd' >> MULTICAST cd - make kernel KERNCONF=MULTICAST reboot That’s it. [Read More]

HowTo Rebase without an origin

OK, so you’ve just been handed the task to integrate a big piece of corporate software and it’s nowhere near as done and ready as project management thinks. Of course you’ve already started chugging away at it, fixing bugs, refactoring code and wrapping it in neat containers to keep the changeset against the base SW small – you already know you’ll get another drop of the same stinking pieace of code in another six months, so you keep the changes small and track them in GIT with neatly formatted commit messages. [Read More]