Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / 01_noformat.md
Last active Sep 21, 2020
can't get CSD to show higher capacity anymore
View 01_noformat.md

System OV

[root@wwdbemame pkg]# uname -a
Linux wwdbemame.internal.triasoft.de 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@wwdbemame pkg]# rpm -aq  | grep -e CSD -e sfx
sfx3xdriver-src-3.2.1.0-52500.el8.x86_64
CSD2000-U2-04759-0.x86_64
@FlorianHeigl
FlorianHeigl / 900.etckeeper
Last active Sep 15, 2020
FreeBSD etckeeper periodic job
View 900.etckeeper
#!/usr/bin/env bash
set -eu
# from https://gist.githubusercontent.com/kenjiskywalker/4372273/raw/11af3f5ca1f05b803a2828a8b3eb2f2a288c2311/etckeeper
check_clean() {
cd "$1"
git_diff=$( git diff | head -n1 | cut -d " " -f 1 )
[ -n "$git_diff" ] && return 1
}
@FlorianHeigl
FlorianHeigl / mpath-install.md
Last active Aug 22, 2020
mpath installation
View mpath-install.md
View check_mk.example.yml.j2
#
# yamllint disable rule:line-length rule:trailing-spaces
# Default Check MK configuration file
#
# Copyright Mathias Kettner GmbH
# $CUSTOM_PLUGINS_PATH$ -> is ProgramData/checkmk/agent/plugins
# $BUILTIN_PLUGINS_PATH$ -> is Program Files(x86)/checkmk/service/plugins
# $CUSTOM_AGENT_PATH$ -> is ProgramData/checkmk/agent/
@FlorianHeigl
FlorianHeigl / extract_inventory.py
Created Aug 18, 2020
extract inventory mit lldp
View extract_inventory.py
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
@FlorianHeigl
FlorianHeigl / fritzbox-site2site-vpn.cfg
Created Aug 7, 2020
fritzbox pfsense site2site ipsec
View fritzbox-site2site-vpn.cfg
// erstellt aus https://www.linogate.de/de/support/categories/ipsec/fritzbox.html und
// https://schroederdennis.de/tutorial-howto/site-to-site-vpn-ipsec-pfsense-fritzbox/
// als kommentarzeichen geht //
vpncfg {
connections {
enabled = yes;
conn_type = conntype_lan;
name = "remote-site-name";
always_renew = yes;
View rescan-multiple.sh
#!/bin/sh
iscsiadm -m session --rescan
for _host in /sys/class/scsi_host/host* ; do
if [ -d $_host/device/iscsi_host ]; then
echo "- - -" > ${_host}/scan
/usr/bin/rescan-scsi-bus.sh --hosts=$_host -r -f -m --sparselun --nooptscan --forcerescan
/usr/bin/rescan-scsi-bus.sh --hosts=$_host -a -u -m --sparselun --nooptscan --forcerescan
fi
done
@FlorianHeigl
FlorianHeigl / lcd-ipmi-hostname.sh
Last active Jul 12, 2020
lcd management dell r730
View lcd-ipmi-hostname.sh
#!/bin/bash
# put the system hostname in the service display without dell OEM tools etc.
# found via
# https://pcloadletter.co.uk/2010/06/14/set-custom-lcd-panel-text-on-poweredge-r710-servers/
syntax() {
echo "
$0 - automatically set hostname on Dell server's status display
USAGE:
View multipath.conf
defaults {
polling_interval 10
find_multipaths no # yes
max_fds 8192
user_friendly_names no
# uid_attribute "ID_SERIAL_SHORT"
}
View gist:aae80d96afba43feb6866cfb504ab40c
##############
State Machines
##############
Finite State Machines und davon abgeleitetes Anwendungsdesign sind das, was viele Industrie-Systeme robust macht.
Jede TCP Connection, jede SMTP Übertragung durchläuft eine protokollseitige State Machine.
In Software findet man sie als Grundlage vieler moderner Anwendungen im Cloud-Bereich.
CFEngine ist darauf aufgebaut, ebenso kommerzielle Cluster wie VCS (alle Monitor Agents von VCS sind State Machines).