emergency reboot a hung Linux host

Sometimes you need something that can kick a host a bit harder than the standard reboot command. Even if you include the -f switch to force, a hung task can prevent your host from rebooting.

Try this – first enable the sysrq setting, then trigger. Your host should reboot immediately.

sudo echo 1 > /proc/sys/kernel/sysrq
sudo echo b > /proc/sysrq-trigger

Note : This is effectively a hard reset which does not cleanly shut services or tasks down. You may need to check your disk on some operating systems.

HEVC media optimization

Do you have a large collection of video media files not using HEVC (H265) yet? There is a massive amount of disk space coming your way if you flick over to the new video codec format.

HEVC definitely lives up to its name, for most media you can expect a 70% or more disk savings from transcoding from an old codec. There are some catches though… If you want your TV to play it direct (i.e. straight off the file) the codec will need to be supported by it. You can of course get around this by using a media server such as Plex or Emby which will transcode from HEVC back to a compatible format.

Why would you transcode to HEVC? – again, disk space. HEVC as stated above can reduced you Media footprint significantly. You could boost your quality and save your disk space at the same time by recording at a higher resolution then applying the HEVC codec.

I created a powershell script to transcode my media to HEVC using my AMD graphics card. The advantage of doing this is that transcoding completed by my GPU is significantly faster than my CPU. I do not have the graphics card in my media server, so instead connect via SMB and let my gaming machine run the transcoding from remote…

The powershell script uses ffmpeg to ;

  • transcodes video stream to hevc using AMD h/w encoder
  • copys all existing audio and subtitles (i.e. no conversion)
  • works in batches (to prevent constant scanning of files) – able to set max batch size and processing time before re-scanning disk
  • overwrites source with new HEVC transcode if move_file = 1 (WARNING this is default!)
  • checks to see if video codec is already HEVC (if so, skips)
  • writes transcode.log for successful transcode (duration and space savings)
  • writes skip.log for already hevc and failed transcodes (used to skip in next loop, errors in transcode.log)

Check here for updates and script – https://github.com/dwtaylornz/hevcamdwin

Solar – In Summer

Power generation is up in summer :)

The last stat “Total Power (1M-7d)” gives me a view of how much power was generated over a 30 day period 7 days ago (so i can tell if power generation as an average is going up or down). Right now it power generation this on a downward trend.

(see previous post for winter generation)

Solar – modifications complete

Two recent modifications to my solar system have changed the daily generated power considerably.

First section highlighted above – i added the ATS and 24/7 load (this server)

Second section highlighted above – moving the 6 panels from east and west to north facing roof. (only reason i didn’t do this initially is north facing roof is a lot higher and i hate heights!)

Copper wire gauge and max amps

Do not skimp on your wiring across your solar installation. Pushing too many amps across a wire that is too small can cause fires and short your installation – this is dangerous!

A rightly sized wire reduces resistance and can assist with reducing voltage drop.

For example, in my system i have a 1000W inverter attached to my 24v battery. If i’m pulling 1000W, then amps 1000W / 24V = 41.67A. Meaning i should be using a 6 gauge wire (see below) between my battery and inverter.

Solar panels can be attached in series to increase their voltage, this is one method for reducing amps over the wire. But, keep in mind that if you raise the voltage you will need a way to reduce it back down to match the voltage of your battery. i.e. in most cases it would be best to utilize a MPPT solar controller to automatically convert the power from your solar panels to you battery.

As a GUIDE to maximum amps across a copper wire ;

  • 14-gauge wire: 15 amps
  • 12-gauge wire: 20 amps
  • 10-gauge wire: 30 amps
  • 8-gauge wire: 40 amps
  • 6-gauge wire: 55 amps
  • 4-gauge wire: 70 amps
  • 3-gauge wire: 85 amps
  • 2-gauge wire: 95 amps

Note : length of wire also determines its resistance. I have not covered it here, but if running wires over large distances you will also require a lower (fatter) gauge wire. Try to keep high amp loads across short distances. i.e. keep your inverter near your batteries.