I ended up needing to install hitch on a server recently, so the https:// traffic could be routed through Varnish (along with the existing ‘http’ stuff) for performance reasons.
The server only runs WordPress sites, so there are WordPress specific things in the Varnish configuration (vcl) file below.
Versions: Varnish 5.2, Hitch 1.4.4, Apache 2.4 and Debian Jessie.
Continue reading “Using hitch with varnish on Debian Jessie”
I keep forgetting the syntax for these two things, so there’s a chance writing it here will help me remember.
Possibly of use/relevance for: elasticsearch or Debezium….
Continue reading “curl, jq and slightly dynamic input to a service”
This might work to configure monit on Debian (Jessie) to monitor postsrsd.
check process postsrsd matching "/usr/sbin/postsrsd"
start program = "/etc/init.d/postsrsd start"
stop program = "/etc/init.d/postsrsd stop"
if failed host localhost port 10001 then restart
if failed host localhost port 10002 then restart
Random notes from installing Linux on it … it does just work – but ….
Continue reading “Intel NUC6i7KYK with Debian Jessie”
As I keep losing this….
Creating a .deb kernel package from a vanilla kernel.org kernel :
- wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.24.tar.xz
- tar -xf linux-4.4.24.tar.xz
- cd linux-4.4.24
- cp /boot/config-whatever .config
- Optionally: edit and set: CONFIG_DEBUG_INFO=n to stop the *dbg* package being generated
- make olddefconfig
- make deb-pkg -j6 LOCALVERSION=-dg1
Bedup is a tool that can scan and deduplicate an existing btrfs filesystem.
Continue reading “BTRFS file deduplication with bedup”
Control Groups aka cgroups – see the docs .
Resource control and monitoring.
Some examples follow for throttling i/o speed(s) for a process control group (cgroup).
Continue reading “adventures with cgroups for resource control”
So, one of my office servers was misbehaving – and random crashes finally tipped me over the edge.
Read on a blurb of text about buying an ancient computer from ebay and some uninteresting pitfalls encountered.
Continue reading “Dell t300 – Buying an ancient server”
Historically I’ve used $RANDOM as a random number source in bash — a bit like :
RAND=$(( $RANDOM % 10 ))
when I’ve needed a random number out of 0,1,2,3,4,5,6,7,8 and 9
one problem with this is that $RANDOM itself is populated between 0 and 32767 by the shell – so it’s not going to give totally even distribution.
Finally, I discovered ‘shuf’ — usage like :
shuf -i 1-100 -n 1
-n how many
RAND=$(( shuf -i 1-10 -n 1))
I needed to add some more file types for ack-grep to find / search when I’m looking for PHP code that resides in files with non-standard extensions (e.g. something.def, something.inc etc).
Continue reading “ack-grep config – ackrc – adding new file types”