Yenya's World

Tue, 01 Jul 2014

Static Transfer Switch

Static Transfer Switches (STSs) are amongst the most important parts of power distribution in our datacenter. Some of the datacenters are designed with redundant power paths in mind (as required e.g. by TIER 3 specification). The problem with TIER 3 is, that it requires all the equipment to have two or more power supplies. Some appliances (for example, ethernet switches) are much cheaper with a single PSU. An ethernet switch with two PSUs is usually from the vendor's top line, and is of course priced as such. We have decided to design our datacenter power distribution with single-PSU equipment in mind.

According to our experience, the majority of the power outages in our previous datacenter were either the planned outages, or were caused directly by the failure of the equipment which was supposed to provide higher availability (e.g. the UPSes themselves). So we have planned the datacenter to be able to bridge around the failed part of the equipment, while still providing the uninterrupted power even for the equipment with single power supply.

An STS can be viewed as a box with two incoming power lines and one outgoing line. It monitors the incoming power paths, and can quickly switch to the alternate path, should the currently-used path become faulty, providing uninterrupted service of the outgoing power line even in case of the failure of one of the incoming power lines. The "Static" part in the name means that there are no mechanical parts involved in the switching itself (such as relays), the switching is done by SCRs:

Our STSs are Inform InfoSTS. Their communication protocol and documentation is pretty bad, so I cannot really recommend them. Their proprietary Windows-only management software is even worse. For example, an attempt to set the time fails when the time is before 10:00, because the management software sends the time as H:MM, while the STS itself expects HH:MM even for hours less than 10. I have nevertheless managed to decode the protocol and write my own web-based management application for it (screenshot above).

Probably the most interesting part is that it is the first time I used SVG inside the web page, and Javascript for modifying it when the new data is read. So the schematics can be edited in Inkscape, and provided that the object IDs are unchanged, the application layer can still work with it. I plan to connect it with MRTG or Zabbix, and make all the numbers clickable, leading to the graph of the history of that particular variable.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

Mon, 30 Jun 2014

Časopis "abc"

Jedno z drsnějších setkání s realitou: koupil jsem dětem časopis "abc", který jsem jako kluk měl dost rád. Dnešní "abc" asi už nemá dovětek "mladých techniků a přírodovědců", zato je tak z poloviny vyplněno reklamami. Vystřihovánky jsou tam značně zjednodušené (kam se hrabou stavební stroje z asi 150 dílů, které byly za mých časů).

Tak nějak mi to připomíná bulvární tisk. Představte si třeba elektrokolo, které filtruje vzduch (aniž by výrazně brzdilo jezdce aerodynamickým odporem), provádí fotosyntézu (i když na většinu plochy kola nesvítí slunko, protože je ve stínu jezdce), a vůbec je celé zelené. A vozit všechny tyhle vymyšlenosti sem a tam na elektrokole se vyplatí daleko víc, než provádět fotosyntézu třeba stacionárními rostlinami. Zaplnit město takovými koly, byl by tam vzduch jako na horách (klikněte na obrázky pro zobrazení ve vyšším rozlišení, podstatný je hlavně text):

Některé texty podle všeho píše polodementní absolvent žurnalistiky odněkud z Bronxu. Ale ty basy, woe, ty tam nejsou, je to příliš malý:

Správný pirát má dálkáč, woe:

No ale nejsou piráti jako piráti. Když nějací podivíni navrhli zbraň vyrobitelnou na 3D tiskárně, americká vláda to samozřejmě zakázala. Ale považte, projekt umístili na _pirátských serverech_(sic!), odkud si jej stáhlo přes sto tisíc lidí!

Zeptejme se, Kdo za tím stojí? Pokud by získání zbraně stálo jen pár stovek, nezbude každému, než aby se taky ozbrojil (podtext: a to je samozřejmě špatné, ááno!). Prostředí Internetu totiž nahrává hlavně pirátům:

A tak podobně. Na kladnou misku vah je třeba přičíst obrázkový kurz Blenderu a koupající se slečnu (byť decentně zakrytou osuškou) v jednom komixu.

Zdá se, že časopis "abc" se od dob mého mládí významně posunul. Nejspíš ale ne k lepšímu.

Section: /czech (RSS feed) | Permanent link | 3 writebacks

Meta: New Section "Czech"

One of the reasons of why I started to write this blog was to improve my English (not sure whether this mission is successful, though :-). Apart from that, I wanted to point out things that I found interesting. Occasionally, there are things that make sense only for people speaking Czech or having the knowledge of the Czech Republic. It does not make much sense to write about them in English, and then point to the resources and documents in Czech.

So I have created a new section of this blog, named simply "Czech". The articles in this section will be in the Czech language. My English-only readers (should there be any :-), please accept my apology, and skip this section entirely.

Section: /czech (RSS feed) | Permanent link | 0 writebacks

Mon, 09 Jun 2014

Politically Correct Media Players

Hello, welcome to today's issue of your favourite "Bashing the Questionable Fedora Desktop Decisions" series. Today, we will have a look at the politically correct media players.

In a civilized world, there is no place for such insane things like software patents. Unfortunately, there are less free parts of the world, which includes the United States of America. So the companies originating in the U.S. are forced to do absurd decisions like shipping audio players which really cannot play most of the audio files out there (which are, unfortunately, stored in the inferior MP3 format), or video players which cannot play almost any video (which can be encoded in wide variety formats, almost all encumbered by software patents).

For Fedora, the clean solution would be to have a package repository outside the U.S. jurisdiction, and offer it as a part of Fedora by default. Such a repository already exists at rpmfusion.org, and it provides everything needed to play audio and video in free parts of the world. But it is not as promoted as it should be in free parts of the world. However, Fedora does something different: they ship empty shells of audio and video players, such as Pragha or Totem, which in fact cannot play most of the audio and video files. The problem is, that these applications shamelessly register themselves as the handlers of audio/mp3, video/h264, and similar MIME types. Only after the media file is handed to them, they start to complain that they don't have an appropriate plug-in installed.

Hey, Fedora desktop maintainers, stop pretending that the US-based Fedora desktops can handle MP3 and H.264 files, and admit that your inferior but not U.S. software-patent encumbered players cannot handle these files by default. It would be fair to your users. Fedora users: is there anybody who really uses Totem instead of VLC or Mplayer?

Section: /computers/desktops (RSS feed) | Permanent link | 2 writebacks

Tue, 27 May 2014

MPEG Transport Stream

Today I have investigated why some files with the .MTS extension do not have their MIME type detected. The file starts with the following bytes:

$ od -tx1 file.mts | head -n 1
0000000 00 00 00 00 47 40 00 10 00 00 b0 11 00 00 c1 00

According to the current /usr/share/magic from Fedora 20, it is quite similar to the following entry:

0       belong&0xFF5FFF10       0x47400010
>188    byte                    0x47            MPEG transport stream data

Also, the shared-mime-info package contains something similar:

<match type="big32" value="0x47400010" mask="0xff4000df" offset="0"/>

Note that both files expect the 0x47 byte to be at the beginning of the file, not after four NULL bytes as in my example. Yet mplayer(1) can play these files, and ffprobe(1) can detect it as "mpegts" with an audio and video stream. Looking into the ffmpeg source, I have discovered it does horrible things in order to detect a file format. For example, for mpegts, it scans the file for a 0x47 byte at offset divisible by four, and then evaluates some other conditions. The probe function returns score, and a file format with greatest score is returned from the probe function. Ugly as hell, but probably needed for handling real-world data files.

So, what should I do next? Should I submit a patch to file(1) and shared-mime-info to accept also the magic number at offset 4? Are we getting to the point where the already-complicated language of the /usr/share/magic file is not powerful enough?

Section: /computers (RSS feed) | Permanent link | 4 writebacks

Tue, 13 May 2014

A Collapsed Dam

Last weekend we went to Jizerské hory, and we have visited an interesting technological sight there: the collapsed dam on the Desná river. Here are my photos together with a short description, as it apparently does not have its own English Wikipedia page, just a dead link from the Desná disambiguation page. More can be read in the Czech Wikipedia (Přehrada Desná).

The dam collapsed less than year after being built, in 1916. The forest workers spotted a tiny leak, and informed the dam keeper, who in turn informed his supervisor, and was given a permission to open the slide valves. In spite of this, the dam collapsed in about 70 minutes. The resulting flood wave killed 62 people. In the picture, there is the dam body from the side, together with the valve tower, and the river Desná flowing to the left through the gap in the dam.

The view down the river shows the huge gap where the part of the dam collapsed. Behind the new wooden bridge the entry to the water outlet tunnel can be seen.

The outlet chamber and the valve tower. There were two slide valves in the dam: one in the tower, and the second one in the outlet chamber. When the dam started to leak, the first valve was fully open, while the second one was half-open.

The second slide valve. After being informed about the leak, the dam keeper tried to fully open also the second valve, but he was forced to flee from the valve chamber in order to save his life. The valve has remained open at about 75 %.

In times of torrential rains, it was possible to divert part of the incoming water to the neighbouring dam Souš by a tunnel more than one kilometer long. Nowadays, the tunnel is closed, as it is a nature reserve of bat wintering.

Here is a modern analysis of the catastrophe and the reasons of the failure of the dam (in Czech, sorry).

An interesting fact about the political and economical system of that time: this dam and several others in Jizerské hory were built by a non-profit organization (Vodní družstvo, in English something like Water co-operative), formed by local works owners and other local persons and organizations, which were endangered by annual floods from the mountain rivers. The local people paid for the whole system of dams. I wonder why we pay enormous taxes and then build anti-flood infrastructure using the money from Brussels. I would guess the percentage of money lost in this process is huge compared to what our forefathers did.

Section: /world (RSS feed) | Permanent link | 0 writebacks

Wed, 07 May 2014

GMail Spam Filter

Apparently, GMail spam filter got too zealous. I have my own domain, and I run my own SMTP server on it. Now it seems Google has decided to reject all mail from my server:

<my.test.gmail.account@gmail.com>: host
    gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1b] said: 550-5.7.1
    [2a01:...my.ipv6.address...] Our system has detected that this
    550-5.7.1 message is likely unsolicited mail. To reduce the amount of spam
    sent 550-5.7.1 to Gmail, this message has been blocked. Please visit
    550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131
    for 550 5.7.1 more information. o49si12858332eef.38 - gsmtp (in reply to
    end of DATA command)

In the mentioned page, they recommend putting "SPAM" in the subject of forwarded mail :-/ in order to trick GMail to accept it. But then, it is not forwarded mail at all, it is mail originated on the same host from which the SMTP client is trying to send it to GMail.

So, are we getting to the world where only Google and few other big players are allowed to run their own SMTP servers? And after that, they wil "suddenly" decide to stop talking to each other, as we have seen in the XMPP case with Google Talk. The morale of the story is: don't rely on services you cannot control for your private data and communication. They will drop your incoming mail as supposed spam and you will not be able to do anything about it.

Update - Wed, 21 May 2014: Workaround Available

Apparently, this is indeed IPv6-related, and the workaround is either to use IPv4 for Gmail, or better, make Postfix fall back to IPv4 after trying IPv6 first. This way, Google gets a penalty of two connections, and hopefully will have motivation to fix their problem.

The solution is described here, and more can be read in the postfix-users list archive (another source). The solution is:

Add the following to /etc/postfix/main.cf:

smtp_reply_filter = pcre:/etc/postfix/smtp_reply_filter

Create a file named /etc/postfix/smtp_reply_filter with the following line:

/^5(\d\d )5(.*information. \S+ - gsmtp.*)/ 4${1}4$2

and reload the Postfix configuration using postfix reload command.

Section: /computers (RSS feed) | Permanent link | 4 writebacks

Fri, 02 May 2014

Rocketry

I bought a model rocket for my children (and myself, of course :-). We have assembled it, and on Thursday, we went out to give it a try.

model rocket

We have found a large field near Hády, and tried the rocket with an A8-3 motor. The weather was nice with almost no wind, and the rocket has returned after a nice flight about ten meters away from the launch pad. I would guess it reached the altitude of 50 to 100 meters. Another try with the same motor type gave a similar result. Then we attempted to use the strongest motor we had, a C6-7.

In the documentation it is stated that with C6-class motors it can reach about 335 meters of altitude. It was indeed something very different than A8-3. The rocket quickly disappeared out of sight. After several seconds, we managed to get a glimpse of it, as it deployed the parachute. However, there was apparently a stronger wind above, and despite having plenty of space in the field around us, the wind has carried it above the forest.

Despite searching for the rocket for half an hour or so, we have lost it. If you visit Hády in the near future, you can look for our rocket around this place.

Anyway, model rocketry is pretty interesting. Our next project is a 3D-printed rocket. We would like to start with something like the disposable rocket (I already have my own OpenSCAD variant of this design, without slanted fins), and move towards a full-fledged rocket with a return parachute, maybe carrying an on-board camera.

Section: /personal (RSS feed) | Permanent link | 2 writebacks

Tue, 29 Apr 2014

The Grand C++ Error Explosion Competition

The daily ROTFL: if anybody still considers C++ being a sane language, look at this: http://tgceec.tumblr.com/.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

Sat, 26 Apr 2014

Datacenter Power

As some of you may know, I am on a long detour from programming and system administration to the area of civil and electrical engineering, building supervision and datacenter design. Hopefully this detour is nearing to its end, as our new faculty building with its datacenter is almost ready.

I would like to share some photos of our infrastructure. Here are photos from our power distribution room (image labels are in Czech only, sorry):

And here is the image gallery from our UPS room and its service area. We use Dynamic UPS (DUPS), which does not maintain its backup power in the lead cells, but instead uses a huge flywheel, which allows to bridge the short gap between the power outage and start of a diesel engine:

More to come in the CVT FI blog, available to those who have access credentials to IS MU.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

Fri, 25 Apr 2014

Buzzword Bingo

And the winner of today's Buzzword Bingo is ...

Project Atomic:

"Project Atomic integrates the tools and patterns of container-based application and service deployment with trusted operating system platforms to deliver an end-to-end hosting architecture that's modern, reliable and secure."

There is even the word "cloud" mentioned somewhere in their home page. I wonder what has happened to hackers and computer enthusiasts, when they are able and willing to put such a crap in their home pages. Apparently, the translation of the above is something like "We can run Docker applications under SElinux."

Section: /computers (RSS feed) | Permanent link | 3 writebacks

Tue, 31 Dec 2013

PF 2014

I wish a pleasant year 2014 to everyone who reads this blog.

PF 2014

Section: /personal (RSS feed) | Permanent link | 0 writebacks

Thu, 19 Dec 2013

Arduino SCX Digital to USB interface

I have a SCX Digital slot cars set, and some years ago I bought an interface box for connecting it to the PC using a RS-232 serial port. PC then can be used as a timer, lap counter, and race management. Now I wanted to make some modifications to the firmware (it uses AVR Tiny 2313 chip). I have discovered that the author does not sell this version anymore, it has been replaced by a newer version with USB. So I kindly asked the author whether he can provide me the source code for the firmware for the old version. I have got the following reply:

Hi Jan
Sorry, I do not share any of my software.

Well, whatever. It is of course his choice to keep the firmware of the abandoned version for himself. But in the meantime, I've got some experience with electronics and microcontrollers (see my other projects).

Introducing SCXreader, my own SCX-to-PC/USB interface, built with Arduino Nano. It is fully open, including the source code of the firmware. It costs about US$ 6.50, way less than the current SCX-to-USB SEB interface.

Section: /computers (RSS feed) | Permanent link | 8 writebacks

Sun, 15 Dec 2013

Slot Car Tyres

The tyres of our slot cars are not as good as they used to be, so I wanted to buy new ones. However, the local seller has been less than helpful, so I searched the Net. Apart from U.S. slot car supply sellers (tyres for US$ 7.50, shipping into the Czech republic for US$ 25+), I have found this page, so I have decided to create my own tyres. The original tyres look like this:

Firstly, I have created the box for a new mold, using heavier paper with smooth finish:

The tyres are fixed at the opposite sides using dual-side adhesive tape. This allowed me to make a single-part mold only, and provide the pouring and air escaping holes:

The mold is made from OOMOO 30 silicone, bought at www.silikonycz.cz. I have used parafine release agent to avoid the original tyres sticking to the mold, but I think it was not necessary after all.

The mold removed from the paper box:

Removing the original tyres from the mold. OOMOO is really stiff and soft, my previous experience with Lukopren 1522 silicone is worse - Lukopren would snap off when removing the models so deeply enclosed in the mold.

For the tyres I have used urethane rubber. I have tested two types with a different hardness. The red one is softer - Vytaflex 30, and the blue one is harder - Vytaflex 40. I have used So Strong pigments for making the rubber red and blue. All those materials were also acquired from www.silikonycz.cz.

And here is the final product:

It is much softer than the original tyres, and a bit looser on the rims (I have not used any glue so far, though). With the original tyres, the best lap time with F1 cars was slightly under 7 seconds. After the short testing ride with the Vytaflex tyres I clocked the best lap of 5.15 seconds, and average laps around 5.50 seconds. Impressive.

Section: /personal (RSS feed) | Permanent link | 0 writebacks

Thu, 28 Nov 2013

A Not-so-New Pet

I have forgot to write about our new pet, so with an appology for the delay, here it is:

Testudo Hermanni Testudo Hermanni

It is Hermann's tortoise (želva zelenavá in Czech). It is about year and half old now. FWIW, we didn't bought it from the pet shop, but from the breeder at www.euzelva.cz.

Section: /personal (RSS feed) | Permanent link | 0 writebacks

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)