Friday, February 21, 2020

An Introduction To Docker



Introduction to Docker for Capture the Flag Challenges

Tonight whilst daily exercising  (situps) I noticed 2 fantastical videos from LiveOverflow

These two 12 minute each videos cut out the waffle and actually explain with real command line examples what is going on with docker


There is a lot to unpack in these videos == an awfully large number of situps for me -)

Docker?
For over 20 years  (well it is actually 30 years if I count my time as IBM VM operating system specialist, er or about 45 years as I just remember my use of VSPC ... yikes )  I've been a passionate supporter and preacher of the advantages of the Virtual Machine (VM)

Essentially you can take your computer running an Operating System, and create inside it a separate environment that runs a VM.  And that VM can run typically another Operating System  (OS), or even a clone of itself. Example computer running Linux, with a VM running Windows.

Docker is a much more lightweight construction and takes correspondingly a fraction of the resource.  You could just run one thing, like a Webserver process in it, and it's lean-ness  means many dockers to one even modest machine.

So first, watch the above video.







How Docker Works


And now this the second.   You are going to need to know the shortcut keys for stop  (space)  resume (space)   back10s (j)  in YouTube

How refreshing it is to see a set of videos with real facts and examples  (not just marketing speak and waffle). LiveOverflow!  .. do subscribe.


In Praise of Amazon Warehouse



When I buy anything from Amazon, which today is almost a daily occurrence ...

I always check Amazon Warehouse first

Why Amazon Warehouse

Amazon has a very tolerant returns policy.   This means many perfectly fine goods are sent back, because the buyer just did not like them.

These goods and others end up at Amazon Warehouse.  If the goods are marked in some way this is mentioned in the sale.  Usually it is packaging damage (who cares!) or perhaps some minor blemish, presumably by the careless previous buyer.

Why bother?   Well because you can get >20% discount on non trivial items.

For example my OnePlus 6T was bought from the Amazon Warehouse at a >> 20% discount.   I talked about that here

The above 250GB M2 SATA drive is about 44 GBP from Amazon.  But I paid about 35 GBP, that is a saving of just over 20%


And if I don't like the item, just like a regular order, I can send it back.  Something you just can't easily do on other second hand marketplaces like Facebook Marketplace or Shpock.

So Please and pretty please,  always check Amazon Warehouse before you buy something.   You will not only save big time, but in reusing the item you choose, you help to recycle.   The World, the Environment and your wallet will thank you.


https://www.amazon.co.uk/Amazon-Warehouse-Deals/b?ie=UTF8&node=3581866031




Thursday, February 20, 2020

MemTest86: When Old Skool Is Still Cool


So I have waited just over 12 hours, but I am happy to report that the first iteration of the classic, old skool memory test program

MemTest86

just completed in 12 hours showing no errors.


Take Me Back

These days many Operating Systems have an inbuilt memory diagnostic.  Windows Server for example has ..



But it tells you nothing about what it is doing, it is not either mysterious or magical, just annoying.

Why a Memory Test
I'm reconfiguring my workstation and it was time to check that the memory was still in perfect condition.

RAM memory errors can lead to several mysterious system errors, normally always including Disk Corruption, but not necessarily an OS crash.   If the faulty memory is small enough, and this is likely even on a PC with say only  16GB memory, then the OS may be sitting in good RAM,  with the Disk Cache that typically takes up any spare RAM getting into a state of corruption.

MemTest86

To my knowledge there is no program that performs a more complete memory test of your Intel computer system.  And it shows you in glorious detail progress along the way.  I downloaded it from here and then used Rufus to write it to a key, then change my UEFI BIOS to boot from that key exceptionally



 I don't remember this fancy graphical start screen




What!  There is mouse support and a menu.  Wow, this is different to what I remember





Just one tiny problem...   This program takes an absolute age to run.  But hey, it is doing the best job ever .  So ...

Things to Do whilst MemTest86 runs

 An hour of exercise



The neighbours cat arrived and we played


We sat and watched the Fully Charged article on the new Electric Mustang






I walked the grounds and surveyed some of the Dennis storm  damage.


Summary

MemTest86 is the most comprehensive memory testing tool that I know.  But this diligence takes time, a lot of time.





Links
MemTest86
WMD and doh!


Wednesday, February 19, 2020

Being Always Ready



I'd like to start with a wonderful extract from my favourite US Comedian: Chris Rock. He's a clever situational humourist drawing on some real life lessons that he has learnt.  He joked that he /always keeps a bag by the door/ in case the real [white] owner of his house comes back.

And so this article pays homage to this idea.

My theory is like this

Some of us have had hard lives.  Situations that we will never fully recover from.  And whilst on the surface we might seem normal, at some very low level we are always ready.   Ready to fight the bully,  or change from mild mannered Clark Kent into something stronger.    Perhaps if you were subjected to

- Prolonged Racism

- Childhood Rape

- A loveless Childhood

- Childhood without Parents

- Prolonged Physical Violence / Torture

- Prolonged Mental Violence

- Prolonged Sexism

- Prolonged Isolation / DeSocialisation

- Prolonged Poverty


- A sustained environment of Fear and Violence

I don't mean a single incident, though this could be life changing.  I mean abuse that covers not just months, but usually years.

Like I say, whatever your present rosy situation,  your present state of great health and great wealth, the smallest circumstance can transport you back to ready and on-guard.

So if ever you get to know these individuals and learn and share their secrets,  keep their behaviours in mind.   For behind the smiling face, we, I mean they, are already ready.  Ready to Defend.







Good Book

Tuesday, February 18, 2020

When Things Fall Into Place



The The: This Was The Day

#WhenThingsFallIntoPlace





The above may not look like much but it the result of hours of technical fiddling.   What you see is a laptop running Elemental OS  (a Linux that looks a little like macOS) successfully talking to the Interweb via either a Wired Interface or via 2.4 Ghz WiFi


Nothing special you might think, but this is only a 60 GBP Laptop.

Remember all that endeavour about the One Laptop Per Child  OLPC, the quest was to produce something basic for about 100 USD.    Well here I'm typing on a laptop costing that much, which is instead: lightweight, running Linux, and looking almost as stylish as a 1000 USD macBook Air (well at least from a distance!!)


Complacency and Intolerance
I had a self critical Eureka moment this evening when I thought to chastise myself  about my anger that my latest project, that above, was taking time and effort to get right

This is a 60 GBP laptop I had to remind myself

I can remember that a few decades ago getting something like this working right would be a challenge, not a reason for anger and despondency.

Where did that invincible, can make it work spirit evaporate to?

Now so much older, do I have the right to expect that things will just work, out of the box

Not at this price point I can tell you!


The Secret Sauce

So here are some of the confidential factors that will help you achieve the impossible or certainly the improbable

- Keep Going  
Well it means that you keep going until you drop.    Taking a break at the first sign of stress, no don't do that.

Work till you can't think straight, then stop and pick it up tomorrow

- A Friend
Your technical friend will listen carefully and in the process of explaining it to them you may realise the flaw in your design/implementation/compilation/plan

Either that or your more intelligent friend will genuinely solve the problem(s) for you

- Single Tasking
It means what it says.  Concentrate on one problem not many.  focus

- Google
Who else had the same problem before.  And what did they do

- Alternatives
In my case,  I'm building the fastest system with limited resources.  But there are many Operating System Choices.  Don't get hung up on the one, just to prove you are right, if another will do the job more excellently, and work (better)

- Document
It means write down digitally or electronically your progress.  Because otherwise next day you will be sorry.  Nobody has perfect recall when you work until your (brain) stops.

- Coffee
Coffee helps sharpen the mind,  Alcohol has the reverse effect.  Take the former not the latter

- Wholesome Food
Eating processed junk food does not work (for me) past 48 hours.  Far better to eat something simple.  I would always say yes to Porridge or Lentils





And with that ...  




Smug Mode On

Monday, February 17, 2020

A Sex Education



60 seconds

I was already in like with Sex Education the UK TV series, but then when they started playing Devo, they had me hook line and sinker.



The Plot
The first series follows the story of Otis Milburn, a socially awkward teenager, who is ambivalent about sex, despite, or perhaps because of, his mother being a sex therapist who is frank about all aspects of sexuality. After inadvertently assisting the school bully with his sexual performance anxiety, Otis sets up a sex advice business with Maeve, a confident but troubled classmate, to educate their fellow students in how to deal with their own sexual problems.

Teenage angst is always a winning plot line to me

Oh, and the effect of Parents on their children.  Shaping their behaviours and characters inappropriately in many cases, something that can take a lifetime to unwind.

So yes, it's a teen comedy, with some famous names,  controlling parents,  sex,  adolescent problems.

And all set in an uncharacteristically dry part of England, shot like it was in some sunny part of America, with bright skies, and large houses, and trailer parks   (yep, surely not shot in the UK!!)

I laughed, and left the series a wiser man indeed.  Relationships are never easy, at any age.



Sunday, February 16, 2020

Remotely Turn Me On



The Tubes: Turn Me On

As I moaned just yesterday,  my excellent and capable Dell T5400 workstation is still not sold.  So today I thought I'd finally investigate remote startup and formally use it as my remote test system.



Why Remote Startup (and Shutdown)

Simply put you might have a computer at home that you'd like access to away from the home.

Rather than leave it on all the time, wouldn't it be great if you could turn it on remotely.

For Marcus and Agata in our (very) small home in England we located many electronic items in our DMG  (Demilitarised Garage), freeing up needed space in the house.  So for us remote startup might simply be power on that computer which is a few hundred metres away.


Then there is the power consumption tack.  This computers peak power usage is about 200 Watts.  Lets keep our electrical bills lower by only having it on when required.



The Teckin Power Switch Method




We predominantly use Teckin WiFi controller power switches in our UK home and external buildings.


At the time of writing a single plug is available from Amazon UK for less than 10 GBP

As supplied you buy these plugs and control them using the SmartLife application, however if you are serious about Home Automation I would recommend looking at my article about Tasmota instead.  (NB: This is a massive undertaking and for us involved setting up a local and alternate Home Automation product called Domoticz, so the easy way to get started is SmartLife )

Once the Power Switch is setup you can power on your computer remotely and then I use Microsoft Remote Desktop to gain remote access to the screen and keyboard of the remote computer

Other good and free remote access products are available of course and I'd mention VNC whose protocol is used by many vendors, RealVNC is just one example

BIOS Settings


 This is the key setting.  In other words if the power switch turns on the power to the plugged in computer then the computer will start




But Also


Instead of powering up at will a poor version of this would be to set the computer to automatically startup at a particular time each day.

Given the first solution, i.e. configure the computer to power on when power is applied to the plug, this is in every way an inferior solution.  I'm including it here for completeness only, and in the case you decide / refuse to spend the money on the Teckin plug!






Magic Packet LAN Powerup
(Method 2)

The second mechanism to turn on the computer remotely is to use a program to send the LAN card a special message.  It is known as  Wake on LAN  (WOL)

This amazingly dates back to 1996 and you can read more about the protocol here 



NirSoft Wake on Lan

Nirsoft makes an established bit of software enabling you to send this special WOL message to your remote computer.   The remote computer is essential powered off, but you have configured the BIOS as above so in fact the LAN card is waiting for this special message.  When received it will send a signal to the Computer's motherboard to fully power on.   Marvellous


You run the NirSoft program whilst your remote computer is up.  It makes a record of all computers that it sees.  Now shut your remote computer down.

Start Nirsoft again and then you can click on the computer, Dell for us and F8 to send the WOL packet

As if by magic the system turns on.

Comparisons
If you just want to power on the computer on your home network that is distant from you then either method works well.

Of course if you want to power on the computer whilst away from the home, example, thousands of km away whilst on holiday you would

a) use the Teckin method
b) Configure a firewall so that the Remote Desktop Port is available from the Internet.

(b) is beyond the scope of this article, but aside from configuring the firewall to allow this port thru there are some extra security considerations so that you are not bombarded by people trying to illegally hack/ break into your system.



Summary
I've shown 2 mechanisms for you to remotely turn on your computer.  Until it is sold my Dell T5400 computer is now on standby in the Cave, and I can remote power it on, then logon to use it as my test system.  Fantastic!

Saturday, February 15, 2020

What Price Second Hand


This is not exactly an advert, I'd say more of a case study. 

For over 6 months now I've been selling of 40 items on a variety of online selling platforms.  I will name Facebook Marketplace and Shpock as two.

Many items have sold, but some of the larger non trivial ones have not!

This then is my grumpy analysis of Why the Hell Not?


Case Study

I am still attempting to sell a powerful Dell Computer


T5400 Workstation
2 Xeon CPUs
16GB RAM
64GB Boot SSD
1 TB Data Disk
Extremely strong, heavy, bullet proof case
DVD Drive, Lots of USB Ports
Fanless Dual DVI-D Graphics












The facts are then

- Advertised in multiple places
- Clear and clean advert
- Multiple pictures
- Drum Roll: Price is less than 250 GBP

I am basically totally at a loss why it cannot be sold.  Your can't buy a new desktop with a fraction of this power and specification for the price.

The case alone, something that would probably survive a Nuclear blast, plus the strong power supply are worth over 100 GBP.

Honestly speechless.

So it brings me to mind my Conclusions

- Today we are surely at peak manufacturing.  Stuff is available at low low prices, forcing the price of second hand goods down to ridiculously low prices

- Buyers just want to buy new!

- I suppose buyers may think 'I don't have time to fart about looking for second hand'.  Instead I will just blindly go to Amazon.

Actually there are real savings to be made for only a small time outlay, but I think buyers have really been sold on Amazon and the like.   They may not even consider second hand platforms

- Buyers get seduced with free postage.  But Amazon do free postage I hear buyers telling me.   Unfortunately I asked Royal Mail, they keep wanting to charge me

- Buyers are right to be sceptical of the online, somewhat scumbag marketplace.   Not Marcus of course, but tainted by the brush, and this low level seems to correspondingly attract the worst types of low life buyer too

- There is no good secure payments system for Buyers.  Actually there is pretty much only PayPal and Marcus the buyer who myself may have recently been scammed is about to find out exactly how good PayPal is at giving me back money.   I am not optimistic :-(


So there you have it.   Advertised for 6 months plus.   No buyers, not even timewasters.   People just want new, etcetera.




Friday, February 14, 2020

My Darling Valentine 2020



Dear  Partner, Wife, and today Valentine.    

Simply the best thing that ever happened to me.







Windows Server 2019 Bluetooth Keyboard Support



As of this Tuesday I had only one working Drevo Bluetooth keyboard working on my Windows Server 2019.  And now I have 3!

Further analysis has solved the mysteries.   Let us continue:


Bus Limitations

For the last few months I've experienced keyboard slowdowns on my Windows 2019 server system.  I have noticed that these slowdowns don't affect Bluetooth devices and therefore resolved to switch Keyboard and Mouse to Bluetooth operation.

But as I documented here, getting a keyboard to work seemed almost impossible

First I have got to the bottom of the slowdowns.  Since November 2019 I upgraded my server adding possibly the last NVMe disks.  This means a potential thruput over over 5000 MB/second and possibly as fast as 10,000 MB/second during disk copy operations.

I've now found that during the daily backup cycles, managed by SyncBack, the sheer speed of data copies causes keyboard devices on the USB busses to stall.

Clearly I'm reaching the architectural limits of this server and take note of this that any future expansion designed to improve speed of operation might compromise general usability

BlueTooth Support

And now I've also got to the bottom of Bluetooth Keyboard support under Windows Server 2019

Bluetooth 3.0 keyboards are not supported

Specialist non generic Bluetoon 4.0 / BTLE keyboards may fail also

I now tested 6, Bluetooth 3.0 keyboards and none of them can connect to the Windows Server 2019.   I also tried using 4 different Bluetooth Hardware enablers.  A lot of testing and nothing worked!

Also the Microsoft Modern keyboard, although it uses BTLE connection has some special smarts on the keyboard, like a fingerprint reader, and since that driver can't be downloaded separately (for Windows 2019 server) it can't make a working connection



What is Working then?

- Drevo Calibur

- Rapoo 9300M

- Logitech MX Keys


Logitech MX Keys







Here is what you need to know




- The cost is about 100 GBP from Amazon

- For this price I expected fancy packaging and was not disappointed

- This is a rechargeable keyboard with a USB C charge plug

- There is a keyboard backlight with a sensor.  really fancy

- Keys are silent.   No noise! cf any mechanical keyboard 

- Keys have nice dimples

- Keys are clearly marked,  I can read them!!

- Dedicated cursor and page up/down/home/end keys.  For me a deal breaker.  I don't care how beautiful and well connected a keyboard is, must have these dedicated keys






- Logitech Options application  (install fine under Windows Server, allows mapping of many keys to start an application, or a dedicated Windows function.  Brilliant

- The only negative for me is that the relative small size of the left shift key has me accidentally pressing the caps lock, but I see from the Options program that I could disable it.


In Summary
My Supermicro based hardware running Windows 2019 Server now somewhat stalls USB devices under extreme Disk load.

The answer was to switch keyboard to Bluetooth, now supported under Server 2019

However your keyboard needs to connect using Bluetooth 4.0, 3.0 does not work

From the working keyboards I selected  I'm most pleased with the Logitech MX Keys keyboard.  It's pretty expensive at 100 GBP, but it's solid with many useful features.  A real quality product.