Smokes your problems, coughs fresh air.

Category: Technology (Page 13 of 47)

Hobo Lobo of Hamelin

Hobo Lobo of Hamelin is worth looking at even if just for the novelty of how the story and artwork are digitally presented (something to do with a ‘parallaxer’). But, I’d much rather let the creator do the talking:

‘Hobo Lobo of Hamelin is a thing by a dude, who’s all like, “I’M GONNA MAKE A THING.” And then he did. Or is doing. Or, you know, whatever. This dude can be found on the internet. He kerns alphabet soup and rearranges window dressing in the aether to put food on his family.’

Making Linux less dumb about failed DNS servers

Whenever one of the servers in /etc/resolv.conf is unreachable, Linux/glibc/whatever isn’t smart enough not to retry it for a while. This results in a lot of services becoming unavailable, because a lot of them do reverse lookups on all incoming connections (like SSH), which will hang for the time-out of the first DNS server query.

There doesn’t seem to be a solution, but I worked around it a little bit by putting this in /etc/resolv.conf (or /etc/resolvconf/resolv.conf.d/base && resolvconf -u):

options timeout:2 rotate

Still not perfect, but more workable.

Getting munin to run every 10 minutes

Munin is kind of inefficient and on my P4 2Ghz, it running every 5 minutes is too often, and the munin processes keep dying because locks already exist. You can’t increase the munin-cron script to 10 minute intervals, because then rrdtool will generate gaps.

The munin-cron script is nothing but a wrapper for munin-graph, munin-html and munin-update. I made my own wrappers, which I then run with separate cronjobs:

# cat /usr/local/bin/munin-graph 
#!/bin/bash
 
# file copied from /usr/bin/munin-cron and adjusted.
 
# This used to test if the executables were installed.  But that is
# perfectly redundant and supresses errors that the admin should see.
 
#/usr/share/munin/munin-update $@ || exit 1
 
# The result of munin-limits is needed by munin-html but not by
# munin-graph.  So run it in the background now, it will be done
# before munin-graph.
 
# When runnin update at */5 and graph at */10, munin-update and munin-graph
# will be started at the same time, and this sleep it to prevent a
# race-condition on the update-running file.
sleep 5
 
while [ -f "/var/run/munin/update-running" ]; do
        sleep 1
done
 
/usr/share/munin/munin-limits $@ &
 
nice /usr/share/munin/munin-graph --cron $@ 2>&1 | fgrep -v "*** attempt to put segment in horiz list twice"
 
wait
 
nice /usr/share/munin/munin-html $@ || exit 1

# cat /usr/local/bin/munin-update-data
#!/bin/bash
 
# file copied from /usr/bin/munin-cron and adjusted.
 
# This used to test if the executables were installed.  But that is
# perfectly redundant and supresses errors that the admin should see.
 
runfile="/var/run/munin/update-running"
touch "$runfile"
 
/usr/share/munin/munin-update $@ || exit 1
 
rm "$runfile"
 
# The result of munin-limits is needed by munin-html but not by
# munin-graph.  So run it in the background now, it will be done
# before munin-graph.
 
#/usr/share/munin/munin-limits $@ &
 
#nice /usr/share/munin/munin-graph --cron $@ 2>&1 | fgrep -v "*** attempt to put segment in horiz list twice"
 
#wait
 
#nice /usr/share/munin/munin-html $@ || exit 1 

# cat /etc/cron.d/munin
#
# cron-jobs for munin
#
 
MAILTO=root
 
#*/5 * * * *     munin if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi
*/5 * * * *     munin if [ -x /usr/local/bin/munin-update-data ]; then /usr/local/bin/munin-update-data; fi
*/10 * * * *    munin if [ -x /usr/local/bin/munin-graph ]; then /usr/local/bin/munin-graph; fi
14 10 * * *     munin if [ -x /usr/share/munin/munin-limits ]; then /usr/share/munin/munin-limits --force --contact nagios --contact old-nagios; fi

« Older posts Newer posts »

© 2024 BigSmoke

Theme by Anders NorenUp ↑