edit /etc/Upower/Upowerc.conf and set
UsePercentageForPolicy=true
PercentageLow=20
PercentageCritical=8
PercentageAction=5
CriticalPowerAction=Hibernate
Now, restart the upower systemd unit:
systemctl restart upowerLeave a Comment
Nerdzeug, Computer, Technik, Rocket Science
edit /etc/Upower/Upowerc.conf and set
UsePercentageForPolicy=true
PercentageLow=20
PercentageCritical=8
PercentageAction=5
CriticalPowerAction=Hibernate
Now, restart the upower systemd unit:
systemctl restart upowerLeave a Comment
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 gsettings set org.gnome.desktop.screensaver idle-activation-enabled false gsettings set org.gnome.settings-daemon.plugins.power idle-brightness 100Leave a Comment
my crontab:
# start recording on boot @reboot sleep 10; /usr/local/bin/startrecord.sh &> /dev/null # restart every 10 minutes to create a new file */10 * * * * killall ffmpeg ; sleep 5 ; /usr/local/bin/startrecord.sh &> /dev/null # purge old recordings 0 */6 * * * find /data/office-kamera -type f -mtime +12 -delete
/usr/local/bin/startrecord.sh
#!/bin/bash #cam1 /usr/bin/ffmpeg \ -rtsp_transport tcp -i rtsp://user:password@10.0.100.21:554/11 \ -c:v mpeg2video -b:v 16M -bufsize 16M -maxrate 16M /data/office-kamera/$(date +\%Y-\%m-\%d.\%H-\%M).cam1.mpg \ -c:a mp2 -ac 1 -ab 64k -ar 44100 \ -y -update 1 -r 3 -f image2 -q:v 10 -vf "scale=iw/2:ih/2,transpose=2" /var/www/html/cam/cam1.jpg \ &>/tmp/cam1.log &
Important: We use mpeg2 for a purpose! Forget matroska/h264/hs65. If your recording stops the hard way (power outage, crashing ffmpeg process, rising of the dead), no file trailer is written and you can NOT play or reconstruct your video when using mp4. For that reason we choose mpeg2, because you can still view fragments from a 20 year old CD-R that has been through a blender, or if you drop a thermonuclear weapon on your hard drive.
This will also put image frames to /var/www/html/cam/, where you can host a HTML document that displays your image and refreshes it via javascript if you like.
Finding you cameras RTSP URL is key. Just google "camera model rtsp url". If you have any questions feel free to ask. Consider donating via paypal if it works for you;)
1 CommentWe have a 4 core Intel i3 machine running ubuntu set up in our office, responsible for two jobs:
The machine has a single, 3TB SATA disk and no RAID. The data on the machine doesn't matter, and doesn't need to be 100% available.
When we transferred a disk image (500GB) to it via SAMBA, it would run out of memory and start swapping, slowing down the already busy disk to a point where the machine would be completely unresponsive and need to be reset.
We fixed this by disabling oplocks in /etc/smb.conf:
[global]
oplocks = no
No further tuning reqired.
Leave a Commentqpdf --password=YOURPASSWORD-HERE --decrypt input.pdf output.pdfLeave a Comment
There is no .deb package in the github Project, and generally all .deb packages for Synergy are quite old, so i rolled my own. Download it here:
9 Commentsschtasks /create /tn "reboot for updates" /tr "shutdown /r /t 0" /sc once /st 21:59:00 /sd 21.02.2020 /ru "System"
…oder ohne Angabe des Tages, einfach "heute":
schtasks /create /tn "reboot for updates" /tr "shutdown /r /t 0" /sc once /st 21:59:00 /ru "System"Leave a Comment
If you ever find yourself confronted with a Plesk system that is running out of disk space, and you just want to get rid off all the misconfigured "keep forever" backups, here's how to remove them all from the command line:
/usr/local/psa/admin/bin/pmm-ras --get-dump-list | egrep "name=\".*.xml" | awk -F '"' '{ print $2 }' | xargs -I {} /usr/local/psa/admin/bin/pmm-ras --verbose --debug --delete-dump --dump-specification={} --session-path=/var/log/plesk/PMMLeave a Comment
First, boot a Windows 10 or Windows Server 2019 rescue CD and enter the command prompt.
diskpart list disk select disk list part # visually check you are about # to do the right thing select part 1 delete part override select part 2 delete part override
Now continue with step 2.
Boot the gparted Live CD and move your Windows partition to the right, 250MB is usually fine, then continue with step 2.
create partition efi size=128 format quick fs=fat32 label="System" assign letter="k" create partition msr size=100 exit bcdboot C:\windows /s k: /f UEFI
That's all there is to it! Make sure to set your computer to UEFI ONLY, because it's past 2020.
1 CommentMy Xiaomi Robot (V1) just sporadically shut down after around 20 Minutes of cleaning, stating "Error 14". I looked it up, and Error 14 stands for battery malfunction.
Since i own a lot of 18650 battery packs I'm able to build my own battery from old laptop battery 18650s, so I decided to upload the pinout of the Xiaomi Charging Pad
It took about 6 months of work, and it's done: gentoo/octane 1.0 has been released.
Grab your copy here: gentoo-octane-v1.0-by-rephlex.tar.xz
It's basically a complete tarball of the system. So:
What works:
What doesn't work yet:
IF YOU HAVE THOSE PATCHES, PLEASE CONTACT ME!
If you want to donate money, my paypal is rephlex@rephlex.de 😉
2 Comments
root@SomeLinuxMachine:~# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 136.8 GiB, 146815737856 bytes, 286749488 sectors
Disk model: BD1468A4C5
Geometry: 255 heads, 63 sectors/track, 17849 cylinders
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: sgi
Device Start End Sectors Size Id Type Attrs
/dev/sdc1 2097153 278921217 276824065 132G a SGI xfs boot
/dev/sdc2 278921218 286744184 7822967 3.7G 82 Linux swap swap
/dev/sdc9 0 2097152 2097153 1G 0 SGI volhdr
/dev/sdc11 0 286744184 286744185 136.7G 6 SGI volume
root@SomeLinuxMachine:~# mount /dev/sdc1 -t ext4 /mnt
root@SomeLinuxMachine:~# cd /mnt
root@SomeLinuxMachine:/mnt# ln -s boot/linux linux
root@SomeLinuxMachine:/mnt# ln -s boot/linux vmlinux
root@SomeLinuxMachine:/mnt# cat /mnt/boot/arc.cf
linux {
image system /linux;
append "root=/dev/sdc1";
append "rw";
append "init=/sbin/init";
append "console=/dev/ttyS0";
}
root@SomeLinuxMachine:/mnt# dvhtool -d /dev/sdc --unix-to-vh /mnt/usr/lib/arcload/sash64 sash64
root@SomeLinuxMachine:/mnt# dvhtool -d /dev/sdc --unix-to-vh /mnt/boot/linux linux
root@SomeLinuxMachine:/mnt# dvhtool -d /dev/sdc --unix-to-vh /mnt/boot/arc.cf arc.cf
root@SomeLinuxMachine:/mnt# dvhtool -d /dev/sdc --print-all
----- partitions -----
Part# 0, start 2097153, blks 276824065, type XFS
Part# 1, start 278921218, blks 7822967, type Linux Swap
Part# 8, start 0, blks 2097153, type Volume Header
Part# 10, start 0, blks 286744185, type Volume
----- bootinfo -----
Root partition: 0
Swap partition: 1
Bootfile: "/unix"
----- directory entries -----
Entry #0, name "sash64", start 4, bytes 141392
Entry #1, name "linux", start 281, bytes 11429200
Entry #2, name "arc.cf", start 22604, bytes 130
root@SomeLinuxMachine:~# cd
root@SomeLinuxMachine:~# umount /mnt
root@SomeLinuxMachine:~# sync
Command Monitor. Type "exit" to return to the menu.
>> setenv SystemPartition xio(0)pci(15)scsi(0)disk(3)rdisk(0)partition(8)
>> setenv OSLoadPartition xio(0)pci(15)scsi(0)disk(3)rdisk(0)partition(8)
>> setenv OSLoadFilename linux
>> setenv OSLoader sash64
>> boot
1216+51120+768+4256+592 entry: 0xa80000005fff0000
ARCLoad version 0.5 (c) 2004-5 Stanislaw Skowronek
Loading configuration for 'linux'...
GRUB Filesystem Error FILE_NOT_FOUND: 'ArcOpen failed'
Loading xio(0)pci(15)scsi(0)disk(3)rdisk(0)partition(8)/linux...
Reading 9488032 bytes... OK.
Entering kernel.
login as: root
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Welcome to gentoo/octane 1.0!
Yesterday I encountered a customers iMac which ran crazy hot on the backside. Macs Fan Control indicated that the PSU was running on 70°C and more, and something made a buzzing sound (like a wire dangling inside a fan, which was not the case).
So I decided to set up the fans manually, the Mac now runs much cooler and still it's not too loud.
Here's my settings:
I learned that Apple did decide to "cool" the PSU by blowing the CPUs hot air onto it. Duh. So since we need to make sure the PSU does not overheat and melt your display panels LED strips on the right side, we set the CPU fan speed in relation to the PSU temperature. We want the PSU to be 40°C – 53°C. The CPU temperature will also stay in this healthy temperature range.
Download Macs Fan Control on the dev's website, on github, or from my local mirror (v4.1.12).
7 CommentsIn case you are a Linux user unsuccessfully trying to connect to your IPMI/LOM Console using IcedTea / OpenJDK 8 or newer, you will likely run into this error.
You know, because if you're a major hardware vendor selling expensive enterprise class servers, you don't care about your IPMI hardware once you sold it.
Here's how to fix the issue on the client side:
Find the java.security file. In my case it is located in /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
Then find the row
jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
Comment it out, copy it, delete the word "MD5".
1 Commentjdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024
Leave a Commentssh -f user@gatewayserver.com -L 2000:internalserver:25 -N
search no further.
ss -tulpen | grep 2000