Thursday, 1 November 2018

Linux cgroups Resource Constraints

Linux cgroups (control groups) have been around for a long time providing varioius functions for resource management and the ability to segregate workloads with their own constraints. cgroups have provided the basis for container engines such as docker that has become so aggressively adopted in enterprises over the last few years.

cgroups are enabled on all contemporary linuxes with systemd being the API to manage them; the system will manage various cgroups organised in:
  • slices - see systemd-cgls where we will typically see system services under the system slice users services, including the segregation for user sessions in another. Encapsulates scopes and services.
  • scopes - parent for a logical grouping of units/services which can be managed (killed/stop/resource managed)
  • services - logical grouping that provides a service, such as the sshd, that are usual started based on configuration in unit files

But how can cgroup and resource controls be useful for a developer?

Sunday, 14 October 2018

VMware Player 12.x with 4.18.x kernels / Fedora 28

A Fedora 26 to Fedora 28 upgrade (with its 4.18.x kernel) broke VMware Player 12.5.7. However upgrading to the newer (14.x or 15.x) versions didn't work so how to fix?

Saturday, 29 September 2018

Fedora 28: fixing mpv and libOpenCl.so.1: no version info and hardware acceleration

One of the great benefits of Linux is that it can run on a whole host of legacy components and still perform well. Re-purposing an old Dell E520 with a 32bit Intel Core2 Duo cpu, a PCI via vt6321a based IDE raid card, for Fedora 28 install was straight forward until we started to look at hardware accelerated mpv for watching movies files: libOpenCL.so.1: no version information available (required by /lib/libavfilter.so...

Sunday, 23 September 2018

Fedora: bonding over ethernet and wifi devices finally works

Bonding network interfaces for a laptop is a useful feature allowing you to keep the same IP as you switch between a ethernet or wifi connection. However when I last tried this with Fedora26/network manager 1.8 this wasn't a s success.

With the Fedora 28 release with network manager 1.10.10, it is now possibe to create a bond over an ethernet and wifi device

Tuesday, 28 August 2018

Backing up an RPi SD and shrinking the disk image

There are numerous tutorials on how to resize/shrinking media but they typically advise using gparted for the task; whilst gparted is a great tool, it can fail with obscure error messages when trying to shrink partitions. This is how we can do this the old fashioned way.

Saturday, 14 July 2018

RPi and iTunes <-> IOS app for music

After finally setting up Kodi to use a DAC mounted on Raspberry Pi for controlling/serving my music controlled by an IOS device, I re-discovered that IOS devices, via the Apple iTunes remote, can control remote iTunes.

But how's that help?

Sunday, 1 July 2018

Kodi and DACs from a RPI to an amplifier

There are a number of options to connect a Raspberry Pi to an stereo amplier but one option is to use a DAC hat card such as an IQAudio DAC with RCA jacks. With the hardware in place it's all about the software to library/index/serve your music and to provide a pleasant user experience to select/queue/control your music - this typically means to control your music via a IOS-based smartphone/tablet.

Sunday, 17 June 2018

What's preventing spindown of disks on RPI?

I have a RPi3 with an external USB hardddisk attached which appeared to be not to be spinning down although the setup (via hdparm was correct. But how to determine what was the cause of activity to the disk?

Sunday, 22 April 2018

Nikkor 24mm f/2.8 AI-S Disassembly

The Nikkor 24mm f/2.8 AI-S is a lens from the late 70s but shares its optical formula with its predecesors (pre-AI and AI) and successor (AF-D). The AI-S is also quite common and as such appears on ebay frequently in various conditions.



The 24mm f/2.8 AI-S lens is reasonably simple to disassemble and teardown with the only complication being the CRC unit at the rear.

Sunday, 8 April 2018

ffmpeg and Nvidia GTX hardware encoding

ffmpeg video processing on an old linux/machine, like a i7 860, running Fedora26 can be painful if you only rely on the CPU. With a recent Nvidia card supporting NVENC (GeForce 6/7/8/10.x) ffmpeg can be compiled directly to support these cards.

Saturday, 10 February 2018

Another Well Regarded Legacy: Nikkor 28mm f/2.8 AI-S

The 28mm f/2.8 AI-S is a well regarded lens from the early 1980s that is still available new today. But what's the point of this compared to, say a 24-70mm f/2.8 zoom? And how does it fair for use as a walk-about or an environmental portrait lenses at/near wide open (f/2.8..f/5.6) apertures?


28mm f/2.8 AI-S

Saturday, 2 December 2017

How to distinguish AI and AI-S lenses

The old time manual Nikkors from circa 1977 had the designation of an AI lens and then sometime leading into 1981 the AI-S lenses replaced the AI; both AI and AI-S lenses will fit onto all modern day Nikon F-mount bodies with no issues and the lens are functionally identical.

With the release of the AI-S lenses however, there were some subtle changes external to the lens: the primary reason for AI-S was to use enable cameras to use program or shutter priority modes - this was important for the upcoming release of cameras with this function at the time and the AI-S lenses were designed to facilitate this. With this said, the lenses that had a AI and then an AI-S counterpart were typically optically identical.



But why does this matter to be able to distinguish between an AI vs AI-S lens, if the optical formulas were the same?

Saturday, 25 November 2017

Going Long: Nikkor 200mm f/4 AI

A 200mm can be a useful focal length in the bag, albiet a less frequently used length. However the modern and autofocusing xx-200mm zooms are heavy and expensive and therefore options to satisfy the 200mm can be better sourced from the legacy Nikkor AI/AIS catalog.



Sunday, 12 November 2017

Going Wide(ish): Nikkor 20mm f/3.5 AI

The circa 1980 Nikkor 20mm f/3.5 AI lens comes with a reputation for being flare resistant and reasonably sharp as well as being very lightweight.



Nikon have failed to produce a (effective) wide and lightweight prime for their DX systems and the 20mm f/3.5 AI can potentially fill this gap (giving a 35mm equivalent FOV of 30mm) with the added benefit that the lens would not overlap with any 24-70mm focal lengths.

Wednesday, 19 July 2017

Upgrading Synology DS209 storage

As with all storage, there comes a time where you exhaust the storage and you need to move up. After many years of service, the disks in my Synology NAS need to upgraded and we'll see how we can repurpose the existing disks - but as you'd expect, there's a few bumps to be aware along the way.


Sunday, 18 June 2017

Orico USB3.0 enclosure inactivity/disconnect fix

Many hardware (especially cheap) vendors will sell the same product but replace and gut the internal electronics. This makes finding compatible/previously successful devices a PITA. One such recent example is a cheap Orico external USB 3.0 enclosure for 2.5" harddisks that is readily available on place such as Amazon.

Wednesday, 15 February 2017

Smallest hostap RPi setup

The original 2011 Raspberry Pi model B (rev1) with its 256MB is dwarfed by it's younger siblings now but this can still be used a very cost effective board for projects such as a portable wifi access point.



Whilst this use case is nothing new, trying to create an access point with the smallest SD card sizes can cause a few problems.

Sunday, 12 February 2017

Simple Web monitor/maintanence for RPi

Basic maintanence and monitoring for your RPi can obviously be achieved by ssh into the machine but sometimes there needs to be an easier way.



Saturday, 4 February 2017

RPi: bonding network interfaces

One of the big advantages of the Raspberry Pi is that it's form factor makes it so portable; I can have a RPi moved around the home depending on what I need at the time but it does mean I need to worry about which network interface is available to the RPi without having to log into the RPi, reconfigure to/from wifi to/from ethernet etc..



Friday, 30 December 2016

Setting up a RPi Zero

After jumping on the Raspberry Pi bandwagon, I wondered what could be done with the smallest/stripped down version of the RPi, the RPi Zero.



But with many things, theres always hurdles to overcome.