1 2 3 4 5 |
# longer... =EOMONTH(EDATE(today();12-TEXT(today();"M"));0) # shorter... =DATE(YEAR(today());12;31) |
there is no place like 127.0.0.1…
1 2 3 4 5 |
# longer... =EOMONTH(EDATE(today();12-TEXT(today();"M"));0) # shorter... =DATE(YEAR(today());12;31) |
The reasonable solution would be to add the -dsaparam
option.
1 |
openssl dhparam -dsaparam -out /etc/ssl/private/dhparam.pem 4096 |
For comparison.
1 2 3 4 |
time openssl dhparam -dsaparam -out dhparam.pem 4096 Generating DSA parameters, 4096 bit long prime + openssl dhparam -dsaparam -out dhparam.pem 4096 4,42s user 0,15s system 99% cpu 4,574 total |
1 2 3 4 5 |
time openssl dhparam -out dhparam.pem 4096 Generating DH parameters, 4096 bit long safe prime, generator 2 This is going to take a long time + openssl dhparam -out dhparam.pem 4096 100,27s user 1,60s system 99% cpu 1:41,93 total |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
SOCKSPort 0 RunAsDaemon 1 ORPort 9001 ORPort [IPv6 xx:xx:Xx]:9001 Address 255.255.255.255 Nickname [nickname] ContactInfo foo[at]bar[dot]blub # DirPort 9091 # what port to advertise for directory connections # ExitPolicy reject6 *:*, reject *:* # no exits allowed DisableDebuggerAttachment 0 AvoidDiskWrites 1 # RelayBandwidthRate 50 MBits # Throttle traffic to xx RelayBandwidthBurst 100 MBits # But allow bursts up to xx # BandwidthRate 50 MBits # Throttle traffic to xx BandwidthBurst 100 MBits # But allow bursts up to xx # MyFamily AA,BB,BB |
Kurz und knapp, ich denke, du weißt warum du hier bist.
1 |
nano /etc/sysctl.d/99-sysctl.conf |
1 2 3 |
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 |
Kurzer Test.
1 2 |
sysctl -p cat /proc/sys/net/ipv6/conf/all/disable_ipv6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
journalctl --disk-usage && journalctl --rotate && journalctl --vacuum-time=1s Archived and active journals take up 2.7G in the file system. Vacuuming done, freed 0B of archived journals from /run/log/journal. Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c138c3-0005aebbd7b4268a.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000c1d58a-0005aecb8130e0a6.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c27596-0005aed848fa15f3.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000c29848-0005aedbf2fffbfa.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c3b43a-0005aef5002e35b1.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c4f68b-0005af0fe5fbcb22.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c63f7a-0005af29336ad36b.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c7848d-0005af43e1f06333.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c8c8d9-0005af5f4a135e0c.journal (40.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000c93cf5-0005af6964e95766.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000c943d0-0005af696849b711.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000ca800c-0005af86a0dce3bb.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000cbbe7c-0005afa2e7c3d8bc.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000cd0ab5-0005afbb9a241795.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000ce4c98-0005afd77c681341.journal (48.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000ced477-0005afe28b0413f2.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000cedb3a-0005afe28e4a1c39.journal (72.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000cfcd87-0005affaeb62456e.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000cfd466-0005affaeeadb592.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d113f1-0005b017f87d2be9.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000d1763f-0005b0214fdc2459.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d255b9-0005b0334c0d94ee.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d3a287-0005b04d7a4fdad7.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d4e34c-0005b06b02900bc7.journal (88.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d617fd-0005b08aea1f2543.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d75895-0005b0a81615a28c.journal (112.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000d8da19-0005b0bada6d95c9.journal (112.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000da67b3-0005b0ca887ef1ba.journal (104.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000dbb574-0005b0e537e4af84.journal (80.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000dc3d76-0005b0fd4e87c700.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000dcd251-0005b10b0bbd6f76.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000dd2675-0005b1153cb50e3c.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000de115a-0005b1296376ac3e.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000df5734-0005b1459b7e5068.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000e0a42a-0005b16042fe22ef.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000e1edb4-0005b17b7997c391.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000e32ef8-0005b19933fd8510.journal (96.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/user-1000@285d20d12f1045008feca13e29e6cbb5-0000000000e42dc6-0005b1b07c713b6c.journal (8.0M). Deleted archived journal /var/log/journal/d70153e6151742dc8fa01a936ba2907e/system@3ff7680eb9f54de1b7fbae7e6a2fedaf-0000000000e46957-0005b1b703c8137b.journal (88.0M). Vacuuming done, freed 2.7G of archived journals from /var/log/journal/d70153e6151742dc8fa01a936ba2907e. Vacuuming done, freed 0B of archived journals from /var/log/journal. |
journalctl --disk-usage
show disk usage
journalctl --rotate
let the journal daemon to rotate journal files
journalctl --vacuum-time=1s
deletes data older than 1 second
Schon mal ein Dienst im DSM zerwürgt? Hier kommt Hilfe.
Kurzform, z.B. den Docker Dienst neustarten.
1 |
synoservice --restart pkgctl-Docker |
Langform, Hilfe und Dienste anzeigen lassen.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
sudo synoservicecfg --help Copyright (c) 2003-2020 Synology Inc. All rights reserved. SynoService Tool Help (Version 25426) Usage: synoservice --help Show this help --help-dev More specialty functions for deveplopment --is-enabled [ServiceName] Check if the service is enabled --status [ServiceName] Get the status of specified services --enable [ServiceName] Set runkey to yes and start the service (alias to --start) --disable [ServiceName] Set runkey to no and stop the service (alias to --stop) --hard-enable [ServiceName] Set runkey to yes and start the service and its dependency (alias to --hard-start) --hard-disable [ServiceName] Set runkey to no and stop the service and its dependency (alias to --hard-stop) --restart [ServiceName] Restart the given service --reload [ServiceName] Reload the given service --pause [ServiceName] Pause the given service --resume [ServiceName] Resume the given service --pause-by-reason [ServiceName] [Reason] Pause the service by given reason --resume-by-reason [ServiceName] [Reason] Resume the service by given reason --pause-all (-p) [Reason] (Event) Pause all service by given reason with optional event(use -p to include packages) --pause-all-no-action (-p) [Reason] (Event) Set all service runkey to no but leave the current service status(use -p to include packages) --resume-all (-p) [Reason] Resume all service by given reason(use -p to include packages) --reload-by-type [type] (buffer) Reload services with specified type --restart-by-type [type] (buffer) Restart services with specified type Type may be {file_protocol|application} Sleep $buffer seconds before exec the command (default is 0) ### sudo synoservicecfg --list DSM apparmor atalk avahi bluetoothd bonjour btacd crond cups-lpd cupsd dbus dc-output ddns findhost ftpd ftpd-ssl gcpd heartbeat hotplugd iscsitrg ldap-server manutild miniupnpd-handler natpmpd nfsd nginx nmbd nslcd ntpd-client ntpd-server pgsql pkgctl-CloudStation pkgctl-Docker pkgctl-DownloadStation pkgctl-FileStation pkgctl-HyperBackup pkgctl-Java8 pkgctl-Node.js_v12 pkgctl-Node.js_v4 pkgctl-Node.js_v8 pkgctl-OAuthService pkgctl-PDFViewer pkgctl-ReplicationService pkgctl-StorageAnalyzer pkgctl-SynoFinder pkgctl-SynologyApplicationService pkgctl-Virtualization pkgctl-WebDAVServer pppoerelay rsyncd s2s_daemon samba scemd scsi_plugin_server sftp snmp ssdp ssh-shell sssd support-remote-access synoagentregisterd synobackupd synocacheclient synocachepinfiletool synocgid synoconfd synocontentextractd synocrond synogpoclient synoindexd synologanalyzer synologrotate synomkflvd synomkthumbd synomount synonetd synoovs-db synoovs-vswitch synoperfeventd synopyntlmd synorelayd synosnmpcd synostoraged synotifyd synotunnel synovpnclient synowifid synowstransfer syslog-acc syslog-ng syslog-notify system telnetd tftp upnpd ups-net ups-usb usbipd winbindd |
1 |
nano ~/.zshrc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Keypad # 0 . Enter bindkey -s "^[Op" "0" bindkey -s "^[On" "." bindkey -s "^[OM" "^M" # 1 2 3 bindkey -s "^[Oq" "1" bindkey -s "^[Or" "2" bindkey -s "^[Os" "3" # 4 5 6 bindkey -s "^[Ot" "4" bindkey -s "^[Ou" "5" bindkey -s "^[Ov" "6" # 7 8 9 bindkey -s "^[Ow" "7" bindkey -s "^[Ox" "8" bindkey -s "^[Oy" "9" # + - * / bindkey -s "^[OQ" "/" bindkey -s "^[OR" "*" bindkey -s "^[OS" "-" bindkey -s "^[Ol" "+" #END Keypad |
1 |
wmic /node:"_pcname_" computersystem get username |
…Als Admin ausführen im Netz…
Lust auf ein „aktuelleres“ htop?
1 2 3 4 5 6 7 8 9 10 |
apt purge -y htop && apt install dh-autoreconf automake build-essential autoconf-archive libncurses-dev -y && cd /tmp && git clone https://github.com/htop-dev/htop.git && cd htop && ./autogen.sh && ./configure && make -j $(nproc) && make install && cd .. && rm -rf htop && echo "" && htop -V |
Updaten…
1 2 3 4 5 6 7 8 |
cd /tmp && git clone https://github.com/htop-dev/htop.git && cd htop && ./autogen.sh && ./configure && make && make install && cd .. && rm -rf htop && echo "" && htop -V |
Quelle: htop-dev/htop
Kurz und knapp… Falls alles andere nicht funktioniert.
1 2 3 4 5 6 7 8 |
sudo sntp -sS pool.ntp.org # # falls vorher ein Fehler erschien # sudo touch /var/db/ntp-kod sudo chown root:wheel /var/db/ntp-kod # sudo sntp -sS pool.ntp.org |
1 |
sqlite3 weewx.sdb |
1 2 3 4 5 6 7 8 9 10 11 12 |
delete from archive where '2020-08-15 12:38:00'<datetime(dateTime,'unixepoch','localtime'); # delete data from 15.08.2020 till current time delete from archive where datetime(dateTime,'unixepoch','localtime'<'2020-08-15 12:38:00'); # and vice versa .quit # to leave sqlite / db # !!! backup your db before... !!! |
1 2 3 4 5 6 |
#!/bin/bash sqlite3 weewx.sdb << EOB .headers on .mode csv select * from archive; EOB |
1 |
sudo bash your_script_name.sh > your_csv_name.csv |
1 2 3 |
cat csv.csv | head -n 2 dateTime,usUnits,interval,altimeter,appTemp,appTemp1,barometer,batteryStatus1,batteryStatus2,batteryStatus3,batteryStatus4,batteryStatus5,batteryStatus6,batteryStatus7,batteryStatus8,cloudbase,co,co2,consBatteryVoltage,dewpoint,dewpoint1,ET,extraHumid1,extraHumid2,extraHumid3,extraHumid4,extraHumid5,extraHumid6,extraHumid7,extraHumid8,extraTemp1,extraTemp2,extraTemp3,extraTemp4,extraTemp5,extraTemp6,extraTemp7,extraTemp8,forecast,hail,hailBatteryStatus,hailRate,heatindex,heatindex1,heatingTemp,heatingVoltage,humidex,humidex1,inDewpoint,inHumidity,inTemp,inTempBatteryStatus,leafTemp1,leafTemp2,leafWet1,leafWet2,lightning_distance,lightning_disturber_count,lightning_energy,lightning_noise_count,lightning_strike_count,luminosity,maxSolarRad,nh3,no2,noise,o3,outHumidity,outTemp,outTempBatteryStatus,pb,pm10_0,pm1_0,pm2_5,pressure,radiation,rain,rainBatteryStatus,rainRate,referenceVoltage,rxCheckPercent,signal1,signal2,signal3,signal4,signal5,signal6,signal7,signal8,snow,snowBatteryStatus,snowDepth,snowMoisture,snowRate,so2,soilMoist1,soilMoist2,soilMoist3,soilMoist4,soilTemp1,soilTemp2,soilTemp3,soilTemp4,supplyVoltage,txBatteryStatus,UV,uvBatteryStatus,windBatteryStatus,windchill,windDir,windGust,windGustDir,windrun,windSpeed 1514764800,1,60,,44.7476088468686,,29.5358934975,,,,,,,,,2390.7952316639,,,,40.64,,,,,,,,,,,,,,,,,,,,,,,50.0,,,,50.0,,,,,,,,,,,,,,,,0.0,,,,,70.0,50.0,,,,,,,,0.0,,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,50.0,200.0,,,5.59235462984826,5.59235462984826 |
Nothing more to say, thank me later… 😉 Best format to import to meteobridge.
!!! you need to change the order from the csv. please check the header and compare… !!!
Kurz und bündig…
1 2 3 4 5 |
sudo dphys-swapfile swapoff && \ sudo dphys-swapfile uninstall && \ sudo systemctl disable dphys-swapfile && \ systemctl disable dphys-swapfile.service && \ shutdown -r now |
Kurzform…
1 2 3 4 5 6 7 |
apt install -y dh-autoreconf ruby wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz tar xzf jq-1.6.tar.gz cd jq-1.6 autoreconf -fi sudo ./configure && sudo make -j 2 && sudo make install |
1 2 3 4 5 6 7 8 9 10 |
root ➜ jq-1.6 jq jq - commandline JSON processor [version 1.6] Usage: jq [options] <jq filter> [file...] jq [options] --args <jq filter> [strings...] jq [options] --jsonargs <jq filter> [JSON_TEXTS...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. |
Hier mal die Kurzform für ein Kiosk System mit dem Raspberry Pi und der Lite Version von Raspbian / Raspberry Pi OS
Los geht’s…
1 |
sudo su |
1 |
apt update && apt upgrade -y && apt dist-upgrade -y |
1 |
rpi-update && shutdown -r now |
1 |
apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox |
1 |
apt-get install --no-install-recommends chromium-browser -y |
Openbox Konfig anpassen
1 |
nano /etc/xdg/openbox/autostart |
1 2 3 4 5 6 7 8 9 10 11 12 |
# Disable any form of screen saver / screen blanking / power management xset s off xset s noblank xset -dpms # Allow quitting the X server with CTRL-ATL-Backspace setxkbmap -option terminate:ctrl_alt_bksp # Start Chromium in kiosk mode sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State' sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences chromium-browser --no-default-browser-check --check-for-update-interval=604800 --disable-infobars --kiosk 'http://google.com' |
–check-for-update-interval=604800 unterbindet die nervigen Updatehinweise.
Kurz testen, wer Lust dazu hat.
1 2 3 |
startx -- -nocursor # startx -- |
Mit / ohne Cursor, je nach dem, was benötigt wird, mit Cursor können Login Daten hinterlegt werden, wenn nötig.
Strg-Alt-Backspace stoppt die ganze Aktion wieder.
Tragen wir das Ganze noch für den Autostart in die .bash_profile ein.
Btw. wieder mit / ohne Cursor…
1 2 3 |
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor # [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- |
Neustart
1 |
sudo shutdown -r now |
Tipps…
Hier mal eine Möglichkeit die nervigen (Erinnerungs) Mails vom Kalender abzustellen.
1 2 |
sudo -i rm /usr/syno/etc/preference/[username]/google_authenticator |
Jetzt sollte der Login ohne 2FA wieder möglich sein.