7-Zip benchmark on Raspberry Pi

The 7-Zip Benchmark command

7zip

Measures speed of the CPU and checks RAM for errors.

You can install 7-Zip from the Raspbian Desktop – this is how:

  • Click on the Raspberry in the top left of your screen:
  • Go down to “Preferences” –> and click on “Add / Remove Software”:
  • When the new window opens, type “p7zip” in the search box and hit enter
  • Click both of the checkboxes for “p7zip” (they should be the last 2 choices)

You can also install 7-Zip from the command line:

sudo apt-get install p7zip

Syntax

b [number_of_iterations] [-mmt{N}] [-md{N}] [-mm={Method}]

There are two tests:

  1. Compressing with LZMA method
  2. Decompressing with LZMA method

The benchmark shows a rating in MIPS (million instructions per second). The rating value is calculated from the measured CPU speed and it is normalized with results of Intel Core 2 CPU with multi-threading option switched off. So if you have Intel Core 2 Duo, rating values must be close to real CPU frequency.

You can change the upper dictionary size to increase memory usage by -md{N} switch. Also, you can change the number of threads by -mmt{N} switch.

The Dict column shows the dictionary size. For example, 21 means 2^21 = 2 MB.

The Usage column shows the percentage of time the processor is working. It’s normalized for a one-thread load. For example, 180% CPU Usage for 2 threads can mean that average CPU usage is about 90% for each thread.

The R / U column shows the rating normalized for 100% of CPU usage. That column shows the performance of one average CPU thread.

Avr shows averages for different dictionary sizes.

Tot shows averages of the compression and decompression ratings.

Compression speed and rating strongly depend on memory (RAM) latency.

Decompression speed and rating strongly depend on the integer performance of the CPU. For example, the Intel Pentium 4 has big branch misprediction penalty (which is an effect of its long pipeline) and pretty slow multiply and shift operations. So, the Pentium 4 has pretty low decompressing ratings.

You can run a CRC calculation benchmark by specifying -mm=crc. That test shows the speed of CRC calculation in MB/s. The first column shows the size of the block. The next column shows the speed of CRC calculation for one thread. The other columns are results for multi-threaded CRC calculation.

With -mm=* switch you can run a complex benchmark. It tests hash calculation methods, compression and encryption codecs of 7-Zip. Note that the tests of LZMA have a big weight in “total” results. And the results are normalized with AMD K8 CPU in a complex benchmark.

Examples:

#Runs the benchmark once - takes about 75 seconds on my
#Raspberry Pi 3B+ so please be patient...
7zr b
#You can run and save the output to a file if you wish
#You will not see it running this time while the benchmark
#is running - again please be patient for about 75 seconds
7zr b > 7zip-basic-benchmark-example.txt
#To view the output later or to share it with others
cat 7zip-basic-benchmark-example.txt
#Runs the benchmark twice and give you an average of the
#2 tests - this takes about 150 seconds for this test
7zr b ; 7zr b
#Runs the complete 7-zip benchmark - please be patient...
#There is more information @ http://www.single-board.com 
7zr b -mm=*
#Runs the benchmark 30 times and gives you an average
#This test takes a very long time on the Raspberry Pi
#Watch my YouTube video to see all the cores working on
#Conky - and I am using SimpleScreenRecorder and 
#Asciinema to record everything your seeing today.
7zr b 30
Asciinema
Asciinema

Click here for a direct link to the Asciicast in a new window.

To learn how to install Asciinema click here.

Here is the Asciicast:

NOTE: first 70 seconds don’t show anything as I was showing how to install 7-Zip through the Raspberry Pi GUI. You can see that in the YouTube video below.

To watch this YouTube video of the whole process in a new window, click here.

SimpleScreenRecorder
Simple Screen Recorder

Otherwise, click on the video below and enjoy!

NOTE 1:

I use several different software programs and hardware at the same time in this video. This is a culmination of hardware and software that I have used in my previous Asciicast, blogs, and videos. If you want to ask me specific questions I am always available via email, just be patient 🙂

NOTE 2:

If you are interested in testing Single Board Computers like I am, you might just want to head over to “Performance Analysis Methodology” and read what is there. It is very interesting and worth the time if you’re serious about accurate results and not just a stack of data.

Conky Desktop Widget for Raspberry Pi

So what is Conky? Conky is a free, light-weight system monitor for X, that displays any kind of information on your desktop and works on Raspberry Pi. It is highly configurable and is able to monitor many system variables including the status of the CPU, memory, swap space, disk storage, temperatures, processes, and much more.

Features:

Conky can display more than 300 built-in objects, including support for:

  • A plethora of OS stats (uname, uptime, CPU usagemem usage, disk usage, “top” like process stats, and network monitoring, just to name a few).
  • Built-in IMAP and POP3 support.
  • Built-in support for many popular music players (MPDXMMS2BMPxAudacious).
  • Can be extended using built-in Lua support, or any of your own scripts and programs (more).
  • Built-in Imlib2 and Cairo bindings for arbitrary drawing with Lua (more).
  • Runs on Linux, FreeBSD, OpenBSD, DragonFlyBSD, NetBSD, Solaris, Haiku OS, and macOS and much much more.

There is a great installation guide over at Nova Spirit Tech. I have copied it for your convenience below.

How to Install Conky:

I am sorry to say that there is no GUI install for Conky so we are going to have it install it from the command line. Open a terminal window and copy and paste the BLUE CODE below:

sudo apt-get install conky -y

Now download the conky configuration file

wget -O /home/pi/.conkyrc https://raw.githubusercontent.com/novaspirit/rpi_conky/master/rpi3_conkyrc

To autostart conky on boot we will need to create 2 files:

1. will be a shell script to delay the boot process of conky.

2. will be the conky desktop files to allow lxdesktop to start the shell script

To create the shell script

sudo nano /usr/bin/conky.sh

Paste this into the conky.sh file

#!/bin/sh
(sleep 4s && conky) &
exit 0

Now create the conky.desktop file for the autostart process

sudo nano /etc/xdg/autostart/conky.desktop

Then paste this into the file

[Desktop Entry]
Name=conky
Type=Application
Exec=sh /usr/bin/conky.sh
Terminal=false
Comment=system monitoring tool.
Categories=Utility;

The last thing to do is to reboot to make sure everything is working. As you can see from the following picture it is!

I have included the video below for your step by step installation. In the above picture, I installed it on my Raspberry Pi 3B+. In the video below I installed it on my Raspberry Pi Zero WH.

New version of Raspbian is now available

New distribution images for the Raspberry Pi operating system, Raspbian, are available. The latest version includes bug fixes, security updates, and new features.

Raspbian-only version.

Raspbian

 

 

NOOBS (Raspbian and More) version.

NOOBS

 

 

I have listed the patch notes below, and BOLDED the ones  found of interest:

  • In startup wizard, assign keyboard to a country as per Debian installer recommendations
  • In startup wizard, add an option to use US keyboard in preference to country-specific option
  • In startup wizard, show IP address on the first page
  • In startup wizard, check for existing wifi network connection and show it if there is one
  • In startup wizard, install language support packages for LibreOffice and other applications
  • In startup wizard, improve operation with keyboard only and no mouse
  • Password change in Raspberry Pi Configuration and startup wizard now works properly if passwords contain shell characters
  • Battery indicator plugin modified to cope with Pi-top hardware monitor crashing
  • Networking plugin hides wifi password characters by default
  • In Scratch 2 GPIO plugin, set pin from a dropdown list rather than free text
  • In Scratch 2 SenseHAT plugin, swap x and y-axis values for the LED array
  • Include the latest Adobe Flash player (31.0.0.108)
  • Include latest RealVNC Server (6.3.1)
  • Include libav-tools
  • Include ssh-import-id
  • Removed Mathematica (made the download image smaller and can be installed later if the user needs it)
  • Merge in the latest third-party code for Bluetooth ALSA interface
  • Add ability to prevent software update changing configuration files, by creating ~/.config/.lock file
  • Various other small bug fixes, tweaks, and changes to text
  • Make dhcpcd work with 3G devices
  • Add hw acceleration to ffmpeg
  • Improved WiFi-BT coexistence parameters
  • Run fake-hwclock before systemd-fsck-root
  • Raspberry Pi PoE HAT support
  • Linux kernel 4.14.71
  • Raspberry Pi firmware 5b49caa17e91d0e64024380119ad739bb201c674

I installed the latest version of NOOBS today on my Raspberry Pi Zero WH with fantastic results. I will be installing everything on it like I have shown you in past videos and posts and expect one here very soon.

gPodder works well on Raspberry Pi

If you listen to podcasts like I do or watch regular screencasts or would like to do so in the future you should consider using gPodder. gPodder is a simple, open source podcast client written in Python using GTK+. In development since 2005 with a proven, mature codebase.

While I relax and even sometimes when I work I want to listen to something in the background. The music fits my needs most times and when it doesn’t there are Podcasts to occupy my mind and imagination. It works on Windows, macOS, Linux and even on the Raspberry Pi, quite nicely in fact.

You can create an account at http://www.gPodder.net, it’s free, and you can sync what you listen to across all of your devices. I have my work Windows system, my at home Linux Mint system and my Raspberry Pi 3B+ all synced together and running gPodder. It’s easy to install and you can watch the video below for step by step of the setup process so you can do the same. Before you know it you will also be listening to things that could capture your imagination. So let’s get started!

NOTE:
Today’s video was recorded with the RESPEAKER and SimpleScreenRecorder.

Final Thoughts:

As you can see this works very well on the Raspberry Pi. I use this software daily on many different platforms and the fact that it works so well makes it easy to recommend to all of you.

So that’s it for another blog & video. I hope you have enjoyed what your have seen. If you’re watching this video on YouTube please press the like button, if you haven’t subscribed please subscribe, and I hope to talk to you again very soon!

VYM – View Your Mind on Raspberry Pi

 

VYM (View Your Mind) is a tool to generate and manipulate maps which show your thoughts. In this video, I will show you how to install and use this incredible program on your Raspberry Pi.

I have included the completed map that I created in the YouTube video below so you can see the value of creating these kinds of Mind Maps.

Final Thoughts:

I have been drawing mind maps most of my life. Some people call it “Theory Crafting”, some people call it “Story Boarding” and they are all related somewhat in concept and design. What makes VYM, View Your Mind so useful is that it is FREE, it works very well on Raspbian and the Raspberry PI and you can share it with others. It is another program that makes the whole Raspberry Pi experience great!

Have fun installing it, using it and taking your ideas and sharing them with others in a whole new way! Catch you next week!

Audacity works very well on Raspberry Pi

Audacity is an easy-to-use, multi-track audio editor, and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. I have installed it on a Raspberry Pi 3B+ and it works very well.

Today I will show you how to install Audacity using the SimpleScreenRecorder software and the RESPEAKER. So what is Audacity & what can it do for you?

  • Recording

    Audacity can record live audio through a microphone or mixer, or digitize recordings from other media.

  • Export / Import

    Import, edit and combine sound files. Export your recordings in many different file formats, including multiple files at once.

  • Sound Quality

    Supports 16-bit, 24-bit, and 32-bit. Sample rates and formats are converted using high-quality resampling and dithering.

  • Plugins

    Support for LADSPA, LV2, Nyquist, VST, and Audio Unit effect plug-ins. Nyquist effects can be easily modified in a text editor – or you can even write your own plug-in.

  • Editing

    Easy editing with Cut, Copy, Paste and Delete. Also unlimited sequential Undo (and Redo) in the session to go back any number of steps.

  • Effects

    Real-time preview of LADSPA, LV2, VST, and Audio Unit (macOS) effects. Plug-in Manager handles plug-in installation and addition/removal of effects and generators from the menus.

  • Accessibility

    Tracks and selections can be fully manipulated using the keyboard. Large range of keyboard shortcuts.

  • Analysis

    Spectrogram view mode for visualizing and selecting frequencies. Plot Spectrum window for detailed frequency analysis.

Final Thoughts:
The setup I have created here is going to be a good foundation for future videos and tutorials. The microphone to me is a must for what I want to do and the RESEAPKER does that very well. Hopefully, future models of the Raspberry Pi will have an onboard microphone and make this setup even easier for the masses. Catch you next week!

SimpleScreenRecorder works on Raspberry Pi

SimpleScreenRecorder is a Linux program that was created to record programs and games by Maarten Baert. I have found this to work exceptionally well on the Raspberry Pi 3B+ and I wanted to show you how easy it is to install and use.

As Maarten Baert’s original goal was to create a program that was just really simple to use, featured filled and is actually a pretty powerful program. It’s ‘simple’ in the sense that it’s easier to use than most other programs because it has a straightforward user interface. Here is a direct link to SimpleScreenRecorder.

NOTE:
I am installing this across my network from my Linux Mint computer using RealVNC to my Raspberry Pi 3B+ so I can use the same SimpleScreenRecorder on the Pi. Once I have that installed on the Pi I will install another program showing you SimpleScreenRecorder being installed on it.

Additional NOTE:
Last week I installed the RESPEAKER on the Pi so that is how you will hear me on the next video. In THIS video the microphone you hear me on is on my Linux Mint computer.

So now that you know about it and all the details let us get to it with the installation. This is going to be fun!

For those that wanted a more close up of the control panels here is a .gif I Googled on the Internet.

Final thoughts:

I have tried several different programs over the years that do screen recordings. I find this one not only the easiest to use but the Simple fact that it works so wonderfully well on the Raspberry Pi is perfect. Give this a try and I think you will be not only very surprised but happy as well. -=Enjoy=-

ReSpeaker 4-Mic Array for the Raspberry Pi

Today’s project is a ReSpeaker 4-Mic Array for the Raspberry Pi. It is a quad-microphone expansion board designed for AI and voice applications. This means that we can build a more powerful and flexible voice product that integrates Amazon Alexa Voice Service, Google Assistant, and so on.

The Respeaker comes assembled and easily fits onto any Raspberry Pi provided that the header is already installed to it.

Mount ReSpeaker 4-Mic Array on Raspberry Pi, make sure that the pins are properly aligned when stacking the ReSpeaker 4-Mic Array for Raspberry Pi.

Note: Hot-plugging ReSpeaker is not allowed. It will damage the respeaker.

Install driver

The AC108 codec is not supported by Pi kernel builds currently, we have to build it manually.

sudo apt-get update
sudo apt-get upgrade
git clone https://github.com/respeaker/seeed-voicecard.git
cd seeed-voicecard
sudo ./install.sh
reboot

  • Step 3. Then select the headphone jack on Raspberry Pi for audio output:

sudo raspi-config
# Select 7 Advanced Options
# Select A4 Audio
# Select 1 Force 3.5mm (‘headphone’) jack
# Select Finish

BONUS: Play with APA102 LEDs

Each on-board APA102 LED has an additional driver chip. The driver chip takes care of receiving the desired color via its input lines and then holding this color until a new command is received.

  • Step 1. Activate SPI:
    • sudo raspi-config
    • Go to “Interfacing Options”
    • Go to “SPI”
    • Enable SPI
    • Exit the tool
  • Step 2. Get APA102 LEDs Library and examples

pi@raspberrypi:~ $ cd /home/pi
pi@raspberrypi:~ $ git clone https://github.com/respeaker/4mics_hat.git
pi@raspberrypi:~ $ cd /home/pi/4mics_hat
pi@raspberrypi:~/4mics_hat $ sudo apt install python-virtualenv 
pi@raspberrypi:~/4mics_hat $ virtualenv –system-site-packages ~/env 
pi@raspberrypi:~/4mics_hat $ source ~/env/bin/activate 
(env) pi@raspberrypi:~/4mics_hat $ pip install spidev gpiozero

  • Step 3. Then run the example code under virtualenv, now we can see the LEDs blink like Google Assistant.

(env) pi@raspberrypi:~/4mics_hat $ python pixels_demo.py

There is a LOT more you can do with this board but I will leave that for you to discover. There is a great WiKi on this over at the Seeed Studio website.

The main reason for me wanting to install the Respeaker is that there are two programs that I used on a regular basis that require a microphone to work and this is the perfect solution for my needs. Those programs are:

Both are easy to install and I will show you how to install both of these in a future video.

Final Thoughts:

The Respeaker is a great add-on for the Raspberry Pi. It is expensive but it has a lot to offer. For all of my future projects, this seems for now to be a good choice. See you next week!

How to secure your Raspberry Pi board [Tutorial]

There is a great Raspberry Pi tutorial where you will learn to secure your Raspberry Pi. You will also learn to implement and enable the security features to make the Pi secure. This article is an excerpt from the book, Internet of Things with Raspberry Pi 3, written by Maneesh Rao. I give credit where it is due and this is what I wanted to share with all of you. Worth the time to read.

Secure Your Raspberry Pi
Secure Your Raspberry Pi

You can read all about it here.

Raspbian update makes things even better…

Hello everyone!

I just received my new Raspberry Pi from the folks over at the Pi Hut and could not wait to get it installed on my bench and see all of the new improvements that have come out with the latest version of Raspbian.

As always, when you get a new pie you should always put it on your DINrPlate so it is not going to make a mess shorting out on anything that you have lying around on your test bench.

The Raspberry Pi 3B+ came in a simple package that was easy to open and allowed me fast access to my latest diversion. I have been waiting 3 months to get to this new board and the wait was well worth it!

Top side of the new Raspberry Pi 3B+

Bottom side of the Raspberry Pi 3B+

So once I have it installed on the plate above I went to go fetch the latest version of Raspbian. They are always making changes to it making the install process easier and easier for beginners. If you have been waiting for a time to get started with the Raspberry Pi and found the installation process frustrating you might just want to take another crack at it again. Much easier and straight forward now.

First this you want to do is go download the lastest version of NOOBS, that is what I did as a .zip file, and then unzip it on your local system.

Once you have it unzipped you can copy over the contents of that zip file over to your newly formatted SD card. Once you have done that, take it to your Raspberry Pi and then boot it up.

When you first boot up you will see the following screen with only 2 options until you get your Wi-Fi going.

Click on the Wi_Fi icon and log onto one of your local networks.

Once you have done that you will have many more choices for what you can install. In my case I wanted Raspbian so that is what I selected.

Once you have done that, go get a cup of coffee/tea and sit back, this is going to take a few minutes.

When done it will prompt you with OK. I don’t know why people have to include the OK button… just get on with it already!

Once you have clicked OK your Raspberry Pi will reboot and take you to the new start up screens.

Set everything to your local area…

Change your password!! This is w WAY overdue step in the process. I am so glad that they added this! This will make the whole Raspberry Pi Community a better place as we will all be more secure. In my opinion this should have been a mandatory step since day one. But I digress…

Then you will be prompted to sign onto a Wi-Fi network if you did not pick one during the installation process. Another much needed step in this process!

Enter your password…

When your connected to the Internet you can then check for updates for your Raspberry Pi. Another much needed step!

When all done you should get the following message telling you your up to date. Always a good thing!

At this point your Raspberry Pi is now setup and ready for you to use. Time for another reboot to get everything all set. Remember, at this time you can go into your Raspi-Config and make changes. I turned on VNC and SSH. I am always on the PI via one or both of those from my main PC.

I also wanted to take the time to let all of you know that even though the new Raspberry Pi 3B+ is more power efficient than all of the previous models it still at peek usage consume MORE power. So I am using a 5v 3a power supply that terminates in a barrel jack. I then use a barrel jack to micro USB converter to power the Raspberry Pi 3B+. I figures that a picture would also help explain it. Want to make sure that power is not a problem!

ok, now that we have rebooted and we are back on the desktop you can click on the Raspberry Icon and open up your applications menu.

You can then navigate down to “preferences” and to “recommended software”.

As you can see there are “all programs” you can select or you can pick other things like “games” or “programming”.

If you do not see what your looking for, and I didn’t, you can also go to “preferences” and “add/remove software”. This will most likely still be the way I do things as I find it has a better selection (for now).

When you open that up you can type in the search box for something that your interested in installing on your PI.

Or, you can select a category, I selected Games, and you can see games that you can install.

I didn’t want to install any games at this time but I did want to listen to some mp3’s that I have on my phone on the Raspberry Pi 3B+. So I typed “vlc” in the search box and behold VLC showed up as one of my choices. So I installed it!

Installation is easy, only takes a few seconds to maybe a minute depending on your Internet speed…

When completed you have a new category on your main menu for your new program! Easy Peasy!

In some cases you will want to install a program that will not install when you try either of the ways I listed above. The Phoronix Test Suite is one of those such programs. It is listed in the add/remove software section but it will not install that way. I am not sure if it is a bug but I have tried it many times on many versions with zero success that way.

I HAVE had success bu going to the Phoronix website though!

Select the Debian package and download that…

Once downloaded go ahead and double click on it…

Your Raspberry Pi 3B+ will ask you if you wish to install it…

If you say yes you will be prompted for your password. When you changed it you committed it to memory or wrote it down somewhere right?

Just like VLC it will take a moment to install it and then you will have a new group with an icon for you to use your new program!

With this new version of Raspbian for NOOBS it has never been to easy to setup a Raspberry Pi 3B+ (and previous versions of Pi). I will go into more depth with Phoronix and VLC in future posts. I just wanted to get this post out there so you can start to configure your Raspberry Pi’s as well.

FINAL THOUGHTS:

I look forward to putting the Raspberry Pi 3B+ through it’s paces and explore many projects with it. I have been working on getting a lot of items together for future regular posts. The rest of this year is going to be great! Catch you real soon 🙂