Wednesday, December 22, 2021

SimH simulating a PDP-11 with two ethernet Adapters: One for DECnet and one for TCP/IP on PDP-11/93 RSX-11M-PLUS Version 4.6 Base level 87 (QBUS, 2 x DEQNA) - SYSGEN NETGEN IPGEN log / terminal sessions

I have been playing around with a SimH PDP-11/24 running RSX-11M-Plus 4.6 from 2016. A fairly complete installation with DECnet networking, BASIC PLUS 2, DIBOL, PASCAL, C AND COBOL language support, it was nonetheless missing TCP/IP connectivity. This month I finally got around to giving it a refresh, upgrading to a PDP-11/93 (the fastest QBUS PDP-11) with dual network adapters and a DPV11 line for DDCMP. (SimH support for DPV11 is, however, currently a work in progress; hopefully a future version of SimH will incorporate complete DPV11 support to allow some fun with DDCMP without having to switch to UNIBUS machine).

Thanks to the efforts of others, I did not have to reinstall RSX from grounds up once again. A fully configured PDP-11/70 including BQTCP and lots of software is available for download at www.rsx11m.com (look for the links saying "Download PiDP-11 DU0 RSX11M+ V4.6 w/ BQ TCP/IP" and "Download PiDP-11 DU1 containg RSX Sig Tapes"). This distribution, itself based on the PiDP-11 project distribution, is perfect for starting off a UNIBUS PDP-11/70 machine ripe for SYSGEN/NETGEN/IPGEN into whatever PDP-11 model one desires.

The following SYSGEN, NETGEN and IPGEN phases were performed on a fresh install of the downloaded and configured PDP-11/70. LB:[1,2]LOGIN.TXT in the logs below still show "PiDP-11/70 PiDP11" and was corrected later on.

SYSGEN

SYSGEN does not allow for more than one ethernet adapter. The NETGEN procedure, however, does allow dual network adapters. For SYSGEN, the answer is 1 for this question:

>;   XE:    controller:  DEUNA
>;
>; The Digital Equipment UNIBUS Network Adapter (DEUNA) is a data
>; communications controller used to interface PDP-11 family computers
>; to the Ethernet local area network.
>;
>* CP8504  How many DEUNA Ethernet controllers do you have? [O R:0-1 D:0]: 1




NETGEN

In NETGEN, we get to specify two network adapters. We also do not bring up QNA-1 automatically because QNA-1 will not have DECnet on it, only TCP/IP as we specify during the IPGEN phase next.

>* 01.00 Device Driver Process name [<RET>=Done] [S R:0-3]: QNA
>* 02.00 How many QNA controllers are there [D R:1.-2. D:1.]: 2
>* 02.01 Are all QNAs installed at the same device priority [D=N]? [Y/N]: Y
>* 02.02 What is the QNA device priority [O R:4-6 D:5]:
>;
>* 03.01 CSR address for QNA-0 [O R:160000-177777 D:174440]: 174440
>* 03.02 Vector address for QNA-0 [O R:0-774 D:120]: 120
>;
>* 04.07 Set the state for QNA-0 ON when loading the network [D=N]? [Y/N]: Y
>;
>* 03.01 CSR address for QNA-1 [O R:160000-177777 D:174460]: 174460
>* 03.02 Vector address for QNA-1 [O R:0-774 D:130]:
>;
>* 04.07 Set the state for QNA-1 ON when loading the network [D=N]? [Y/N]: N



IPGEN (BQTCP)

The documentation included with his BQTCP distribution is impeccable. Once a second adapter dedicated to TCP/IP was available (QNA-1 in this case), IPGEN wasn't difficult to execute at all.


Saturday, December 18, 2021

DEC VAX/VMS 3.5 with DECnet Phase IV networking (DECnet-VAX V3.0, VMS V3.5): Revisiting "VAX/VMS Version V3.5 17-NOV-1983 16:21"

 

DEC VAX-11/780 mainframe running VAX/VMS Version V3.5 with DECnet-VAX V3.0,  VMS V3.5

With substantial hand-holding by the folks at HECnet,  I managed to bring up a SimH VAX-11/780 running ancient VAX/VMS version 3.5 with DECnet Phase-IV networking running over Ethernet, learning a few things on the way.

The only two media really needed are (a) VAX/VMS 3.5 installation tape "BB-D782F-BE" and (b) DECnet license installation medium "BE-X083A-BE_-_DECNET-VAX_FULL_FUNCTION_V3.1" containing "NETRTG031.A". While exploring the latter, I learned about TU58 DECtape II, a "random-access, fixed-length-block, mass-storage tape system" from October of 1978 that "uses preformatted tape cartridges which store 262 kilobytes of data in 512-byte blocks" accessible "in a fashion similar to data stored on disks or DECtape". "A file-oriented structure is easily implemented in an operating system by setting aside several blocks on the tape to store a directory", which means its a tape that works like a very slow tiny 262 kb hard-disk!

  VAX/VMS Version V3.5 17-NOV-1983 16:21

Just to make installation simpler, I copied the installation files from both media onto a RD54 159MB Winchester hard disk using another SimH VAX. The installation session captured below uses that hard disk instead of two separate tape and TU58 media. (The installation files are also available from the FAL area of the installed VAX/VMS 3.5 node XXXV {31.42} accessible over HECnet.) It is of course possible to perform the same installation from VAX/VMS 3.5 distribution tape attached to MSA0: and DECnet license TU58 attached to TDC0:.

$ dir xxxv::
Directory XXXV::SYS$SYSDEVICE:[DECNET]
EDTCAI.SAV;1        EDTCAI1.SAV;1       LIBRARY.;1          NETACP35.EXE;1
NETRTG031.A;2       NETRTG040.A;1       NETSERVER.LOG;14    NETSERVER.LOG;13
NETSERVER.LOG;12    OPTIONAL.;1         REQUIRED.;1         VMSOPT.SAV;1
Total of 12 files.

"DECnet-VAX V3.0,  VMS V3.5" is somewhat unusual, even a little buggy. The DECnet configurator command file SYS$MANAGER:NETCONFIG.COM presents a choice of node address from the range of 1 through 1023 indicating a DECnet Phase-III implementation, but it happily accepts a Phase-IV <area>.<node> format address with no complaints:

What do you want your DECnet address to be?    [1-1023]: 31.42

This is despite support for Phase-IV style areas in the Executor characteristics. The executor can be configured with MAXIMUM AREA set to its maximum 63 with no complaints either, indicating full support of Phase-IV. Another quirk is that NCP HELP SET shows a list devoid of any SET MAXIMUM AREA, although that command works fine.

NCP>SHOW EXEC CHAR


Node Volatile Characteristics as of 18-DEC-2021 18:12:04

Executor node = 31.42 (XXXV)

Identification           = DECnet-VAX V3.0,  VMS V3.5
Management version       = V4.0.0
Incoming timer           = 45
Outgoing timer           = 45
NSP version              = V3.2.0
Maximum links            = 32
Delay factor             = 80
Delay weight             = 5
Inactivity timer         = 60
Retransmit factor        = 10
Routing version          = V2.0.0
Type                     = routing IV
Routing timer            = 600
Broadcast routing timer  = 40
Maximum address          = 1023
Maximum circuits         = 16
Maximum cost             = 1022
Maximum hops             = 30
Maximum visits           = 63
Maximum area             = 63
Max broadcast nonrouters = 64
Max broadcast routers    = 32
Area maximum cost        = 1022
Area maximum hops        = 30
Maximum buffers          = 100
Buffer size              = 576
Nonprivileged user id    = DECNET
Default access           = incoming and outgoing
Pipeline quota           = 1200

However, the DECnet implementation is clearly buggy in a negative way for DDCMP links. It does not send the Area part of it's Phase-IV address to its DDCMP peer (just sends 42 instead of 31.42). The DDCMP circuit DMC-0 for this installation had to be turned off to avoid a continuous series of operator messages as the DDCMP circuit repeatedly tries to establish adjacency using only half of the DECnet address.

It would appear the stock DECnet that shipped with VAX/VMS V3.5 was Phase-III only, and the License / Patch NETRTG031 bumps it up to DECnet Phase-IV but they forgot to upgrade and test DDCMP code as well with the patch. As a result, the patch works fine with Ethernet circuits but is broken for DDCMP circuits.

Here is the terminal session log of installation on a SimH-emulated VAX 11/780 of the ancient but very capable VAX/VMS 3.5 operating system with DECnet Phase-IV. It includes the SimH configuration file vax780.ini. A tarball of the experimental SimH instance is available for download from my gopher server or dropbox.

Thursday, December 2, 2021

RT-11 on PDP-11/45 Adventures: Running SYSGEN

DEC PDP-11/45
DEC PDP-11/45, picture from www.pdp-11.nl

So I stumbled my way through running SYSGEN for Digital Equipment Corp's DEC RT-11 operating system on a SimH PDP-11/45. Here is the full session log, with  no attempt at removing the mistakes made.


Saturday, November 27, 2021

Hacking TOPS-10 for 4 Lines of DUP11


DEC DUP-11 communications card

Jotting this down, "recipe" thanks to kind souls (initials of RLA and RV probably show up in the recipe execution) ... to be wrapped up over time ...



Thursday, November 25, 2021

Running MONGEN for TOPS-10 on PDP-10 KS10

PDP-10 KS10 TOPS-20 with DECnet and ANF-10 networking on DUP11 DUP0 and DUP1 lines
PDP-10 KS10 TOPS-20 with DECnet and ANF-10 networking on DUP11 DUP0 and DUP1 lines

With the help of a kind friend, I managed to change the node-name and DECnet address of a TOPS-10 7.04 (GALAXY version 5.1) SimH-emulated PDP-10 KS10 by running MONGEN. I need to preserve the session for future reference, especially the questions and answers/responses. Hence this post.

I learned from the friend that MONGEN saves responses in [10,7,MON]BUILD.MIC and it is useful to save a copy of this file with the filename <nodename>.MIC for future reference. This makes it very easy to replicate the configuration on other KS10 installations.

I also learned that on TOPS-10 the directory [1,4] is SYS:, [1,5] is NEW: and [1,3] is OLD:. The convention is to put “experimental” programs in [1,5], "production" programs in [1,4] and old versions in [1,3].  Experimental programs in NEW: ([1,5]) should be moved after testing to SYS: ([1,4]). This includes the monitor, which is typically named SYSTEM.EXE. Using "expect" and "send" keywords, the SimH emulator allows selection of the monitor to boot at the "BOOT>" prompt. Examples are:

To boot the default monitor [1,4]SYSTEM.EXE:
expect "BOOT>" send "\r"

Or, we can specify the monitor and the location to boot, as in these examples:

expect "BOOT>" send "[1,4]SYSTEM\r"

expect "BOOT>" send "[1,5]SYS2\r"

expect "BOOT>" send "[1,5]SYSTEM\r"

The manual for running MONGEN on KL and KS TOPS-10 systems is on bitsavers (TOPS-10 Software Installation Guide AA-PS12C-TB).  It "provides the site administrator, system manager, system programmer, or software specialist with the information required to Install the TOPS-10 software on KL and KS processors."

Here is part of the session log from when I built a new monitor with the updated DECnet node name and address. This monitor supports two DUP lines on DUP11. DUP0 connects to DECnet network and DUP1 connects to ANF-10 network.


Tuesday, November 23, 2021

SIMH VAX and PDP Emulators: Getting the maximum performance out of SET CPU IDLE and SET THROTTLE

Netdata - gigabyte-h410m.sanyalnet.lan
Netdata - gigabyte-h410m.sanyalnet.lan

I have been maintaining a zoo of emulated classic computers in my home lab (affectionately called SANYALnet Labs) for well over a decade now. Till last year everything was running on two mid-2000s Xeon-based Dell PowerEdge blade servers which I sold and replaced with a single home-built PC consisting of a 10th-generation Intel core i7 8-core 16-thread processor on a Gigabyte H410M motherboard. I then consolidated all of my SimH-emulated VAX and PDP machines onto a MX-Linux virtual machine running on top of Ubuntu 20.04 on this new PC, allocating 8 cores and 4 GB of memory to the MX-Linux virtual machine. After running many experiments with SET CPU IDLE and SET THROTTLE configuration parameters of SimH, I reached a point of satisfactory resource usage by the 20 SimH VAX and PDP machines. 

Digital Equipment Corporation DEC VAXstation-II running OpenVMS/VAX 7.3 under SIMH VAX emulator
VAXstation-II running OpenVMS/VAX 7.3 under SIMH VAX emulator

Digital Equipment Corporation DEC MicroVAX-3100/M38 running SMALLTALK on VAX/VMS 5.5-2H4 under SIMH VAX emulator
MicroVAX-3100/M38 running SMALLTALK-80 on VAX/VMS 5.5-2H4 under SIMH VAX emulator. Thanks to Mark Wickens for this awesome SIMH machine (more here)


This includes two VAX machines with graphical desktops running in Xephyr virtual X-server displays (a VAXstation-3800/m38 and a VAXstation-II).


DEC VAX servers, PDP-10 and PDP-11 mainframes emulated on MX-Linux
MX-Linux VirtualBox machine running 20 SimH VAX and PDP machines

What strikes me as remarkable after all the tweaking is that in a quiescent state of the 20 SimH VAX and PDP machines, they along with an instance of DECnet/Python  and many other Ubuntu-launched processes collectively take up just one core of the i7. Here is a typical top dump flittered on SimH machines:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND

 2964 localuser   30  10  239960 133480   2720 S  12.5   3.3 237:33.90 ./31.10_QCOCAL

21894 localuser   30  10  141516  38940   2884 S  12.5   1.0 125:40.63 ./31.15_OSTARA

24430 localuser   30  10  997148  61204  13744 S  12.5   1.5 132:22.28 ./31.38_lv_vaxstation3100m38 31.38_LV.ini

25426 localuser   30  10   61432  13452   3552 S  12.5   0.3   2:10.75 ./31.37_twonky_pdp10 31.37_TWONKY.ini

 1676 localuser   30  10  147996  19656   6632 S   6.2   0.5  63:52.29 ./31.12_juichi_pdp11 31.12_JUICHI.ini

 5104 localuser   30  10   34940   6928   2508 S   6.2   0.2 274:54.07 ./0.0_VAXVMS3.0

 5212 localuser   30  10  158236  21696   6648 S   6.2   0.5  60:15.30 ./31.28_rst101_pdp11 31.28_RST101.ini

 6536 localuser   30  10  339040  13880   4208 S   6.2   0.3  82:47.40 ./10.42.2.29_43bsd_vax 10.42.2.29_43BSD_VAX.ini

17984 localuser   30  10  306932  73160   4208 S   6.2   1.8 115:51.55 ./10.42.2.28_openbsd_vax 10.42.2.28_OPENBSD_VAX.ini

21718 localuser   30  10  180388  45232   4188 S   6.2   1.1  19:03.34 ./31.36_njevx2_vax780 31.36_NJEVX2.ini

22451 localuser   30  10   18108   2664   2232 S   6.2   0.1 294:17.77 ./0.0_VAXVMS1.0

24658 localuser   30  10 1022468  51356  13800 S   6.2   1.3  28:05.32 ./31.30_vaxstn_microvax2 31.30_VAXSTN.ini

 4218 localuser   30  10   18108   4752   2276 S   0.0   0.1 252:08.74 ./0.0_VAXVMS1.5

10312 localuser   30  10  298716  79472   4360 S   0.0   2.0  96:38.62 ./10.42.2.24_netbsd_vax 10.42.2.24_NETBSD_VAX.ini

12979 localuser   30  10  155760  45328   4132 S   0.0   1.1   8:36.88 ./31.31_xliv_vax780 31.31_XLIV.ini

14559 localuser   30  10  180060  77632   4132 S   0.0   1.9   8:50.49 ./31.33_xl_vax780 31.33_XL.ini

15270 localuser   30  10  158236  21468   6644 S   0.0   0.5  52:30.82 ./31.34_nanaju_pdp11 31.34_NANAJU.ini

19596 localuser   30  10  254140  44076   2820 S   0.0   1.1  28:15.56 ./31.11_cloudy_vax780 31.11_CLOUDY.ini

20922 localuser   30  10  180384  47036   4256 S   0.0   1.2  14:45.57 ./31.35_njevx1_vax780 31.35_NJEVX1.ini

24460 localuser   30  10  254124  46476   4168 S   0.0   1.2  13:40.34 ./31.23_xlvii_vax8600 31.23_XLVII.ini


The following is a table of the current idle/throttle settings of the VAXen and PDP SimH machines. Overall, PDP-10 and PDP-11 emulators do better with throttle, especially in terms of dreaded DECnet thrashing. The VAXen do fine with idle. The following table is probably difficult to read, so here is the google docs sheet.


simh machineo/sset throttle - factor; value; SIMH host core usage (% of one 10th-gen core i10)set cpu idle; SIMH host core usage (% of one 10th-gen core i10)Throttle or Idle?simh version - New (4.x) or Legacy (3.9)?DECnet addressIP Address
vax780vax/vms 1.04x; throttle=2m; 17%idle=vms; 7%IL  
vax780vax/vms 1.54x; throttle=2m; 17%idle=vms; 7%IL  
vax780vax/vms 3.04x; throttle=2m; 17%idle=vms; 7%IL  
microvax3900netbsd/vax 8.01x; throttle=1900k; 14%idle=netbsd; 3%IN 10.42.2.24
microvax3900openbsd/vax 5.81x; throttle=1900k; 11%idle=openbsd; 3%IN 10.42.2.28
microvax390043bsd/vax quasijarus1x; throttle=1900k; 9%idle=quasijarus; 3%IN 10.42.2.29
microvax3900openvms/vax 7.31x; throttle=1900k; 17%idle=vms; 7%IL31.110.42.2.4
microvax3900openvms/vax 7.31x; throttle=1900k; 17%idle=vms; 7%IL31.1010.42.2.5
vax780openvms/vax 7.31x; throttle=500k; 4%idle=vms; 2%IN31.1110.42.2.33
pdp11 - pdp11/84rsx 11m plus1x; throttle=1560k; 4%idle; 3%TN31.12 
microvax3900ultrix 4.0/vax1x; throttle=1900k; 11%idle=ultrix; 7%IL31.1510.42.2.9
vax8600 model 8650vax/vms 4.71x; throttle=13300k; 47%idle=vms; 2%IN31.2310.42.2.27
pdp11 - pdp11/73rsts/e 10.11x; throttle=1460k; 4%idle; 3%TN31.28 
microvax2 - vaxstation IIopenvms/vax 7.31x; throttle=450k; 6% TN31.3010.42.2.30
vax780vax/vms 4.41x; throttle=500k; 4%idle=vms; 2%IN31.31 
vax780vax/vms 4.01x; throttle=500k; 4%idle=vms; 2%IN31.33 
pdp11 - pdp11/70rsx 11m plus1x; throttle=1360k; 4%idle; 3%TN31.34 
vax780openvms/vax 7.31x; throttle=500k; 4%idle=vms; 2%IN31.3510.42.2.31
vax780openvms/vax 7.31x; throttle=500k; 4%idle=vms; 2%IN31.3610.42.2.32
pdp10 - ks10tops-10 7.04net3x; throttle=5400k; 9%idle; 7%IN31.37 
microvax 3100 M38vax/vms 5.5-2h41x; throttle=1900k; 13%idle=vms; 29%TN31.38



Friday, October 15, 2021

Linux-style /etc/rc.local for HP-UX 11.11

rc.local for HP-UX 11.11 Unix

I am running HPUX 11.11 (HPUX 11i) in a QEMU parisc virtual machine for a couple years now, as described here. It uses the classic rcX.d and init.d based approach for scripts to execute while starting up and shutting down.

Here are the steps for HP-UX 11.11.(HPUX 11i) to add /etc/rc.local for executing custom commands at boot and /etc/rc.shutdown for custom commands executed before shutting down.

First, create an init script at the following location with these permissions and ownership:

# ls -l /sbin/init.d/rclocal

-r-xr-xr-x   1 bin        bin           3297 Oct 14 18:13 /sbin/init.d/rclocal


The contents of this script, based off HP-provided example in /sbin/init.d/template, are:



Place symbolic links to the init script from the /sbin/rc3.d directory using the "ln -s" command so that there are two links pointing to the same target as below:

# ln -s /sbin/init.d/rclocal /sbin/rc3.d/K99rclocal
# ln -s /sbin/init.d/rclocal /sbin/rc3.d/S99rclocal
# ls -l /sbin/rc3.d/*rclocal*
lrwxrwxrwx   1 root       sys             34 Oct 14 16:03 /sbin/rc3.d/K99rclocal -> /sbin/init.d/rclocal
lrwxrwxrwx   1 root       sys             34 Oct 14 16:03 /sbin/rc3.d/S99rclocal -> /sbin/init.d/rclocal


Now we can create /etc/rc.local and /etc/rc.shutdown and put stuff to be executed during boot or shutdown respectively. It is important to remember these scripts are sourced by /sbin/init.d/rclocal, so we don't want to put in an exit statement in those scripts. Here are the minimal scripts I have currently.

# ls -l /etc/rc.local /etc/rc.shutdown
-rwxr-xr-x   1 root       sys            173 Oct 14 15:38 /etc/rc.local
-rwxr-xr-x   1 root       sys            220 Oct 14 15:42 /etc/rc.shutdown


/etc/rc.local

# This file is sourced from /sbin/init.d/rclocal
#PATH=/usr/sbin:/usr/bin:/sbin
#export PATH
date > /tmp/created-by-rc.local
sync;sync;sync
# DO NOT "exit"!

/etc/rc.shutdown

# This file is sourced from /sbin/init.d/rclocal
#PATH=/usr/sbin:/usr/bin:/sbin
#export PATH
date > /tmp/created-by-rc.shutdown
sync;sync;sync
# DO NOT "exit"!


That's it. Now /etc/rclocal should be executed during bootup and /etc/rc.shutdown during shutdown.

Friday, September 10, 2021

Remembering 9/11 on 20th Anniversary - Anandabazar Patrika Coverage

I wrote an article on 20th anniversary of the 9/11 attacks for Anandabazar Patrika, the Bengali language daily newspaper with largest circulation. It was published in the "International" section of Septermber 10, 2021 edition. Click on the thumbnail below for the entire page.



Here is a rough translation of the piece:

9/11: Unforgettable moments burnt into my mind

Supratim Sanyal

Washington DC 10 September 2021 08:21

September 11, 2001 started as a comfortable sunny Tuesday morning. I was at work early. It was just short of 9 AM when a friend and colleague returned from the coffee room saying he heard something about a plane crashing into the North Tower of World Trade Center in Manhattan. I assumed it was yet another mis-piloted Cessna diving through a window, perhaps with a couple of casualties. Little did I know in a few minutes I would witness a life-changing set of events in fear, horror and confusion.

Suddenly there was great commotion from the lobby of our office. We ran out and saw everyone staring at the TV,  jaws dropped and apprehension in their eyes. It was 9.03 AM, the second plane had just crashed into the South Tower. Both towers had deep gashes and were burning.

Panic spread among us. We were quickly asked to head home. I wasted no time and hit an unusually quiet I-270. Suddenly two F-16s streaked across overhead at full combat speed. Andrews AFB is very close by and  warplanes were not new to me, having been to several air shows. But this was no airshow! My heart began to pound. At that moment, it occurred to me

I floored the gas and reached home in record time. We were expecting our first child any day at the time. Naturally my wife was also very anxious. I turned the TV on and watched Aaron Brown do his best trying to cover the incredible events unfolding. 

Suddenly - the Pentagon on the TV screen! One side has a great hole and is burning. Thick black smoke. The Pentagon was also hit by a big passenger jet - like the Twin Towers. I later learned that militants hijacked the LAX-bound American Airlines flight from IAD just 35 minutes after takeoff. The plane, carrying 74 passengers, crashed into the west wall of the Pentagon at 9.37 AM.

Barely 31 miles from my house, the attack on the Pentagon sent chills through our bodies. I started to consider jumping into the truck with my wife and speeding away north and west towards West Virginia or Pennsylvania. It seemed that way we just might increase our chances of survival in an unfolding war.

Of course around the same time the heroic passengers of United 93 decided to take on the hijackers and crashed in Pennsylvania at 10.03 AM. That airplane would have been taken out anyway by the two fighter jets if they hadn't crashed. The two F-16 pilots had every intention of flying their fighters into the passenger jet, having had no time to arm their fighters before scrambling.

My wife and I visited the Pentagon that Saturday. The sight will always stay in my head, burnt in, unforgettable.

Tuesday, September 7, 2021

Save State of VirtualBox Virtual Machines on APC UPS power loss shutdown by apcupsd Linux Daemon

APC Back-UPS ES 8 Outlet 550VA 120V BE550G

The pets in my virtual machine zoo (SANYALnet Labs) lived inside two Dell PowerEdge blades (a 2950 with 8 Xeon cores and 16 threads + a R710 with 12 Xeon cores 24 threads) for over a decade. Finally deciding to do something about the resultant electric bills, I hit eBay and eventually found a Gigabyte H410M motherboard along with an interesting processor: 8-core 16-thread Intel Intel(R) Core(TM) i7-10700T. The "T" translates to "low power". Intel's claims stands up to measurement. The i7-10700T indeed draws about 35 watts at light loads and runs at 105 watts sustained at 85% or more processor usage when all the virtual machines are fired up. The new build with all virtual machines running under Oracle Virtualbox now draws a total of around 150 watts.

This new low power usage means I have now many minutes of battery backup from the connected APC UPS, enough to actually save the states of all the virtual machines before powering the physical machine down.

The apcupsd daemon has been around for ages and is well documented all over the internet. I followed the path of others and with a little bit of tweaking got what I wanred. When the APC UPS signals the system is on battery power, a script is executed that takes a snapshot and saves the state of all the running virtual machines. Other VMs not in running state are not affected.

The Gigabyte H410 motherboard with Intel Core i7-10700T processor and 32GB of RAM runs VirtualBox virtual appliances under Ubuntu 20.04 LTS (5.4.0-80-generic kernel at the time of writing). apcupsd - the APC UPS software for Linux is available from the Ubuntu repositories and easily installed using "apt-get install apcupsd". The version running at the time of writing is "3.14.14-3build1". Here is what "apcaccess status" tells me about my UPS (including incorrect Load % and Timeleft which I don't really care about as long as enough time is left to take snapshots of and save states of all the hosted virtual machine appliances):

I learned by skimming through the man pages that the apcupsd daemon invokes a "/etc/apcupsd/apccontrol" script which handles specific UPS events. On AC mains power fail, the events raised in order are (example of actual sequence with timestamps):

 On closer observation, I found that a new instance of apccontrol script is started off every time an event is sensed by apcupsd, even if prior invocations of apccontrol have not completed. Bummer! This means that if we write a script to start to take snapshots and save current states of hosted running virtual appliances when the "power failure" event occurs, the "system shutdown" event will initiate an immediate shutdown 11 seconds later even if the virtual machines have not been saved yet!

Fortunately, the solution was easy. apccontrol executes scripts with the same name as the events placed in the /etc/apcupsd directory. The event names are listed neatly in a case statement in apccontrol. So, first I created a script called "/etc/apcupsd/do-nothing-event-handler.sh" :


Then, I deleted all existing event handling scripts except "onbattery" and added symbolic links to do-nothing-event-handler.sh. The remaining "onbattery" script is the only one I use to save snapshots and states of the virtual machines and then shut down the machine. Here is what my /etc/apcupsd directory now looks like:


Here is the "onbattery" script that does what I need on AC mains powerfail and switchover to UPS battery power.


The /root/clear-kernel-memory-cache.sh script invoked from "onbattery" reclaims unused memory from the cache. I do this in the hope of maximizing memory and avoiding too much disk activity during the process of taking snapshots and saving states of the the running virtual machines. 

and finally, here is the save-vms-on-ups-power.sh script that is invoked from onbattery to identify the running virtual machines, take snapshots with suitable comments, and save the states. This script is a tweak on the wonderful script I found at ubuntuforums.org.



Thursday, January 21, 2021

Jan 20, 2021 Biden-Harris Presidential Inauguration - Anandabazar Patrika Coverage

As of August 27, 2020, Donald Trump had lied 22,247 times in 1,316 days. After fairly and squarely losing to Joe Biden in the most secure presidential election in American history, Trump started to average 50 lies a day overwhelming those who had been attempting to disseminate truth for the last four years. Trump's biggest fraudulent and evidence-free claims of a stolen election were believed by millions of Americans, resulting in the shameful spectacle on January 6, 2021 of an attempted insurrection to sabotage democracy in the United States by a violent mob incited by Trump. Domestic terrorism was on full display in the US Capitol, which I had attempted to report also in Anadabazar Patrika

It seems Trump's biggest asset is an uncanny ability to fool almost half the country all the time. A champion con-artist, he instinctively knows where to drive the biggest wedges to widen racial cracks that have always existed in the United States, feeding into white rage in a fast-changing country where the most accomplished people live in cultural and ethnic melting pots in diverse 21st-century post-industrial urban economies driven by data sciences, bleeding-edge research and development in technology services. It is unfortunate nearly 72 million people bought into the idea of coastal "elites" stealing America after endless repetition of provocative quotes on Fox news, and later obscure television channels like OANN and NewsMax which saw jumps in viewership when even Fox news turned out to be lacking in the degree of dissemination of ridiculous conspiracy theories resulting in socially-engineered radicalization of the kind long practiced by global terrorist organizations.

Psychologically damaged, devoid of decency and incapable of strength and maturity to invite the incoming President and Vice-President elected by the people to the White House and accompanying them to their inauguration, Trump designed a grand farewell of himself by himself, directing the military to give him a 21-gun salute and play "Hail to the Chief." He left hours before the incoming President and Vice-President were sworn in, to take advantage of taxpayer-funded Airforce One to fly him out without having to request use of the aircraft from the new administration as is the norm. He commanded the Airforce One to fly low over his private property, and then landing at his private residence, the outgoing single-term twice-impeached 45th President of the United States went around in a motorcade driving slowly basking in the glory of crowds holding up signs like "Fuck Biden". In the meanwhile, the 46th President of the United States was being sworn in in the presence of the 42nd, 43rd and 44th Presidents of the United States in a cheerful ceremony broadcast live across the world. Ironically, the absence of the misfit 45th was received with an overarching sense of relief - it was indeed a good thing Trump was not there for the inauguration.

Here is my report in the Anandabazar of the historic events of January 20, 2021 where America breathed a sigh of relief and welcomed the first woman Vice President of the United States, a woman who is also not white.

Click twice to zoom in completely:

Simple, Free Image and File Hosting at MediaFire

Simple, Free Image and File Hosting at MediaFire




Friday, January 8, 2021

Jan 6, 2021 Donald Trump Incited Violent Insurrection Riots at the US Capitol - Anandabazar Patrika Coverage

On Jan 6, 2021, Donald Trump incited his insurrectionist supporters to acts of terrorism in violent rioting, storming and occupation of the US Capitol to attempt to overturn his decisive loss to Joe Biden in the 2020 presidential elections which were the most free, fair and healthy in the history of the United States. This came about after 61 cases he took to court with bogus claims devoid of any evidence of fraud were thrown out by judges, and his subsequent attempts at browbeating state administrations into upending the people's verdict failed. Responding to Trump's call to "take back" the country using strength, a mob of insurgents waving Trump flags, confederate and right-wing extremist symbols, pro-Nazi messages and such, the mob of Trump supporters consisting of members of QANON, Proud Boys and white-supremacist groups overwhelmed the Capitol police, breached the building’s security, stormed the Capitol and halted the constitutional proceedings to certify Trump's defeat. When the acts of terrorism commenced, lawmakers had to put on gas masks and were evacuated to safety. The DC Mayor ordered a curfew at 6PM and eventually law enforcement regained control.

My reporting on this failed attempt at disrupting democracy was published in Anandabazar Patrika, the most circulated Bengali language (my mother tongue) daily on Jan 8, 2021 as two different articles, one on page 1 and another on page 9. Here are the two articles, all content (C) ABP Private Ltd.