No ads? Contribute with BitCoins: 16hQid2ddoCwHDWN9NdSnARAfdXc2Shnoa
Apr 012018
 

This is a continuation of an earlier post regarding ECC memory under Linux, and is how I added a little widget to display the current ECC memory status. Because I don’t really know lua, most of the work is carried out with a shell script that is run via cron on a frequent basis.

The shell script simply runs edac-util to obtain the number of correctable errors and uncorrectable errors, and formats the numbers in a way suitable for setting the text of a widget :-

#!/bin/zsh
#
# Use edac-util to report some numbers to display ...

correctables=$(edac-util --report=ce | awk '{print $NF}')
uncorrectables=$(edac-util --report=ue | awk '{print $NF}')

c="chartreuse"
if [[ "$correctables" != "0" ]]
then 
  c="orange"
fi
if [[ "$uncorrectables" != "0" ]]
then
  c="red"
fi

echo "ECC: $correctables/$uncorrectables "

This is run with a crontab entry :-

*/7 * * * * /site/scripts/gen-ecc-wtext > /home/mike/lib/awesome/widget-texts/ecc-status

Once the file is being generated, the Awesome configuration can take effect :-

-- The following function does what it says and is used in a number of dumb widgets
-- to gather strings from shell scripts
function readfiletostring (filename)
  file = io.open(filename, "r")
  io.input(file)
  s = io.read()
  io.close(file)
  return s
end

eccstatus = wibox.widget.textbox()
eccstatus:set_markup(readfiletostring(homedir .. "/lib/awesome/widget-texts/ecc-status"))
eccstatustimer = timer({ timeout = 60 })
eccstatustimer:connect_signal("timeout",
  function()
      eccstatus:set_markup(readfiletostring(homedir .. "/lib/awesome/widget-texts/ecc-status"))
  end
)
eccstatustimer:start()
...
layout = wibox.layout.fixed.horizontal, ... eccstatus, ...

There plenty of ways this could be improved – there’s nothing really that requires a separate shell script, but this works which is good enough for now.

Mar 312018
 

If you read any history at all, you will encounter many incidents of exploitation – the English exploiting the Irish, the Irish exploiting the Scottish (see Dál Riata), the English exploiting the Scottish, the Scottish exploiting the English, everyone exploiting the Welsh, etc.

As an example of how it wasn’t as simple as sometimes claimed, there is a small sliver of Anglo-Irish ancestry in my family history. Undoubtedly they exploited the Irish back in the 18th century and before, but whilst they started as English, in every generation they married into the Irish aristocracy; so in at least one case the exploiters of the Irish were half or more Irish themselves.

And that is just one small corner of the world – it was happening just about everywhere.

Take another example – slavery. Everybody immediately thinks of the Atlantic slave trade, but those who look closer are in for a surprise – firstly that most slaves were made slaves by African slavemasters. And secondly the African slave trade had been going on uninterrupted since the Roman era – chiefly to the east.

At the same time the Atlantic slave trade was going on (16th-19th centuries), the Barbary pirates were also taking slaves – European slaves. It is estimated that 1-1.5 million were taken, although these figures are disputed, it is also the case that the Barbary slave raiding caused many small towns and villages to be deserted along the coastlines of Spain, Italy, and other places with a Mediterranean coastline.

And the early history of Europe is awash with slavery – Romans, Vikings, Angles, Saxons, and others, all participates in raiding for slaves – for local use, to Rome (in the early days), and to Byzantium (later on).

It is easy to look at one historical incident, and see the English exploiting the Irish, the Europeans exploiting Africans, etc. And there is an element of truth in that.

But it can also be seen not as the members of a nation exploiting the members of another nation, but as a type of person exploiting another type of person. The pure Marxist would claim it is the rich exploiting the poor, and there is an element of truth to that, but it is overly simplistic.

It is really more that the exploiter is the kind of person willing to do almost anything to enrich themselves including exploiting others. There isn’t anything wrong with getting rich or being rich as long as it is done honestly and reasonably.

There is a certain kind of person who does not care what level of suffering they cause to another person. For convenience let us call these people “sociopaths”.

In every example of exploitation in history, no matter what we label those responsible I am sure that the exploiters were sociopaths.

Now this is all very intellectually interesting, but perhaps the real question here is what should we do about the invisible sociopaths in today’s society? Because there are plenty – we might call them bankers, or slum landlords, or Russian oligarchs, or other things, but in the end what they all have in common is that they are sociopaths.

Giving The Sky The Finger

 

Mar 292018
 

For some reason when I look at RADIUS packet captures using Wireshark, the attribute Operator_Name is instead interpreted as Multi-Link-Flag (an integer rather than a string). I’m not sure what this is, but it is much more useful to me to be able to see the Operator_Name properly – and for example, filter on it.

It turns out this is easy to “fix” (if it is a fix) :-

  1. Find the file radius/dictionary.usr (mine was /usr/share/wireshark/radius/dictionary.usr)
  2. Edit that file, and comment out three lines containing “Multi-Link-Flag” which in my case appeared like :-
    1. ATTRIBUTE Multi-Link-Flag 126 integer
    2. VALUE Multi-Link-Flag True 1
    3. VALUE Multi-Link-Flag False 0
  3. Save the modified file.

After a restart, Wireshark now understands it.

It is possible that later versions of Wireshark have fixed this, or not – it is possible that the bug is down to whoever assigned RADIUS attribute codes!

Mar 252018
 

It seems likely that the company Cambridge Analytica paid Facebook for access to data and using it’s access, downloaded as much data as possible for nefarious purposes. Nobody should be that surprised at this.

Facebook does not host an enormously expensive social network just because it is fun; it does it to make money. It probably does this primarily through advertising, but selling access to social network data is always going to take place.

And from time to time, scandals when companies like Cambridge Analytica are going to take place. At which point Facebook will protest saying that it didn’t realise that the associated firm was doing such naughty things. And once the story drops out of the news, Facebook will carry on leaking data.

As the saying goes: “If you are not paying for it, you are the product.”

In the end, the only solution to something like this, is to produce some kind of peer-to-peer application that is as easy to use as Facebook, uses strong end-to-end encryption, and keeps our data private to those people and groups we choose to share it with.

The Hole

Mar 182018
 

I recently scanned a blog entry claiming that Russia’s nerve agent attack on two people in Britain (plus the innocent bystander) wasn’t that big a deal, and that the reaction to it has been excessive. Well, perhaps.

But that blog went on to claim that militarily Russia is a bit of a pushover :-

  1. It’s less than a third the size of the Soviet Red Army. Perhaps but it still has 1 million active personnel and 2.5 million reservists. Not a size you can discount!
  2. It’s weaponry is obsolete. I can’t point to anything other than Russia spending $70 billion a year on defence to say otherwise, but “modernisation” crops up regularly in an discussion of the Russian military. And not in the sense of something that is required, but in the sense of something that is happening.

Lastly there was a reference to something that makes any student of history stare in amazement, and students of military history fall about the floor laughing. That is that Russia’s territory is flat and indefensible – ideal territory for mass tank battles (and indeed previously mass cavalry battles).

The Russian military knows this.

The last successful invasion of Russia whose territory has always been “ripe for invasion” was in the 13th century by the Mongol hordes.

There have been four major invasion attempts that failed to a greater or lesser extent :-

The Swedish military genius Charles XII tried in 1707, and was sounded beaten by the Russians assisted by the Russian winter.

Napoleon gave it a go in 1812, and the Russians inflicted a military disaster on him, again aided by a Russian winter.

Germany fought Russia during WWI, and managed to capture a considerable amount of Russian territory aided by the Russian revolution. But no major Russian cities were lost.

Again Germany tried in WWII, and Russia inflicted a major military defeat on them, with the assistance of the Russian winter.

The notion that anyone will try invading Russia is a bit ridiculous anyway (at least whilst Trump is Putin’s puppet).

So the threat from Russia is supposed “only” from cyberwar; which could be a damp squib or far more exciting than we believed possible. The fact is, we haven’t seen a full scale cyber attack against the UK, and don’t know what the results might be. Given the example of attacks against the Ukraine, we could expect wide-spread power blackouts, but it could be a great deal worse.

To be fair, I think the term “cyberwar” is a bit deceptive; attacking a nation’s connected technology is a tactic in a more widespread scheme of disruption and even war. There again, calling it “cyberwar” is a legitimate means to get funding for defences against such attacks.

The Window

Mar 152018
 

At pedestrians crossing (except for zebras), there is this strange box with a big button on it. When pressed, it announces to the traffic system that you want to cross the road.

Stating the obvious, but it seems that this is necessary. A strangely high proportion of people seem to amble up to a crossing and wait there hoping that the signal will change; it may do (especially if someone else pushes the button), or it may not.

There are rumours that at some crossings, the button is merely a placebo; fair enough. But at the majority of the ones I know well enough (and I know quite a few that well), a button push is required for the little green man to show up.

Expecting someone else to push the little button is laziness taken to the ultimate extreme.

And whilst we’re talking about it, the little green man that lights up is supposed to mean something – when he is green, you can cross the road; when he is red, you don’t. And yes I’m well aware that he’s red more often than not.

Through The Gateway

Mar 152018
 

One of the strangest things about the US is that one of the government’s most popular programmes is Medicare, which is in effect a socialist programme. As recently as 2015, 77% of US citizens approved of Medicare making it the second most popular US government programme (the most popular was Social Security which is even more socialist).

Yet tell most people from the US that socialism is alive and well in the US, and practised by US government, and you’re likely to be answered with astonishment. Of course the US isn’t tainted by that evil socialism!

Perhaps it would be better to call it “community-funded programmes for all”, although the “for all” would have to wait until Medicare is extended.

Audio Windmills

Mar 142018
 

Today came the news that Stephen Hawking has died, which is a loss to England, Britain, the United Kingdom, and the whole world. Well worthy of having a spot in Westminster Abbey. Yet as soon as his death was announced, we had bad christians (and at least one muslim) crowing about how he was going to spend all eternity in hell.

Yes, atheists know that christians think we’re going to hell. There’s no need to shout about it on twitter.

Apart from anything else, it makes christians and muslims look bad – is it any wonder that religion is losing ground to secularism when we have such noxious examples of the religious?

Now I’m not one of those atheists who thinks that all religious people are evil; a bit deluded perhaps, but not necessarily evil. But we do not see enough religious condemnation of bad christians from the good christians, or bad muslims from the good muslims.

It’s always worth remembering that evil words and deeds speak louder than good words and deeds, so good christians and good muslims need to flood their bad co-coreligionists with enough condemnation to drown out their evil words and deeds.

Rusty Anchor In The Sky

 

Mar 112018
 

Or did it just get a fresh coat of paint?

The news that a former Russian agent has been killed; almost certain by the Russian FSB. Think about it – who else would it be? Nobody else wanted him dead and Russian Today has been talking about how traitors in the UK will meet their end.

Russia has been subjected to secret police gangsters since the Tsarist era (the Okhrana). And yet whilst in the past, Russia’s leaders have supported the secret police, today’s leader (Vladimir Putin) is an old Chekist himself. Thus today’s FSB have less inclination to restrain themselves than any time in the past, and they didn’t show much restraint then!

Russia is today a rogue state prepared to resort to the kind of tactics that can lead to war, and it is not just their practice of killing traitors on foreign soil. Just look at their interference with the US election (we may not have a smoking gun, but plenty of Russian hands smell of cordite), the Ukrainian “adventures”, and suspicious activities in Syria.

In practice there is little we can do to change Russia; it has to come from within. All we can do is keep our defences up, try to avoid antagonising them, but not kowtow to their gangsterism either (a difficult line to balance).

Yes that means conventional arms, and unconventional defences too – Internet warfare can be dangerous or at the very least disruptive. And yes the spooks in the old-fashioned trenchcoats also need to get tooled up.

It also means not expanding NATO any more than it has already been.

Walking The Beach

Mar 102018
 

Alfred is a former Anglo-Saxon (actually Saxon) land-owner who has been reduced to serfdom for swearing to support William the Bastard and then breaking his oath in rebellion. Understandably he’s a bit put out by this.

William (no, not the Bastard; another one) is a Norman lord who has taken over Alfred’s estates. He is a bit of a thicko, and his main strength is bashing people with big lumps of optionally sharpened metal; his language skills aren’t especially pronounced which is somewhat ironic as a Norman is really a Viking with a French accent.

Bruce is William’s sword brother and is currently present so William can utter asides to him during the following dialog; he is presently visiting William as a break from his somewhat grimmer estates in Northumbria near the Scottish border, and to drink as much as is humanly possible.

William: “Oy! Alfred. Bring bœuf”

Alfred looks puzzled; he’s heard the word bœuf before but isn’t sure what it means, and isn’t in the mood to be helpful (he rarely is).

William (in Norman French which I have rendered in English because my Norman French is non-existent, and I’m not sure Google Translate is up to this job. It is also in italics to clarify that William is making an aside to Bruce): “These Saxons are a bit thick; can’t even understand the simplest commands.”

William: “Bring ox(masculine ending)”

Alfred: “We don’t have ox(masculine ending), how about ox(feminine ending)?”

William: “Just bring it”

Alfred leaves the hall looking puzzled, and is gone for an unusually long time.

Bruce: Is he trying to breed with the cow so he can bring a bull?

Alfred arrives back leading a cow on a rope; it is obviously still alive. William stands and starts to draw his sword whereas Bruce hurls his nearly empty tankard at Alfred which fortunately bonks his head. This seems to satisfy William who slumps back down in his chair and mutters: See what I have to put up with?

Alfred: “Did you mean ox(ending indicating a roasted dish)?”

William: “Bring food”

Alfred hands the cow’s rope to another serf, heads out of the hall, and comes back a few minutes later with some roast ox.

The Bench

WP Facebook Auto Publish Powered By : XYZScripts.com

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close