<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://spacerat.ch/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://spacerat.ch/feed.php">
        <title>Spacerats little techwiki</title>
        <description></description>
        <link>https://spacerat.ch/</link>
        <image rdf:resource="https://spacerat.ch/lib/exe/fetch.php?media=wiki:logo.png" />
       <dc:date>2026-04-20T08:37:26+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=balls_of_steel_2015&amp;rev=1450537157&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=bash_oneliners&amp;rev=1754482050&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=check_for_optimal_dd_blocksize&amp;rev=1530780632&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=connect_to_remote_mysql_through_putty_windows_client_linux_server&amp;rev=1456822560&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=fix_mysql_logrotate_error_on_jessie&amp;rev=1452673405&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=geoip_iptables_blocking&amp;rev=1557344316&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=imperial_beep&amp;rev=1450537157&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=jessie_bind_chroot&amp;rev=1453710832&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=limit_memory_swap_usage_for_bash_progs&amp;rev=1462800094&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=logging_file_acces_via_php&amp;rev=1468479728&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=mathematics_in_bash&amp;rev=1450537157&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=redhat_centos_making_oddjob-mkhomedir_working&amp;rev=1506416864&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=rsync_loop_script&amp;rev=1525784282&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=run_sieve_filters_locally&amp;rev=1462517773&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=schwarzfahrerdb&amp;rev=1561758548&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=scrolling_in_screen&amp;rev=1450537157&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=sea_saba&amp;rev=1648489801&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=set_stationary_mode_for_u-blox_gps_receiver&amp;rev=1554969628&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=set_systemd_timer_to_run_every_10_seconds&amp;rev=1733839536&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=set_systemd_timer_to_run_sysstat_every_10_seconds&amp;rev=1733839598&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=slow_ssh_connection&amp;rev=1513354118&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=snom_tel.search.ch_lookup&amp;rev=1473939240&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=some_filesystem_benchmarks_compared_regarding_zfs_especially&amp;rev=1581413065&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=some_filesystem_benchmarks&amp;rev=1581348673&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=ssh_reverse_tunneling&amp;rev=1450537157&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=start&amp;rev=1733839568&amp;do=diff"/>
                <rdf:li rdf:resource="https://spacerat.ch/doku.php?id=vi_cheat_sheet_swiss_german_keyboard_layout_commands&amp;rev=1450537157&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://spacerat.ch/lib/exe/fetch.php?media=wiki:logo.png">
        <title>Spacerats little techwiki</title>
        <link>https://spacerat.ch/</link>
        <url>https://spacerat.ch/lib/exe/fetch.php?media=wiki:logo.png</url>
    </image>
    <item rdf:about="https://spacerat.ch/doku.php?id=balls_of_steel_2015&amp;rev=1450537157&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-19T14:59:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>balls_of_steel_2015</title>
        <link>https://spacerat.ch/doku.php?id=balls_of_steel_2015&amp;rev=1450537157&amp;do=diff</link>
        <description>My balls of steel award 2015</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=bash_oneliners&amp;rev=1754482050&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-08-06T12:07:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash_oneliners</title>
        <link>https://spacerat.ch/doku.php?id=bash_oneliners&amp;rev=1754482050&amp;do=diff</link>
        <description>BASH oneliners

	*  Whats my WAN IP?


dig +short myip.opendns.com @resolver1.opendns.com


	*  Find large files, print 10 largest files in dir


find . -printf &#039;%s %p\n&#039;|sort -nr|head


	*  size of all files older than mtime


find . -mtime +7 -print0 | du -hc --files0-from - | tail -n 1</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=check_for_optimal_dd_blocksize&amp;rev=1530780632&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-07-05T08:50:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>check_for_optimal_dd_blocksize</title>
        <link>https://spacerat.ch/doku.php?id=check_for_optimal_dd_blocksize&amp;rev=1530780632&amp;do=diff</link>
        <description>#!/bin/bash

# Since we&#039;re dealing with dd, abort if any errors occur
set -e

TEST_FILE=${1:-dd_obs_testfile}
[ -e &quot;$TEST_FILE&quot; ]; TEST_FILE_EXISTS=$?
TEST_FILE_SIZE=134217728

# Header
PRINTF_FORMAT=&quot;%8s : %s\n&quot;
printf &quot;$PRINTF_FORMAT&quot; &#039;block size&#039; &#039;transfer rate&#039;

# Block sizes of 512b 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M 4M 8M 16M 32M 64M
for BLOCK_SIZE in 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864
do
  # C…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=connect_to_remote_mysql_through_putty_windows_client_linux_server&amp;rev=1456822560&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-03-01T08:56:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>connect_to_remote_mysql_through_putty_windows_client_linux_server</title>
        <link>https://spacerat.ch/doku.php?id=connect_to_remote_mysql_through_putty_windows_client_linux_server&amp;rev=1456822560&amp;do=diff</link>
        <description>Connect to remote mysql through putty (windows client / linux server)

aka tunneling ports through putty

Fire up putty and connect to your server as usual 

Change putty tunnel settings as following:





You can now connect to mysql as it would be local</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=fix_mysql_logrotate_error_on_jessie&amp;rev=1452673405&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-01-13T08:23:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>fix_mysql_logrotate_error_on_jessie</title>
        <link>https://spacerat.ch/doku.php?id=fix_mysql_logrotate_error_on_jessie&amp;rev=1452673405&amp;do=diff</link>
        <description>echo &quot;SET PASSWORD FOR &#039;debian-sys-maint&#039;@&#039;localhost&#039; = PASSWORD(&#039;`sudo cat /etc/mysql/debian.cnf | grep password | head -n 1 | awk -F= &#039;{ gsub(/[ \t]+/, &quot;&quot;, $2); print $2 }&#039;`&#039;);&quot; | mysql -u root -p</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=geoip_iptables_blocking&amp;rev=1557344316&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-05-08T19:38:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>geoip_iptables_blocking</title>
        <link>https://spacerat.ch/doku.php?id=geoip_iptables_blocking&amp;rev=1557344316&amp;do=diff</link>
        <description>GeoIP for use with iptables (Debian 8 Jessie)


OUTDATED. MAXMIND stuff has changed. needs rework.

install necessary software


apt-get install libtext-csv-xs-perl xtables-addons-common


create a weekly cronjob


vi /etc/cron.weekly/maxmind 

#!/bin/sh
GEOIP_MIRROR=&quot;http://geolite.maxmind.com/download/geoip/database&quot;
TMPDIR=$(mktemp -d /tmp/geoipupdate.XXXXXXXXXX)
wget --no-verbose -t 3 -T 60 &quot;${GEOIP_MIRROR}/GeoIPv6.csv.gz&quot; -O &quot;${TMPDIR}/GeoIPv6.csv.gz&quot;
wget --no-verbose -t 3 -T 60 &quot;${GEOIP_M…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=imperial_beep&amp;rev=1450537157&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-19T14:59:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>imperial_beep</title>
        <link>https://spacerat.ch/doku.php?id=imperial_beep&amp;rev=1450537157&amp;do=diff</link>
        <description>The Imperial March as PC Speaker Beeps


Comment out pcskpr module in /etc/modprobe.d/blacklist.conf
[tom@jumper ~]$ sudo apt-get install beep
[tom@jumper ~]$ sudo modprobe pcspkr
[tom@jumper ~]$ beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=jessie_bind_chroot&amp;rev=1453710832&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-01-25T08:33:52+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>jessie_bind_chroot</title>
        <link>https://spacerat.ch/doku.php?id=jessie_bind_chroot&amp;rev=1453710832&amp;do=diff</link>
        <description>Chrooted bind9 on Jessie

credits to: &lt;https://wiki.debian.org/Bind9&gt;

For Jessie, edit /etc/systemd/system/multi-user.target.wants/bind9.service to add options “-t /var/bind9/chroot”:


[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target

[Service]
ExecStart=/usr/sbin/named -f -u bind -t /var/bind9/chroot
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop

[Install]
WantedBy=multi-user.target</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=limit_memory_swap_usage_for_bash_progs&amp;rev=1462800094&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-05-09T13:21:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>limit_memory_swap_usage_for_bash_progs</title>
        <link>https://spacerat.ch/doku.php?id=limit_memory_swap_usage_for_bash_progs&amp;rev=1462800094&amp;do=diff</link>
        <description>Stolen from: stackexchange.com


#!/bin/sh

set -eu

if [ &quot;$#&quot; -lt 2 ]
then
        echo Usage: `basename $0` &quot;&lt;limit&gt; &lt;command&gt;...&quot;
        exit 1
fi

limit=&quot;$1&quot;
shift

cgname=&quot;limitmem_$$&quot;
echo &quot;limiting memory to $limit (cgroup $cgname) for command $@&quot; &gt;&amp;2

cgm create memory &quot;$cgname&quot; &gt;/dev/null
cgm setvalue memory &quot;$cgname&quot; memory.limit_in_bytes &quot;$limit&quot; &gt;/dev/null
# try also limiting swap usage, but this fails if the system has no swap
cgm setvalue memory &quot;$cgname&quot; memory.memsw.limit_in_byt…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=logging_file_acces_via_php&amp;rev=1468479728&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-07-14T07:02:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>logging_file_acces_via_php</title>
        <link>https://spacerat.ch/doku.php?id=logging_file_acces_via_php&amp;rev=1468479728&amp;do=diff</link>
        <description>logging acces to attacked files under apache via php

Lets say my server is scanned by scripts from time to time. I see popping up a 404 error un the logs for

/libraries/joomla/exporter.php 

which is not a file belonging to joomla and exists only on hacked joomla instances, so theres no reason to GET this file other than malicious ones. So I&#039;ve placed a file there, which logs the connection attempts</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=mathematics_in_bash&amp;rev=1450537157&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-19T14:59:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mathematics_in_bash</title>
        <link>https://spacerat.ch/doku.php?id=mathematics_in_bash&amp;rev=1450537157&amp;do=diff</link>
        <description>* Math on the cli



Basic operations

$ echo $((1+1))
2
$ echo $((3-1))
2
$ echo $((4/2))
2
$ echo $((1*2))
2

Basic ops using expr

$ expr 60 / 5
12

Floating point calculations

$ echo &quot;2*2.2/2.2&quot; | bc
2

$ echo &quot;4.4+7/8-(4.74*3.14)&quot; | bc
-10.48

using here-doc

$ bc &lt;&lt;&lt; &quot;4.4+7/8-(4.74*3.14)&quot;
-10.48

a bash funtion, for your .bashrc

calc () {
    bc -l &lt;&lt;&lt; &quot;$@&quot;
}

usage:

$ calc 65320*670
43764400</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=redhat_centos_making_oddjob-mkhomedir_working&amp;rev=1506416864&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-09-26T09:07:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>redhat_centos_making_oddjob-mkhomedir_working</title>
        <link>https://spacerat.ch/doku.php?id=redhat_centos_making_oddjob-mkhomedir_working&amp;rev=1506416864&amp;do=diff</link>
        <description>Centos/RedHat: Making oddjob-mkhomedir work for services of which authconfig isn&#039;t aware:

Example etx service (Exceed Opentext Turbo X server)

# vi /etc/pam.d/etx-mkhomedir.sh


#!/bin/sh
dbus-send --system --dest=com.redhat.oddjob_mkhomedir --print-reply / com.redhat.oddjob_mkhomedir.mkhomedirfor string:&quot;$PAM_USER&quot;</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=rsync_loop_script&amp;rev=1525784282&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-05-08T12:58:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rsync_loop_script</title>
        <link>https://spacerat.ch/doku.php?id=rsync_loop_script&amp;rev=1525784282&amp;do=diff</link>
        <description>Loops rsync until exitcode is 0


#!/bin/bash

while [ 1 ]
do
    rsync -avz --partial source dest
    if [ &quot;$?&quot; = &quot;0&quot; ] ; then
        echo &quot;rsync completed normally&quot;
        exit
    else
        echo &quot;Rsync failure. Backing off and retrying...&quot;
        sleep 180
    fi
done</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=run_sieve_filters_locally&amp;rev=1462517773&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-05-06T06:56:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>run_sieve_filters_locally</title>
        <link>https://spacerat.ch/doku.php?id=run_sieve_filters_locally&amp;rev=1462517773&amp;do=diff</link>
        <description>You wonder how to test and use your sieve scripts locally on your mailserver?

dry-run


sieve-filter -v -C -u user@domain.tld /var/vmail/domain.tld/user/sieve/scriptname.sieve &#039;INBOX&#039;


execute (note the additional -e -W)


sieve-filter -v -C -e -W -u user@domain.tld /var/vmail/domain.tld/user/sieve/scriptname.sieve &#039;INBOX&#039;</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=schwarzfahrerdb&amp;rev=1561758548&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-06-28T21:49:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>schwarzfahrerdb</title>
        <link>https://spacerat.ch/doku.php?id=schwarzfahrerdb&amp;rev=1561758548&amp;do=diff</link>
        <description>not yet</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=scrolling_in_screen&amp;rev=1450537157&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-19T14:59:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scrolling_in_screen</title>
        <link>https://spacerat.ch/doku.php?id=scrolling_in_screen&amp;rev=1450537157&amp;do=diff</link>
        <description>You need to use the following key combination to scroll up and look at your data under GNU screen. First press:

CTRL-A

Next press:
[

This will activate copy mode in GNU/screen. Now, you can scroll up/down and look at your data. Use the following keys:

  * Unordered List ItemCTRL-u and CTRL-d scroll the display up/down by the specified amount of lines while preserving the cursor position. (Default: half screen-full).
  * CTRL-b and C-f scroll the display up/down a full screen.

  * To exit co…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=sea_saba&amp;rev=1648489801&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-03-28T17:50:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sea_saba</title>
        <link>https://spacerat.ch/doku.php?id=sea_saba&amp;rev=1648489801&amp;do=diff</link>
        <description>Saba is such a beauty, such a grace</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=set_stationary_mode_for_u-blox_gps_receiver&amp;rev=1554969628&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-04-11T08:00:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>set_stationary_mode_for_u-blox_gps_receiver</title>
        <link>https://spacerat.ch/doku.php?id=set_stationary_mode_for_u-blox_gps_receiver&amp;rev=1554969628&amp;do=diff</link>
        <description>credit goes to:

&lt;https://gist.github.com/SlightlyLoony/d94cce218a9f650e6ad2de6a6ae7550e&gt;

Compile it:


gcc set-gps-mode.c -o set-gps-mode


Run it:


./set-gps-mode
Synchronized...
Stationary mode successfully set...
Synchronized...
Configuration successfully saved...


Source code:


#include &lt;stdio.h&gt;
#include &lt;unistd.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;termios.h&gt;

/*
Simple program that sets stationary mode in U-Blox GPS connected to serial 0 on a Raspberry Pi 3 running Jessie.  This
was not te…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=set_systemd_timer_to_run_every_10_seconds&amp;rev=1733839536&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-12-10T14:05:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>set_systemd_timer_to_run_every_10_seconds</title>
        <link>https://spacerat.ch/doku.php?id=set_systemd_timer_to_run_every_10_seconds&amp;rev=1733839536&amp;do=diff</link>
        <description>yum -y install sysstat

export SYSTEMD_EDITOR=/usr/bin/vim
systemctl edit sysstat-collect.timer

cat /etc/systemd/system/sysstat-collect.timer.d/override.conf

[Unit]
Description=Run system activity accounting tool every 10 seconds

# Start 10 seconds after boot and repeat every 10 seconds
[Timer]
OnBootSec=10s
OnUnitActiveSec=10s
AccuracySec=1s

[Install]
WantedBy=sysstat.service

systemctl daemon-reload 
systemctl enable --now sysstat

sysstat is now collecting data every 10 seconds. (+1sec ex…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=set_systemd_timer_to_run_sysstat_every_10_seconds&amp;rev=1733839598&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-12-10T14:06:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>set_systemd_timer_to_run_sysstat_every_10_seconds</title>
        <link>https://spacerat.ch/doku.php?id=set_systemd_timer_to_run_sysstat_every_10_seconds&amp;rev=1733839598&amp;do=diff</link>
        <description>yum -y install sysstat

export SYSTEMD_EDITOR=/usr/bin/vim
systemctl edit sysstat-collect.timer

cat /etc/systemd/system/sysstat-collect.timer.d/override.conf

[Unit]
Description=Run system activity accounting tool every 10 seconds

# Start 10 seconds after boot and repeat every 10 seconds
[Timer]
OnBootSec=10s
OnUnitActiveSec=10s
AccuracySec=1s

[Install]
WantedBy=sysstat.service

systemctl daemon-reload 
systemctl enable --now sysstat

sysstat is now collecting data every 10 seconds. (+1sec ex…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=slow_ssh_connection&amp;rev=1513354118&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-15T16:08:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>slow_ssh_connection</title>
        <link>https://spacerat.ch/doku.php?id=slow_ssh_connection&amp;rev=1513354118&amp;do=diff</link>
        <description>SSH session slow to start? It&#039;s the DNS mate!

Ever tried logging into a machine with ssh and found you have to wait much longer than reasonable for the session to start?

There are a couple of very simple ways to fix that:


add &quot;UseDNS no&quot; to /etc/ssh/sshd_config

or

add the client&#039;s net address to the server&#039;s /etc/hosts</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=snom_tel.search.ch_lookup&amp;rev=1473939240&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-09-15T11:34:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>snom_tel.search.ch_lookup</title>
        <link>https://spacerat.ch/doku.php?id=snom_tel.search.ch_lookup&amp;rev=1473939240&amp;do=diff</link>
        <description>Snom tel.search.ch lookup

Snom Phones are able to call Action URLs on incomin calls.

Just put this line into: Setup -&gt; Action URL Settings -&gt; Incoming call:

http://www.spacerat.ch/call.php?caller=$remote&amp;line=$local


&lt;?php
// Adressabfrage via tel.search.ch v1.0
// Siehe http://picks.ch/voip-telefon-snom-370/

// Server interessiert nicht. Wir brauchen die Rufnummer.
$tmp = explode(&#039;@&#039;, $_GET[&#039;caller&#039;]);
$caller = $tmp[0];
$origin = $caller;

askTelsearch($caller);

// Falls wir keine Result…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=some_filesystem_benchmarks_compared_regarding_zfs_especially&amp;rev=1581413065&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-11T09:24:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>some_filesystem_benchmarks_compared_regarding_zfs_especially</title>
        <link>https://spacerat.ch/doku.php?id=some_filesystem_benchmarks_compared_regarding_zfs_especially&amp;rev=1581413065&amp;do=diff</link>
        <description>Some Filesystem Benchmarks compared, regarding ZFS especially

[PDF]</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=some_filesystem_benchmarks&amp;rev=1581348673&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-10T15:31:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>some_filesystem_benchmarks</title>
        <link>https://spacerat.ch/doku.php?id=some_filesystem_benchmarks&amp;rev=1581348673&amp;do=diff</link>
        <description>Some Filesystem benchmarks

Some write speed tests on different Unix FS. Surely this is not true in any situation, but as it was done on the same HW with same specs it is relatively high quality.				

Blocksize	time to create a 50 GB file

					
	XFS	        EXT4	        BTRFS	        ZFSoL	        ZFSnative
512	8m6.799s	7m3.175s	7m42.553s	32m1.321s	9m25.898s
1024	4m18.668s	3m52.743s	4m54.397s	17m46.575s	5m9.074s
2048	2m41.528s	2m22.762s	3m1.718s	9m20.834s	2m53.576s
4096	1m39.691s	1m25.329	1m31.…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=ssh_reverse_tunneling&amp;rev=1450537157&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-19T14:59:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssh_reverse_tunneling</title>
        <link>https://spacerat.ch/doku.php?id=ssh_reverse_tunneling&amp;rev=1450537157&amp;do=diff</link>
        <description>SSH reverse tunneling

First make sure, you have passwordless auth on the systems. use ssh-copy-id for that.

Dest | NAT | Source


on the Dest Host: 

ssh -f -N -R 10000:localhost:22 sourceuser@Dest

on the Source Host: 

ssh localhost -p 10000


Problem with that solution is, that you always have to make sure that the tunnel from Dest to Source is in place. You can do that by a cronjob for example. But you may want to prefer to use autossh!</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=start&amp;rev=1733839568&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-12-10T14:06:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>https://spacerat.ch/doku.php?id=start&amp;rev=1733839568&amp;do=diff</link>
        <description>Unix things

	*  Imperial Beep (The Star Wars Imperial March as beeps from the PC speaker)
	*  Bash oneliners
	*  Scrolling in screen
	*  Mathematics in bash
	*  SSH reverse tunneling
	*  vi cheat sheet / swiss german keyboard layout commands
	*  Chrooted bind9 on Jessie
	*  Fix mysql / logrotate error on Jessie
	*  Connect to remote mysql through putty (windows client / linux server)
	*  GeoIP iptables blocking
	*  run sieve filters locally
	*  limit memory/swap usage for bash progs
	*  SSH ses…</description>
    </item>
    <item rdf:about="https://spacerat.ch/doku.php?id=vi_cheat_sheet_swiss_german_keyboard_layout_commands&amp;rev=1450537157&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-19T14:59:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vi_cheat_sheet_swiss_german_keyboard_layout_commands</title>
        <link>https://spacerat.ch/doku.php?id=vi_cheat_sheet_swiss_german_keyboard_layout_commands&amp;rev=1450537157&amp;do=diff</link>
        <description>vi(m) cheat sheet</description>
    </item>
</rdf:RDF>
