diaspore:/etc # aha --version
Ansi Html Adapter Version 0.4.9.0
diaspore:/etc # aha --version | grep aha
diaspore:/etc # aha --version | aha
Ansi Html Adapter Version 0.4.9.0
And the aha --help output on Mac OS X:
Ansi Html Adapter Version 0.4.8.0
aha takes SGR-colored Input and prints W3C conform HTML-Code
use: aha <options> [-f file]
aha (--help|-h|-?)
aha reads the Input from a file or stdin and writes HTML-Code to stdout
options: --black, -b: Black Background and White "standard color"
--pink, -p: Pink Background
--stylesheet, -s: Use a stylesheet instead of inline styles
--iso X, -i X: Uses ISO 8859-X instead of utf-8. X must be 1..16
--title X, -t X: Gives the html output the title "X" instead of
"stdin" or the filename
--line-fix, -l: Uses a fix for inputs using control sequences to
change the cursor position like htop. It's a hot fix,
it may not work with any program like htop. Example:
echo q | htop | aha -l > htop.htm
--word-wrap, -w: Wrap long lines in the html file. This works with
CSS3 supporting browsers as well as many older ones.
--no-header, -n: Don't include header into generated HTML,
useful for inclusion in full HTML files.
Example: aha --help | aha --black > aha-help.htm
Writes this help text to the file aha-help.htm
Copyleft Alexander Matthes aka Ziz 2015
zizsdl@googlemail.comhttp://ziz.delphigl.com/tool_aha.php
This application is subject to the MPL or LGPL.
–jeroen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Reason? Want to show the output of this as the last boot sequence line:
hostname ip route
echo
ip address | grep -w 'UP\|flags\|inet\|inet6'
echo more detailed info through "ip address" and "ip route"
cat /etc/resolv.conf | grep nameserver
Note this works only when the VMs have VMware Tools installed (more on that below):
VMWare provides, not surprisingly, a built in tool for this, vmrun. It’s under /Applications/VMware Fusion.app/Contents/Library/vmrun although it has moved around in other Fusion releases a bit.
🍺 vmrun list Total running VMs: 1 .docker/machine/machines/myvm.vmx
🍺 vmrun getGuestIPAddress ~/.docker/machine/machines/myvm.vmx 172.16.213.128
Based on the above path, I added this to my ~/.bash_profile file:
alias vmrun='/Applications/VMware\ Fusion.app/Contents/Library/vmrun'
alias vmrun-list-running-VMs='vmrun list | grep vmx'
vmrun-list-ipv4-of-running-VMs()
{
vmrun-list-running-VMs | while read line ; do echo $line && vmrun getGuestIPAddress $line; done
}
Now I can do this:
$ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx Error: The VMware Tools are not running in the virtual machine: /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx 172.16.172.134 /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx 172.16.172.134 /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.142
These are the messages I observed:
Error: The VMware Tools are not running in the virtual machine: /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address 172.16.172.135
The logic for copying the files is in the update_vc_libs function. The calling do_update function updates a lot more, including the firmware. So I wrote a quick pull request to just download the userland binaries:
Feature SKIP_FIRMWARE for #220: forces SKIP_KERNEL=1 and also skip the kernel.img files and the kernel modules: This effectively only installs the userland and SDK.
cd /root/bin
wget https://raw.githubusercontent.com/jpluimers/rpi-update/5a2ec0bc552436d58127cc20e3791cb5b90fd5ba/rpi-update
chmod +x rpi-update
SKIP_FIRMWARE=1 UPDATE_SELF=0 ./rpi-update
You should see this when updating:
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** We're running for the first time
*** Backing up files (this will take a few minutes)
*** Remove old firmware backup
*** As requested, not updating firmware and kernel modules
This update bumps to rpi-4.4.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144087
##############################################################
*** Downloading specific firmware revision (this will take a few minutes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 168 0 168 0 0 361 0 --:--:-- --:--:-- --:--:-- 362
100 51.2M 100 51.2M 0 0 1246k 0 0:00:42 0:00:42 --:--:-- 1446k
*** As requested, not updating firmware and kernel
*** As requested, not updating firmware and kernel modules
*** Updating VideoCore libraries
*** Using HardFP libraries
*** Updating SDK
*** Running ldconfig
*** Storing current firmware revision
*** Deleting downloaded files
*** Syncing changes to disk
*** If no errors appeared, your firmware was successfully updated to 818a860cf690d64c62d3227ad9c36d5867a671c2
*** A reboot is needed to activate the new firmware
And the final goal of checking the firmware version now works:
# LD_LIBRARY_PATH=/opt/vc/lib /opt/vc/bin/vcgencmd version
Jul 15 2016 17:50:10
Copyright (c) 2012 Broadcom
version efa728fef77ea14ceb1500caf0146395fa282a0f (clean) (release)
A lot of them have ready to go images, often for Tumbleweed, however none of the pages explain the below image differences hence the one-line for each:
JeOS – Just Enough Operating System (JeOS, pronounced “juice”) is a paradigm for customizing operating systems to fit the needs of a particular application such as for a software appliance.
LXQT – Qt port of the full LXDE suite; LXDE (abbreviation for Lightweight X11 Desktop Environment) is a freedesktop environment with comparatively low resource requirements.
X11 – regular X Windows System based distribution.
Since I wanted a headless system, JeOS was what I needed.
perform sudo iwlist wlan0 scan | grep ESSID scan to get a list of networks and their (E)SSID names
append the below fragment to the end of /etc/wpa_supplicant/wpa_supplicant.conf and correct the value for ssid to the ESSID (keep the double quotes around it) and psk to the password for that ESSID (also keep the double quotes around it)
performed sudo ifdown wlan0 and sudo fup wlan0 to force a WiFi connection refresh
waited 30 seconds for a DHCP address to appear in ifconfig for wlan0
Getting the local IP (actually IPs, but most hosts only have a single IP):
# OS X:
alias whatismylocalip='ifconfig | sed -En '\''s/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'\'''
# Linux:
alias whatismylocalip='ip a | sed -En '\''s/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'\'''
Their output is similar enough for the sed to work, though. Which surprised be because I didn’t know about the -E option (it lacks in the manual Linux page but it is in the Mac OS X one) which enables POSIX extended regular expressions. In Linux this is documented as -r, but -E also works.
Quick look at commands that can be used to gather hardware information such as cpu, disks, memory, partition, peripherals etc on Linux OS based systems