Portage pause and resume ebuilds

Yesterday one of my systems had a catched up a rebuild of qtwebegine. Since this one particular systems has hardware that is 8 years old, and a rebuild of qtwebengine takes a lot of time on a dualcore system, I did not have that patience to wait all the evening since I needed the CPU for other tasks. If the half of a ebuild is already build, one does not want to throw all it away. There are 2 ways to preserve already compiled and unfinished ebuilds. The precedence to do so is the building host can not be rebooted. The first way to preserve the half build package and to pick the ebuild later is to hibernate the host

host # hibernate

The sencond solution without hibernating the host is to send a CTRL+Z in the shell where the ebuild has been executed. Following command will then appear after pressing CTRL+Z

[1]  + 1151 suspended  sudo emerge -vauDN world

To resume that ebuild just type in following command:

host # %1

Or

host # fg %1

To get an overview of suspended ebuilds or jobs just type in:

host # jobs
[1]  + suspended  sudo emerge -vauDN world

Now it is specifically not a special gentoo command but a bash command to pause running jobs and then to pick them up later.

Circuit switched networks

Circuit switched networks have been used in the past in the traditional telecommunication networks for phone calls. Circuit switching has following parameters:

  • reserved bandwidth
  • dedicated connection
  • protected bandwidth
  • synchronized

It has been used in the analogue telephone network to establish temporary circuits (phone calls) or permanent circuits between peers, sites. Before packet switched networks became mainstream, this has been the first way for Telecoms for making profit out of circuits. Circuit switched network are reliable and expensive, have limited bandwidth, and available bandwidth can not be temporarily reserved elsewhere. Once a phone call (circuit) from location A (Russia) to location B (China) has been established, this bandwidth is reserved for the time the phone call (circuit) is active. Circuit switched networks also need a clock. So beside the circuit switched network, there is a need of a clock for the whole network. Operating a clock for a circuit switched comes with some additional complexity. The clock has to be synchronized across the whole circuit switched domain. Synchronization is a prerequisite for traditional circuit switching. Once the network is out of time there are errors could be f.e. in telephony the other end can not be comprehended, in video the receiving picture is distorted. A circuit is a dedicated point to point connection.

ATM or Frame Relay is a cicuit switched network. I have been operating ATM and Frame Relay networks in the past. If provisioning a path for a customer in ATM backbone there were parameters that needed to be know before the provisioning could be done. Parameters like

  • icd (initial cell rate)
  • cdr (committed data rate)
  • cbs (committed burst rate)
  • pd (peak data rate)

Only to name a few. There are a lot more parameter VC (virtual circuit) could have. Also ATM networks (I speak mainly about circuit switching) were able even in the past to establish "real time" communication for video and audio. PVC is a permanent virtual circuit, a PVC can not be automatically re-routed, and a SPVC (soft permanent virtual circuits) can be re-routed. Also there are PNNI (Private Network-to-Network Interface) and NNI (Network-to-Network Interface).

At the current moment of time there are rarely circuit switched networks out there, they are being replaced by packet switched networks which are more suited for today needs. Circuit switched technology compared to nowadays packet switched technology has been far more reliable and advanced, even today. With superior signalling and debugging capabilities nowadays ethernet networks do not have like this. This advantage comes at some cost. Operating circuit switched networks has been far more complex than operating packet switched network, it did not scale well as data communication came to circuit switching besides video and audio. Operating packet switched networks is still not easy if done right it needs also careful planing and knowledge of the used technology. But in the end I can say there is the old war, you probably know form editors, Emacs vs vim. The same war is in telecommunication ISO vs RFC.

ISO - is a standard, reliable, done once and for all the time, not scalable, internationally supported, only one way of doing it, expensive RFC - not a standard, good enough, can be rewritten at all times, scalable, different vendors, different implementations that mostly work together.

Circuit switching is a ISO domain, old telecoms, reliable, expensive, done once a internationally working, out of the box. Best comparison ever for me is NSAP vs IPv4 and IPv6. If you do not know what NSAP is?

ViM spellchecking

Such a nice recursion, editing a ikiwiki blog article about ViM using ViM. This article is how to enable and use spellchecking usage in ViM. I have been using ViM for almost a decade now and ViM is the editor of my choice, however recently I found out I did not know I need spellchecking, but I need it definitely.

Enabling in-line spell-checking in ViM while editing a file:

:setlocal spell spelllang=en_gb

Configuring in-line spell-checking in ~/.vimrc for specific file types, here .mdwn markup files:

autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_gb

By turning on spell-checking in the ~/.vimrc, turning on word completion would be good as well. While typing a word and pressing CTRL-N or CTRL-P in ViM insert mode the editor will suggest possible auto-completion words.

set complete+=kspell

And this is how it looks in-line in a in a shell while editing: ViM auto completion

Words that are not recognized by ViM or/and are written wrong, will appear written with white letters at a red background. While being in visual mode auto correction can be used by pressing the z= combination. A window with know suggestions will appear to correct that word.

Sometimes words are still being marked as wrong even if they are written correctly. New words can be added in the visual mode by using the zg command. Both commands work properly only if the cursors is at the position of the marked word in ViM.

Debugging wpa supplicant configuration

Some days ago I have been searching for a more verbose or debug method while using WLAN on a linux host. At first my thoughts were a debug flag has not been enabled while buidling the package, or a additional configuration entry is missing in the wpa_supplicant configuration file. I have been wrong, the solution is much much more easier than I thought. wpa_supplicant supports a debug-verbose mode just with one simple command like below:

wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

The -D entry defines the driver, the -i entry defines the interface and -c point to the wpa_supplicant configuration file.

Additionally there is also a wpa_gui (if build with qt5 support) that comes with wpa_supplicant. This is also a application I have not been aware of since I prefer the CLI no matter what.

2 lessons learnt:

  • A solution to a certain problem is sometimes easier than you think
  • A graphical interface might prove a useful tool to support a debugging session (even if you do not like it)