IBM Support

Raspberry Pi & Thoughts on Game Changing Technology

How To


Summary

The Raspberry Pi has been out since ~2012 but it is now taken a little for granted.
We need to remember it was a shock at the time and got people thinking wider.
This article was put together in 2012 and was viewed by 35647 people on DeveloperWorks.

Objective

Nigels Banner

Steps


 It was my birthday on Saturday and by pure luck my Raspberry Pi was delivered the day before - what a great day "hacking" (in the old sense of the word). I have been waiting for a few months for this delivery - What a treat!!  If you have not heard of this credit size computer before here is the back ground.
The Problem
In the UK, school information technology education has been pitifully reduced to Microsoft Word, Excel and Powerpoint. My own kids came home badly depressed as they started the classes as they knew far more than the teacher and were accused of cheating because they knew how to "cut'n'paste' !!  These lessons are not the way to develop the next generation of technologists, designers, developers and inventors.  So the Cambridge University set up the Raspberry Pi Foundation (see http://www.raspberrypi.org/about for more details) to make a small, cheap computer for every school kid to really learn about how computers actually work, writing programs, games and applications with the simple to Python as the educational language.
The Solution
So they designed the Raspberry Pi computer with:
  • ARM 11 CPU at 700 MHz combined with 256 MB of RAM as a "system on a chip" from the guys Broadcom.
  • HDMI, Video-S, USB and Ethernet connectors.
  • Runs from a mobile phone micro-USB charger.
  • With connectors to allow extension boards for sensors and controllers.
  • Good graphics engine capable of 1080p high definition movies.
  • Runs a number Linux OS and possibly Android in the future.
  • More information from http://www.raspberrypi.org/faqs
Here is mine on the kitchen table:
pie

Lust and Ideas
I looked at the specification and decided I just had to have one of these and especially as it is only around £25. Although meant for education I was think I could use one for Internet access in the kitchen, run a website, backup DNS server for the computer room, then there is ..... well you get the picture at these prices and functionally it opens the door to all sorts of new ideas - it's game changing and makes you think.
Coming to market
It was fun to watch this device come to market as the team generously shared progress. Then there was a series of "excellent mistakes" - perhaps you have not heard that term? But it comes from a very highly recommended book:
  • The Adventures of Johnny Bunko: The Last Career Guide You'll Ever Need by Daniel H. Pink.
  • "Excellent mistakes" are a very good thing and to be encouraged to make sure you are really trying - and one of the five rules this Manga comic explains very cleverly.
The team announced they would make an big announcement at 6 am that Friday - a classic Internet mistake:
  • The Raspberry Pi website down for 2 to 3 hours and very slow for many more hours.
  • It announced that the computers would be made available by electronics distributors: RS Components and Element-14.
  • OK, so you have to place your order there but the website hit rate took both their websites down for hours and hours.
  • When you eventually get the website to respond, you find you have to "register your interest" & they will tell you when to order (when stock arrives).
  • Both had at least 100,000 registering in first 24 hours!
Of course, every one was surprised by the interest level, which was expected to be a few hundred engineering samples. The distributors then decided they had better get the computers pass the CE electronics safe and radiation approval (starting 200,000 radio stations in the UK could be a real problem).  So the team set about getting CE Approved  and they did a fantastic job in a short time too.  They said there was one heart stopping moment when it failed to carry on running packets back and forth over the Ethernet - until they found it was the CE approved Ethernet switch on the desk that had failed!!
Then we had to patiently wait as the manufacturer ramped up production and the distributors work through the back log of orders.
Up and Running on the First Attempt
So I plug in the USB keyboard & mouse, Ethernet, and HDMI to a screens DVI (also tested the Video-S output to my TV). Downloaded the Debian Linux "Squeeze" release for ARM and burnt it to the 8GB SD card and applied the micro-USB power cable . Here's my set-up:
cable pie

Note: the Microsoft mouse - they do make good mice :-)
You get the usual Linux start up messages and a login prompt in 24 seconds. Once you login typing "startx" gets you to a X Windows GUI. This is very impressive. There is a web browser called Midori that works well but you do notice it is a little slow due to the 700 MHz processor (the same as my mobile phone but, of course, that has a tiny screen) and does not have any advanced plug-ins (yet).  The user can't go mad with just 256 MB of memory so don't open up lots of browser Tabs.  This points out how complex a lot of web pages are these days with active rubbish like adverts and pointless movies at every corner. Another thing I noticed is how much better Linux is at interesting screen savers than Windows - it does show a lot more original thinking.
Give Back
This project is about education and inspiring the next generation, so what could I quickly do to add some value?
nmon for Raspberry Pi - for performance monitoring
Well, I do call myself "mr_nmon" on Twitter for a reason, so the first task was compiling up the latest Nigel's performance MONitor (version 14g)  - this might help developers understand the machine resources and help in some code optimising projects too.  I downloaded the code from my Source-forge site for nmon for Linux (http://nmon.sourceforge.net), then downloaded the Linux development library for ncurses and linked in the header file for ncurses.h and nmon compiled with zero issues and it all works too.  That is what Linux is all about - compatibility across hardware platforms. I have already uploaded the binary to Source-forge for others to download and just use. Then just for a laugh I tried the Debian command to look for nmon in the online repository and "blow me down" it is there but an older (not recommended version 13g): sudo apt-get install nmon - now I have to work out how to get that upgraded to the latest. Any one got an idea on how?
nweb for Raspberry Pi for a working tiny web server example
Next I thought I would compile and test up my tiny website server, which is used as a good way to learn how a webserver works by looking at the actual source code in C to get the basics working. The server only covers static pages and images but does include creating a daemon process disconnected to the user context that started it and lots of safety checks for a security plus logging.  This comes to just 200 lines of code and there is an article on DeveloperWorks (http://www.ibm.com/developerworks/systems/library/es-nweb/index.html). So I got the newly updated nweb code to the Raspberry Pi, compiled it and it just worked.  The compile command was: cc nweb.c and to run it was: sudo ./a.out 80 /home/pi  Then if you have a index.html file ready, you can remotely browse to the right IP address/hostname and see the webpage. I will have to get the new code on the nweb web page and the Raspberry Pi binary version available to others to learn the web server basics.  I have actually used nweb for real too, as it does not suffer with endless setup and configuration - it is just one binary file and its simplicity means security.
Here is nmon running:
pie and nmon

Great fun with new Game Changing technology :-)
Then I got to thinking - full marks to the Raspberry Pi team, designers, manufactures, distributors and user community this is the beginning of something remarkable with 100's of project sparked off from this device. I will keenly watch the project and help were I can.
But IBM does some pretty cool technology too but it is very easy to take it for granted because much of it has been available for some time. Our POWER and AIX technology are another opportunity to think about making the most of the features and functions to maximise the benefits for us.
I gave a talk about IBM technology at the Norway Technical Event and quickly knocked up the below list of some of the POWER and AIX technology I use a lot and regularly talk about to customers.  The questions for customers are:
  •  "All these features are available to you and where created by IBM due to customer demand for
    1. reducing computing costs,
    2. saving administrators time,
    3. increasing flexibility and
    4. faster response to new user requirements.
  • If you are using these technologies - full marks.  
  • If not, do you have a clear reason why not?"

In no particular order:
  • AMS - Active Memory Sharing to page memory between Logical Partitions on a demand basis which optimises memory use and reduces memory requirements to increase performance or run more LPARs from the same amount of memory.
  • AMD - Active Memory Deduplication the new AMS feature that find and removes identical memory pages thus release GBs of memory for better increased performance or more LPARs. You will be amazed at the duplication in memory this finds and eliminates.
  • LPM - Live Partition Mobility the "killer app" and one that every customer should be using. We need to upgrade system firmware for new RAS features and performance updates but no one likes shutting down down LPARs to do this. LPM lets you move thecomplete LPARs to other machines while they are running plus load levelling workloads between machines, quickly getting new hardware into production and moving work between generations of server.
  • AME - Active Memory Expansion to compress memory pages so that we have more programs and data in memory for faster performance or freeing up memory to run further work and Logical Partitions.
  • AIX 6 - well this should be the minimum now that AIX 5.3 requires the payment for Extended Support or it is not supported at all. AIX 6 and 7 includes the three functions below that you should be using or carefully considering:
  • RBAC - Roll based Access Control to provide better access to specific function for specific resources for administrators without the use of home ground tools and scripts and old fashioned tools like sudo.
  • WPAR - Workload Partitions, which are there to reduce system admin time by reducing the number of copies of AIX you are running plus application encapsulation for monitoring and control, rapid environment creation of a new application (3 minutes), separated system security at applications level (using RBAC), Live Application Mobility - simple to move an application to a different AIX for load balancing & evacuation and reduced memory use as a default WPAR take only 65MB of memory.
  • Encrypted JFS2 filesystem - the title says it all but these can be set up and file system, directory of file level and allows you to make it impossible for even the root user to read the data as the admin guys may not be in the trusted team.
  • "aixpert" command that in a single step will security harden your AIX system for production work and can remove the need for home grown scripts and man-power to boost security. There are also profiles for banking requirements like SOX COBIT and PCI standards.
  • SSP2 - Shared Storage Pools for VIOS admin to allocate and connect disk space to VIOS client LPARs in a few seconds and they are LPM ready too. Why wait days or weeks for you SAN team to do this while your users wait and wait.  This also makes  Thin Provisioning available on disks that don't support this. Comes free with VIOS.
  • ASO - Active Systems Optimiser which monitors running multi-threaded processes on larger LPARs and makes changes to improve their CPU and memory affinity to increase performance. Comes free with AIX7 only (at the moment).
  • PowerHA - High Availability or what us "old guys" still call HACMP for automated recovery from machine failures in minutes and across sites.
  • ITM - IBM Tivoli Monitoring for a fully function performance monitoring and data analysis tool including historic data and trend analysis for all IBM's systems and for POWER this means HMC, VIOS, AIX, IBM i and Linux on POWER including a aggregated machine view. There is a browser based portal for you to decide every possible statistic that you want to see or graph and how it is displayed and a report generator.
  • Ganglia - If you have not gone for ITM then you need some tool for the whole machine view and this one is a favourite of mine for low impact but high value data collection, historic data and online graphing.  This free to use open source tool and is very powerful and very simple to extend for your text or numeric data which is automatically graphed. When thinking about a getting nmon data from all the LPARs of a machine to report whole machine data - I came across Ganglia and decided it was way better than anything I could develop and its was already available. Michael Perzl, an IBMer, has improved it for POWER centric data.
  •  WPAR Manager - If you are using Workload Partition then WPAR Manager is a must once you have a more than a few dozen and it also comes with the Live Application Mobility
  •  Profile Manager - This plug-in lets you manager the performance and security settings for hundreds of AIX and find where someone has changes settings via simple reports.
  • SSD - Solid State Drives was voted top out of my ten technologies that will be "business as normal" in 5 years time (voted in 2010). The speed of the drives is shocking and we are on the 3rd generation of devices already and the cost has been drastically reduced. Put it this way, my brand new Thinkpad is exactly the same speed as the previous generation but buying a SSD (from my own pocket) gave me an immediate performance boost - the same is true to disk I/O on large servers.
  • FCoCEE - Fibre Channel over Converged Enhanced Ethernet is the technology that merges FC SAN and Ethernet Networks thus reducing the number of adapters, cables and switch ports by half and halving the costs too. By reducing the number of components, this actually increases reliability too!  Less parts means less to fail.
  • Performance Advisors - these are the new freely downloadable simple tools that capture configuration and statistics and then recommend any changes and the reasons why in a XML file viewable via your browser. This can be used as a quick way of sanity checking many VIOS, AIX LPARs and Java settings.
  • Pure Virtual - this is my term for using virtual networks and virtual disks as the default. This breaks locking your virtual machine (LPAR) to the physical hardware. Your OS is then only using simple virtual devise drivers.  Then the hard work of set-up and configuring physical devices and dual pathing is performance once in the Virtual I/O Server and not with every single client VM.  This is also the foundation for LPM.
  • Open Source - lots of these applications are available for AIX and can be very useful addition to your other tools.  Some open source tools actually come with AIX like DNS (named), sendmail,  perl and more. There are 100's more out there to fill the gap in your tool set, functions and applications. IBM runs the AIX Toolbox for Linux applications where you can download them pre-compiled for AIX but also worth checking out and often more up to date is Michael Perzl's website at http://perzl.org
  • CHARM - CEC Hot Add and Repair Maintenance is where the machine is not stopped while it is changed by a customer engineer (CE). This can take some planning and organising but means less downtime and a quicker repair or additional hardware.  Don't forget LPM is an alternative that can allow the evacuation of a machine so it can be taken down for maintenance or upgrade work.
  • DLPAR - Dynamic Logical Partitions is an older technology from POWER4 days but easy to forget how powerful it is. We can online change the number of physical CPUs, logical CPU Entitlement or virtual CPU numbers, the physical or logical memory in an LPAR, or add/remove the physical or virtual adapter slots.
  • PowerSC - This is the "new kid on the block" but increasing popular. A bit of a toolbox of parts which are: Trusted Logging - takes the syslog via the vSCSI link to the VIOS for security logging, Trusted Boot - to ensure no tampering of the boot image, Trusted Network Connect - to ensure all LPARs on a virtual network have a minimal AIX version to stop weak links in security, Security Compliance Automation - see the Profile Manager above and the new Trusted Firewall so we don't need to use external firewalls for demilitarised zones within a machine.
So here is the challenge - Are we all making the most from available technology or
are missing out on opportunities due previously badly thought-out decisions or not thinking about it at all!

    Additional Information


    Other places to find content from Nigel Griffiths IBM (retired)

    Document Location

    Worldwide

    [{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"HW1W1","label":"Power -\u003EPowerLinux"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

    Document Information

    Modified date:
    14 June 2023

    UID

    ibm11125339