Notice: fwrite(): Write of 1126 bytes failed with errno=28 No space left on device in /var/www/news.numlock.ch/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 42

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the math-captcha domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114

WordPress database error: [Disk full (/tmp/#sql-temptable-20e-36694-262.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")]
SHOW FULL COLUMNS FROM `wp_wfLiveTrafficHuman`

WordPress database error: [Disk full (/tmp/#sql-temptable-20e-36694-263.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")]
SHOW FULL COLUMNS FROM `wp_wfLiveTrafficHuman`

WordPress database error: [Disk full (/tmp/#sql-temptable-20e-36694-264.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")]
SHOW FULL COLUMNS FROM `wp_options`

Mac OS X – A changelog by Daniel Mettler

How to determine/find out whether your Mac/macOS is in Safe Mode?

  1. In the Apple menu, click on “About This Mac”
  2. Then click on the “More info…” button
  3. Click on the “System Report…” button
  4. In the appearing System Report window, click on the “Software” menu item in the left pane
  5. In the right pane, look for “Boot Mode:”. It should be “Safe”.

(I recently noticed that it’s quite difficult to distinguish whether your Mac has really been booted in “Safe Mode”, as visually, there doesn’t seem to be much of difference anymore to how the desktop looks in regular mode)

And BTW, to boot a Mac with Apple Silicon in Safe Mode:

  1. Shut your Mac/macOS down
  2. To boot it again, press the power button and hold it
  3. Select the volume to boot (i.e. click on the volume icon)
  4. Hit and hold the shift key
  5. Click on the appearing text (“Continue in Safe Mode” or so) below the volume icon

macOS: SystemUIServer eating your CPU? Check your Ethernet connection!

Recently, the SystemUIServer process on my MBP running macOS Sierra has started “eating” a lot of CPU, slowing down the whole machine, even making the clock in the top menu bar stop working properly. It usually started using one-digit percentages of the available CPU power, then growing to 10%, 15%, 20%, up to well above 60%, sometimes even 80% and more! It wasn’t a steady growth – it sometimes shrank again, just to grow even further.

The only apparent remedy was to kill the SystemUIServer process (e.g. using the Activity Monitor) from time to time (i.e. every 30 minutes -> there are also scripts to automatically restart SystemUIServer). Its CPU usage then reset to a low one-digit number.

Taking a closer look at the process in the Activity Monitor, I then noticed that the number of (used) ports (so-called “Mach ports“) by the process were steadily growing, once SystemUIServer was started. This was weird, pointing to some kind of leakage. Typically, for a CPU load of around 50%, more than 5000 Mach ports were used.

By coincidence, I then noticed that, unlike expected, my MBP wasn’t actually using Ethernet, but only WiFi. Further investigation then hinted that the according Gigabit Ethernet port on my HP 1810 switch was apparently malfunctioning (or even dead): In the macOS Network Preferences, the Thunderbolt-Ethernet connection was constantly shown as red/disconnected, although the OS was apparently trying to establish a connection again and again (and failed). First, I even suspected a problem with the Thunderbolt-Gigabit-Ethernet adapter itself (it wasn’t the problem here, the adapter seemed to work fine with another Mac and connection).

The solution to this problem thus was:

  • Connect the Ethernet cable to another, working Ethernet port: Now the SystemUIServer process consumes less than 0.1% CPU again and roughly 400 ports only, both with and without additional WiFi.
    Note that both the problem and this solution are reproducible.

Lessons learned:

  • Sometimes, very unexpected, seemingly unrelated and “small” problems can have big (negative) effects.
  • Sometimes you need a bit of luck to find the cause of a problem (a web search didn’t bring up the above hint, rather suggested updating or removing faulty apps, buggy extensions and menu widgets. I thus already tried removing or updating some of the suspected apps, extensions and widgets.)
  • Ports of HP 1810 switches can actually break/fail! Remember the saying: “I got 99 problems, but a switch ain’t one!” – well, in this case, the faulty switch was actually part of the problem and even the initial trigger of the problem! Also remember that HP offers a lifelong warranty on its (good ol’) 1810 switches.
  • Extra points for you, further research: The fact that the SystemUIServer allocates more and more Mach ports if there’s a malfunctioning Ethernet port (i.e. faulty Ethernet connection or faulty handling of a faulty Ethernet connection by the Thunderbolt-Gigabit-Ethernet adapter) is hinting that this might be an attack vector for a (new?) DoS attack. Perhaps not an easily exploitable one (on the Ethernet or MAC layer, even), but it’s nonetheless something that should actually be handled gracefully by SystemUIServer, not leading to more and more CPU and system resources being consumed.
    If you have time to research this further, let me know about your findings!

Using multiple Skype accounts on macOS

With the recent changes in Skype, the “traditional” method of running several Skype instances using different system users doesn’t work anymore (as the the new authentication dialog strangely doesn’t get the focus anymore).

So, in order to use several Skype accounts on macOS (formerly known as Mac OS X), do the following:

  1. Open the Script Editor (in the ‘Utilities’ folder in the ‘Applications’ folder)
  2. Create a new script with the following content:
    do shell script "open -na /Applications/Skype.app/Contents/MacOS/Skype --args -DataPath '/Users/your_system_user/Library/Application Support/Skype_any_identifier'"

    Replace your_system_user by your regular macOS user account (see ‘whoami’ in Terminal)
    Replace _any_identifier by the according Skype account name, e.g. _myskypename (doesn’t really matter what, just don’t use an empty string)
    Please mind the double quotes and single quotes (important!)

  3. Save the script as an application: File.. Save.., choose “Application” as file format, give it a name and store it e.g. in your home directory or in the Applications folder

Repeat these steps for any of your Skype accounts, giving each Skype account a different Skype_any_identifier. You can then start the according Skype instances by double clicking on the according app.

Explanation:

The above script starts a new instance of Skype (which would otherwise be prevented), using the -n argument. Each instance of Skype gets its own directory to store the according account data, using the -DataPath argument.

Karabiner: Use PC-style Home/End keys on Mac OS X

Karabiner allows to customize almost any aspect of the keymap on Mac OS X in a convenient way:

Karabiner – A powerful and stable keyboard customizer for OS X. (formerly known as KeyRemap4MacBook)

For example, you can make the “Home” and “End” keys behave like on a PC. Regarding these two keys, I find the PC style behaviour more intuitive, e.g. using shift-home and shift-end to select text, rather than using the tricky three-finger-combinations shift-cmd-left_cursor and shift-cmd-right_cursor in Mac OS X.

Here’s how to configure this in Karabiner:

karabiner_use_pc_style_home_and_end_keys

 

Further, I decided to lower the “Key Repeat Delay Until Repeat” to 100 ms and the “Key Repeat” to 23 ms for quicker navigation and repetitive typing.

Of course, there are many other useful tweaks to explore.

Mac OS X tools: FinderPath and HyperDock

On hacker news (i.e the better alternative interface http://hckrnews.com), I stumbled over two nice helper apps for Mac OS X:

FinderPath (free) shows the full path in the title bar of a Finder window upon double-clicking it. Like that, the full path can be selected and copied to the clipboard or one can simply edit the path and hereby easily navigate through the filesystem trees. It’s quite a time saver!

HyperDock (9.95 USD) displays thumbnail screenshots of all windows of the running apps in the Dock when hovering over them, making it easier and quicker to switch to other windows or to close them (the latter being a feature still missing in Mission Control). It also supports several other cool features, like Window Snapping.

Homebrew package for t-prot: TOFU protection for e-mail

In a current LUGS mailing list thread, mowgli pointed to the t-prot script as a nice tool to “fix” the so-called (and very common) TOFU style message quoting and some other annoyances (like commercial webmail provider signatures, overly excited !!!! statements, etc.) in e-mail messages. t-prot was originally developed for mutt, but can also be used with other mail clients.

As there wasn’t any t-prot package for my favourite Mac OS X package manager Homebrew yet (apparently only for MacPorts), I quickly created one myself [Edited on Feb 24, 2015: Updated for t-prot version 3.3]:

  1. Create the file /usr/local/Library/Formula/t-prot.rb and add the following (fantastically trivial) content:
    require "formula"
    
    class TProt < Formula
      homepage "http://www.escape.de/~tolot/mutt/"
      url "http://www.escape.de/~tolot/mutt/t-prot/downloads/t-prot-3.3.tar.gz"
      sha1 "9be24629abc598b24e887f47e9a62feddc3ed4ad"
    
      def install
        bin.install 't-prot'
        man1.install 't-prot.1'
      end
    
    end
    
  2. Install t-prot (run the following Homebrew command in a terminal window):
    brew install t-prot
  3. Add the following line to your .muttrc (or check ‘man t-prot’ or the t-prot web page for options and examples):
    set display_filter="t-prot -cemt -M=mutt"

Notice: fwrite(): Write of 1126 bytes failed with errno=28 No space left on device in /var/www/news.numlock.ch/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 42

Fatal error: Uncaught wfWAFStorageFileException: Unable to verify temporary file contents for atomic writing. in /var/www/news.numlock.ch/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:51 Stack trace: #0 /var/www/news.numlock.ch/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(658): wfWAFStorageFile::atomicFilePutContents() #1 [internal function]: wfWAFStorageFile->saveConfig() #2 {main} thrown in /var/www/news.numlock.ch/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 51