braindump
Inhaltsverzeichnis
Braindump
SSH
sshd: error: Failed to allocate internet-domain X11 display socket.
/etc/ssh/sshd_config: AddressFamily inet
Upgrade your SSH keys!
Mozilla OpenSSH Security Guidelines
DHCP Server mit dnsmasq
dnsmasq --no-daemon --log-dhcp --dhcp-range=192.1.1.100,192.1.1.150 --dhcp-option=option:router,192.1.1.1 --dhcp-option=option:dns-server,192.1.1.10
Linux Performance Analyse
- ps -o wchan - name of the kernel function in which the process is sleeping
- Ein CPU bound und ein I/O bound Prozess laufen auf dem gleichen CPU Kern: Dieser Kern wird zu 100% vom userspace und 0% für I/O wait verwendet; Der I/O bound Prozess wartet aber trotzdem auf I/O, im Monitoring evtl. nicht mehr sichtbar
- iostat: Paralleler I/O: Extended stats: Solange await nicht (signifikant) ansteigt (aber evtl. avgrq-sz) kann das storage backend diese Menge an parallelem I/O gut verarbeiten und die Gesamtleistung steigt. Steigt await ebenfalls an, ist das storage backend an der Grenze seiner Leistungsfähigkeit angelangt.
- MySQL: ps_helper (performance schema)
- lxcfs: Angepasstes /proc für LXC container
- netstat -s: Auf buffer overruns prüfen (und evtl. TCP buffer vergrößern)
- Tools:
- dstat
- nicstat
- procinfo
- nethogs
- atop
- innotop (MySQL)
Various
- MySQL Benchmarking: 16kB single threaded random writes
DDoS protection using Netfilter/iptables
http://rhelblog.redhat.com/2014/04/11/mitigate-tcp-syn-flood-attacks-with-red-hat-enterprise-linux-7-beta/ http://people.netfilter.org/hawk/presentations/devconf2014/
- SYNPROXY
- state INVALID (sysctl net/netfilter/nf_conntrack_tcp_loose)
Exchange EWS Provider (Thunderbird)
reredirect (dynamically redirect outputs of a running program)
reptyr (Reparent a running program to a new terminal)
OOM relation to vm.swappiness=0 in new kernel
/proc/meminfo
AsItHappens (real-time network statistic collector and grapher)
BGP for SPAM blacklist distribution
http://www.bgp-spamd.net/index.html http://www.debian-administration.org/article/715/Preventing_SPAM_connections_with_bird.
MySQL: restore single table from dump
sed -n -e '/Table structure for.*`mytable/,/Table structure for/p' whole.sql > mytable.sql
MySQL: restore single database from dump
sed -n -e '/Current Database: `mydatabase/,/Current Database: `/p' whole.sql > mydatabase.sql
The art of command line
Froscon 2015
Linux Storage Stack
- bcache: Entwickler scheint eher chaotisch zu sein, Code eher instabil
- NVMe bietet die Möglichkeit für mehrere queues in HW
- XFS metadata checksums: Neues on-disk Format (v5) XFS Self Describing Metadata
- dm-compression: teilweise sehr gute Resultate auf flash basiertem Speicher
- dm-dedup: sehr viel versprechend, online (!) deduplication Slides
Linux Netzwerk Stack
- software interrupts laufen erst komplett am scheduler vorbei, wenn zuviel Zeit auf deren Bearbeitung verwendet wird kümmert sich der ksoftirqd unter der Kontrolle des schedulers um die Bearbeitung
- skb: in-kernel Datenstruktur eines Netzwerkpakets (oder mehrerer, bei aktiven Optimierungen)
Various
- FlatODF (diffbares OpenDocument) Beispiel
- Kernel bleibt bei „Calibrating delay loop“ stehen: Problem mit Interruptcontroller
- JavaScript „source linking“: Verknüpfung zwischen minified und non-minified JS
- „early flushing“: Website zB. nach </head> schon an client flushen bevor der Rest der Seite überhaupt gerendert wurde (meist schnellerer Seitenaufbau)
- Probleme: HTTP status code ging schon an client raus (falls später ein Fehler auftritt) ⇒ reverse proxies cachen auf dem Weg auch fehlerhafte Seiten (weil HTTP 200, trotz Fehler)
ctypes (Funktionen in C libs aus bash ausführen)
ctypes.sh is a bash plugin that provides a foreign function interface directly in your shell. In other words, it allows you to call routines in shared libraries from within bash. http://ctypes.sh/
The TTY demystified
exiftool: strip all EXIF data
exiftool -all= -overwrite_original <file.jpg>
dehydrated deb mit fpm bauen
https://github.com/lukas2511/dehydrated
fpm --input-type dir --output-type deb --name dehydrated --version $(git show --date=short --no-patch --format=format:'%ad-git%H' HEAD) --architecture all --depends curl ./dehydrated=/usr/bin/ ./docs/=/usr/share/doc/dehydrated $(mktemp -d)/=/etc/dehydrated
minio deb mit fpm bauen
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x minio
fpm --input-type dir --output-type deb --name minio --version $(./minio version | awk '/^Version/ { print $2 }') ./minio=/usr/bin/
iptables debugging (TRACE target)
iproute2 cheat sheet
IT Landscape for sysadmins
Moneyplex FP3 in CSV wandeln
xmlstarlet sel --text --template --match 'preparedreport/previewpages/page0/b2' --value-of "concat(substring(m27/@u, 1, 10),';',m21/@u,';',m24/@u)" --nl INPUTFILE.fp3
JavaCard
Photomatix: Ubuntu 24.04 Container
buildah from --name ubuntu-photomatix ubuntu:24.04 wget 'https://www.hdrsoft.com/download/linux/ubuntu/PhotomatixLinux2.0.1_Ubuntu23_24.deb' buildah add ubuntu-photomatix PhotomatixLinux2.0.1_Ubuntu23_24.deb buildah run ubuntu-photomatix /bin/bash apt update apt install sudo libglib2.0-bin libcurl4t64 libgomp1 dbus-x11 dconf-cli strace apt install /PhotomatixLinux2.0.1_Ubuntu23_24.deb dbus-run-session dconf write '/apps/photomatix/license-key' "'the-license-key-goes-here'" buildah commit ubuntu-photomatix ubuntu-photomatix podman run -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000:/run/user/1000 -v $HOME/tmp:/media/tmp --security-opt=label=type:container_runtime_t -e DISPLAY -e XAUTHORITY -e WAYLAND_DISPLAY -e XDG_RUNTIME_DIR localhost/ubuntu-photomatix photomatix
braindump.txt · Zuletzt geändert: von markus
