you can logoff, but you can never leave

Call for Ideas: Graphical Test Coverage Reports

| Comments

If you are working with Python and writing unit tests chances are you are familiar with the coverage reporting tool. However there are testing scenarios in which we either don’t use unit tests or maybe execute different code paths(test cases) independent of each other.

For example, this is the case with installation testing in Fedora. Because anaconda - the installer is very complex the easiest way is to test it live, not with unit tests. Even though we can get a coverage report (anaconda is written in Python) it reflects only the test case it was collected from.

coverage combine can be used to combine several data files and produce an aggregate report. This can tell you how much test coverage you have across all your tests.

As far as I can tell Python’s coverage doesn’t tell you how many times a particular line of code has been executed. It also doesn’t tell you which test cases executed a particular line (see PR #59). In the Fedora example, I have the feeling many of our tests are touching the same code base and not contributing that much to the overall test coverage. So I started working on these items.

I imagine a script which will read coverage data from several test executions (preferably in JSON format, PR #60) and produce a graphical report similar to what GitHub does for your commit activity.

See an example here!

The example uses darker colors to indicate more line executions, lighter for less executions. Check the HTML for the actual numbers b/c there are no hints yet. The input JSON files are here and the script to generate the above HTML is at GitHub.

Now I need your ideas and comments!

What kinds of coverage reports are you using in your job ? How do you generate them ? How do they look like ?

Open Data Event Coming to Sofia

| Comments

Open Data and Intelligent Government is the name of upcoming event organized by Sofia Tech Park on July 14th.

The (preliminary) topics for this event are:

  • Government vision for opening data;
  • Presentation of national platform for open data;
  • Legal aspects of open data;
  • Presentation of Bulgarian open data portal;
  • Europe and open data;
  • Open, coordinated e-government for citizens and business;
  • What has already been done by municipalities in Bulgaria;
  • Strategy of Sofia municipality for open data;
  • Upcoming open data programming contest organized by Sofia municipality.

I will also be participating in this event by covering two topics I’m close to:

  • Entrepreneurship and open data - sharing my limited experience with Difio and processing open data;
  • Technical tips for successful open data hackathon - sharing my observations as a mentor at HackFMI and giving some recommendations which will help the alleged open data contest make a difference not being just another dull event organized by governmental agencies.

So far other confirmed speakers are Rado from HackBulgaria/ HackFMI and Obshtestvo.bg which are working in the field of open government and open data.

I’m also in touch with the event organizers and helping a little bit with the program. If you’re interested in speaking please get in touch with me ASAP.

DEVit Conf 2015 Impressions

| Comments

It’s been a busy week after DEVit conf took place in Thessaloniki. Here are my impressions.

Crack, Train, Fix, Release

Sessions

I’ve started the day with the session called “Crack, Train, Fix, Release” by Chris Heilmann. While it was very interesting for some unknown reason I was expecting a talk more closely related to software testing. Unfortunately at the same time in the other room was a talk called “Integration Testing from the Trenches” by Nicolas Frankel which I missed.

At the end Chris answered the question “What to do about old versions of IE ?”. And the answer pretty much was “Don’t try to support everything, leave them with basic functionality so that users can achieve what they came for on your website. Don’t put nice buttons b/c IE 6 users are not used to nice things and they get confused.”

If you remember I had a similar question to Jeremy Keith at Bulgaria Web Summit last month and the answer was similar:

Q: Which one is Jeremy’s favorite device/browser to develop for.
A: Your approach is wrong and instead we should be thinking in terms of what features are
essential or non-essential for our websites and develop around features
(if supported, if not supported) not around browsers!

Btw I did ask Chris if he knows Jeremy and he does.

After the coffee break there was “JavaScript ♥ Unicode” by Mathias Bynens which I saw last year at How Camp in Veliko Tarnovo so I just stopped by to say hi and went to listen to “The future of responsive web design: web component queries” by Nikos Zinas. As far as I understood Nikos is a local rock-star developer. I’m not much into web development but the opportunity to create your own HTML components (tags) looks very promising. I guess there will be more business coming for Telerik :).

I wanted to listen to “Live Productive Coder” by Heinz Kabutz but that one started in Greek so I switched the room for “iOS real time content modifications using websockets” by Benny Weingarten-Gabbay.

After lunch I went straight for “Introduction to Docker: What is it and why should I care?” by Ian Miell which IMO was the most interesting talk of the day. It wasn’t very technical but managed to clear some of the mysticism around Docker and what it actually is. I tried to grab a few minutes of Ian’s time and we found topics of common interest to talk about (Project Atomic anyone?) but later failed to find him and continue the talk. I guess I’ll have to follow online.

Tim Perry with “Your Web Stack Would Betray You In An Instant” made a great show. The room was packed, I myself was actually standing the whole time. He described a series of failures across the entire web development stack which gave developers hard times patching and upgrading their services. The lesson: everything fails, be prepared!

The last talk I visited was “GitHub Automation” by Forbes Lindesay. It was more of an inspirational talk, rather than technical one. GitHub provides cool API so why not use it?

Organization

DEVit team

From what I know this is the first year of DEVit. For a first timer the team did great! I particularly liked the two coffee breaks before lunch and in the early afternoon and the sponsors pitches in between the main talks.

All talks were recorded but I have no idea what’s happening with the videos!

I will definitely make a point of visiting Thessaloniki more often and follow the local IT and start-up scenes there. And tonight is Silicon Drinkabout which will be the official after party of DigitalK in Sofia.

Free Software Testing Books

| Comments

There’s a huge list of free books on the topic of software testing. This will definitely be my summer reading list. I hope you find it helpful.

200 Graduation Theses About Software Testing

The guys from QAHelp have compiled a list of 200 graduation theses from various universities which are freely accessible online. The list can be found here.

Why Does Sysctl Not Write Under /sys

| Comments

Recently I’ve been looking into fixing tilde and Fn keys mapping for MacBook Air and thought I could use sysctl to permanently set the desired values. Unfortunately this is not possible. sysctl can only write under /proc/sys and this is hard-coded in the source:

static const char PROC_PATH[] = "/proc/sys/";

IMO this is relatively easy to patch and allow sysctl to read/write values under /sys. The only open question I see is backward compatibility - maybe adding new parameter (e.g. –sysfs) or adding extended sytax e.g. if variable name starts with / then treat it as absolute path.

I’ve asked sysctl maintainers on the procps mailing list but so far got no answer.

Is anyone else interested in this? How do you set parameter values under /sys then ?

NOTE: for my particular purposes I could have used config files under /etc/modprobe.d/ or a startup script (I used that) instead.

Using USB to VGA Adapter on MacBook Air With Linux

| Comments

A quick solution for MacBook Air users running Linux who want to use external projector is to use a USB to VGA adapter. Mine is Plugable UGA-165 and it works great with Red Hat Enterprise Linux 7.1.

After the device is plugged in the udl kernel module is loaded and a new framebuffer device is created (/dev/fb1 in my case). Using mate-display-properties I’m able to configure the 2nd monitor attached to the USB video card. I was able to succeffully display an OpenOffice presentation on the 2nd monitor and play YouTube video.

All USB 2.0 devices from Plugable should be well supported on Linux. For USB 3.0 David Airlie from Red Hat is doing some reverse engineering but I have no idea what the status is. For more info see:

Thunderbolt to Ethernet Adapter on Linux

| Comments

As it seems my Thunderbolt to gigabit Ethernet adapter works with RHEL 7 on a MacBook Air despite some reports it may not.

After plugging the device is automatically recognized and the tg3 driver is loaded. Detailed lspci below:

0a:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM57762 Gigabit Ethernet PCIe
    Subsystem: Apple Inc. Device 00f6
    Physical Slot: 9
    Flags: bus master, fast devsel, latency 0, IRQ 19
    Memory at cd800000 (64-bit, prefetchable) [size=64K]
    Memory at cd810000 (64-bit, prefetchable) [size=64K]
    [virtual] Expansion ROM at cd820000 [disabled] [size=64K]
    Capabilities: [48] Power Management version 3
    Capabilities: [50] Vital Product Data
    Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
    Capabilities: [a0] MSI-X: Enable+ Count=6 Masked-
    Capabilities: [ac] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [13c] Device Serial Number 00-00-ac-87-a3-25-20-33
    Capabilities: [150] Power Budgeting <?>
    Capabilities: [160] Virtual Channel
    Capabilities: [1b0] Latency Tolerance Reporting
    Kernel driver in use: tg3

Unplugging and pluggin back in the network cable works as expected. I did see my computer freeze 2 out of 10 times when I’ve unplugged the Thunderbolt adapter but couldn’t reproduce it repliably or grab more info.

For the record this is with kernel 3.10.0-229.1.2.el7.x86_64 which is missing this upstream commit. I’m not sure why it works though.

If I remember correctly tg3 is available during installation so you should be able to use the Thunderbolt adapter instead of WiFi as well.

Compiling Twinkle SIP Phone on RHEL 7

| Comments

One of the best SIP clients for Linux is Twinkle. However upstream is not active (or even maybe dead) and the package is missing from latest Fedora releases and fails to build on RHEL 7.

First you need to build and install a few dependencies in the following order: ucommon, ccrtp, libzrtpcpp. You will also need EPEL 7 enabled to satisfy build dependencies.

Then apply the following patch to the original twinkle.spec

--- twinkle.spec.orig   2015-05-01 14:07:01.870710147 +0300
+++ twinkle.spec    2015-05-01 15:07:28.734734573 +0300
@@ -47,6 +47,8 @@

 %build
 export LDFLAGS=-lkio 
+export CPPFLAGS="$CPPFLAGS -I/usr/include/libzrtpcpp/" 
+%__autoconf
 %configure
 make %{?_smp_mflags}

The package now builds, installs and runs successfully on RHEL 7. The compiled packages and dependencies are available in my Macbook Air RHEL 7 repository.

Fixing Tilde and Function Keys Mapping for MacBook Air on Linux

| Comments

Thera are two problems with the MacBook Air keyboard on Linux:

Function keys and media keys are switched and by default you have to press Fn+F5 in order to refresh a browser page. The solution is

echo 2 > /sys/module/hid_apple/parameters/fnmode

The tilde key is mapped improperly, see RHBZ #1025041. To fix it

echo 0 > /sys/module/hid_apple/parameters/iso_layout

Permanent fix

Either you have to add the above commands in a boot script or you can yum install mba-kbd-fix from my Macbook Air RHEL 7 repository. The RPM source can be found here.

RHEL 7 Repository for MacBook Air

| Comments

I’ve made a repository with binary (x86_64 only) and source RPM packages which are missing from Red Hat Enterprise Linux 7 and necessary when using a MacBook Air. To install execute the commands below:

cd /etc/yum.repos.d/
wget https://s3.amazonaws.com/atodorov/rpms/macbook/el7/rhel7-macbook.repo

Wireless driver

yum install kmod-wl

Display backlight driver

yum install kmod-mba6x_bl

And uncomment /etc/X11/xorg.conf.d/98-mba_bl.conf.

Note: the .spec file is available from RP #26.

Fixing keyboard mapping

yum install mba-kbd-fix

Fixing Display Brightness on MacBook Air With RHEL 7

| Comments

One issue with RHEL/CentOS/Fedora on MacBook Air laptops is brightness control and backlight behavior after suspend/resume. I’ve found the solution here and only tweaked it slightly for my use case.

mba6x_bl doesn’t load automatically

The reason being the driver matches older hardware:

$ modinfo mba6x_bl
filename:       /lib/modules/3.10.0-229.1.2.el7.x86_64/extra/mba6x_bl/mba6x_bl.ko
alias:          dmi:*:pnMacBookAir6*
license:        GPL
description:    MacBook Air 6,1 and 6,2 backlight driver
author:         Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
rhelversion:    7.1
srcversion:     4D069C8EB0E470AF27E7F8D
depends:        video
vermagic:       3.10.0-229.1.2.el7.x86_64 SMP mod_unload modversions 

My system is MacBookAir7,2 and doesn’t match the module alias. So a quick fix was needed. For more info about MODULE_ALIAS see ArchWiki. Alternatively on Red Hat based systems you can place a config file under /etc/sysconfig/modules, see the docs for more details.

intel_backlight driver is in the way

On older systems mba6x_bl doesn’t get used automatically. The problem is the offending intel_backlight driver which gets used instead. To workaround it add this xorg.conf snippet:

$ cat /etc/X11/xorg.conf.d/98-mba_bl.conf
Section "Device"
    Identifier      "Intel Graphics"
    Driver          "intel"
    Option          "Backlight"     "mba6x_backlight"
EndSection

For more info see RHBZ 989555.

Everything in one go

If you are using RHEL 7 or CentOS 7 (version 7.1 required) instead of Fedora you can take a look at my Macbook Air RHEL 7 repository.

Disabling MacBook Startup Sound in Linux

| Comments

There is an easy way to disable the MacBook startup sound (boot chime) even after wiping out OS X and installing Linux.

This sound can be easily disabled if you mute the volume in OS X and shutdown the computer. The value is stored in NVRAM.

  1. Reboot the computer and hold Cmd+Alt(Option)+R. This will start OS X Internet recovery mode;
  2. Open the terminal and issue the following command

     nvram SystemAudioVolume=%00
    
  3. Reboot.

Voila. In Linux try this:

# efivar -l | grep SystemAudioVolume
 7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolume
 7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolumeDB

# efivar -n 7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolume -p
GUID: 7c436110-ab2a-4bbb-a880-fe41995c9f82
Name: "SystemAudioVolume"
Attributes:
    Non-Volatile
    Boot Service Access
    Runtime Service Access
Value:
00000000  00                                                |.               |

# efivar -n 7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolumeDB -p
GUID: 7c436110-ab2a-4bbb-a880-fe41995c9f82
Name: "SystemAudioVolumeDB"
Attributes:
    Non-Volatile
    Boot Service Access
    Runtime Service Access
Value:
00000000  00 
#

Note 1: Before disabling both variables had non zero values. Also SystemAudioVolumeDB doesn’t seem to have any effect.

Note 2: RHEL or CentOS users need to rebuild efivar from the Fedora src.rpm.

Note 3: several Internet sources suggest that writing EFI variables from Linux may sometimes corrupt your Apple firmware. I didn’t research this any further. If you happen to figure out how to successfully write to these variables under Linux please let everyone know in the comments (in case OS X recovery mode goes missing, you know).

Thanks to my reader Alexander, who gave me the hint in a previous blog post.

Compiling Broadcom Wl-kmod WiFi Driver for RHEL 7

| Comments

After I got my MacBook Air installed with RHEL 7.1 the first priority was getting wireless working. First check if your device isn’t already supported upstream. Mine isn’t

14e4:43a0: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter (rev 03)

Next grab the src.rpm files necessary to build the wl driver from RPM Fusion. For akmods-0.5.2-1.fc21.src.rpm, broadcom-wl-6.30.223.248-2.fc21.src.rpm, kmodtool-1-23.fc20.src.rpm just execute rpmbuild –rebuild against each file and install kmodtool and akmods.

Then you need two more files buildsys-build-rpmfusion and wl-kmod. The first one is a helper tool containing list of recent kernels to build against, the later one is the driver source itself. Both needed minor modifications before building on RHEL 7.

I’ve created my own buildsys-build-rpmfusion package listing the current kernels for RHEL 7.1. For wl-kmod I’ve introduced a patch which modifies the other patches in the package so it builds correctly on 7.1.

Note: I don’t know if there’s a define which can be used to detect if we’re building on RHEL (maybe I can define my own) but direct kernel version number comparison doesn’t work here because Red Hat backports chosen functionality from more recent kernels without changing the version number. This approach may not be the best one but I’ve tried to keep it clean for easier maintenance in the future and it got me started very quickly.

Build the modified buildsys-build-rpmfusion and:

yum install buildsys-build-rpmfusion-7-1.x86_64.rpm buildsys-build-rpmfusion-kerneldevpkgs-current-7-1.x86_64.rpm

Build the wl-kmod package and:

yum install akmod-wl-6.30.223.248-5.el7.x86_64.rpm broadcom-wl-6.30.223.248-2.el7.noarch.rpm kmod-wl-3.10.0-229.el7.x86_64-6.30.223.248-5.el7.x86_64.rpm kmod-wl-6.30.223.248-5.el7.x86_64.rpm

If necessary re-create your initramfs image to include wl.ko.

Installing Red Hat Enterprise Linux 7 on MacBook Air 2015

| Comments

Recently I’ve upgraded to a new MacBook Air (13 inch, early 2015) laptop and luckily enough I’m running Red Hat Enterprise Linux 7.1 on it. Here is how to install it.

Prepare boot media

The easiest method is to boot from a USB stick which holds either the entire DVD or just boot.iso. Since I happened to find a 1GB only USB stick I went for the boot.iso. dd if=boot.iso of=/dev/sdb is the only thing you need to prepare the boot media.

Initial boot

Mac boot menu

While computer is booting hold the (left) Alt (Option) key to enter Startup Manager. Wait a second or two before it displays your local hard drive and the USB boot media. Select the option EFI boot to boot the anaconda installer.

Installation

Booting from a boot.iso means I need to use the network to grab the rest of the installation. Because the wireless card needs proprietary drivers I’ve tried both USB to Ethernet adapter and USB tethering with my phone.

Note: initially I have forgotten to plug in my USB networking card which resulted in bug #1191286. After cold-plugging and rebooting the system everything was fine. Subsequently I don’t see any problems with the USB networking card. The bug should be fixed in RHEL 7.2 btw.

Note: I’ve been using a USB docking station from Plugable for years because their products are Linux friendly. In particular the networking chip is ASIX and there is no problems with drivers for Linux.

UPDATE 2015-05-04: You should also be able to use a Thunderbolt to Ethernet adapter which is more common for Apple users. See here for more info;

In my case I’ve wiped out the entire SSD disk b/c I don’t care about dual boot. Previously I’ve heard about anaconda crashing while it tries to detect the Mac OS file system. I’ve played around with Rawhide before going for RHEL 7.1 and didn’t see any problems related to foreign filesystems.

I’ve gone with the default partitioning scheme while slightly modifing the partition sizes, etc.

Post install

There are several issues which still need attention. I didn’t have enough time in the last few days to check these out:

Things which work

  • GNOME 3 sucks big time. Fortunately I was able to install MATE Desktop from EPEL;
  • Wireless card needs drivers; I’ve managed to compile them myself, see here;
  • Display brightness doesn’t seem to work at all. On top of that the display goes full black after suspend-resume. I could barely see anything on it. Fixed here!
  • There is a very annoying boot chime which I have no idea how to disable Fixed here;
  • The onboard keyboard is quite annoying for previous ThinkPad user like myself. Most importantly I need to press Fn to activate the F1, F2, etc keys which I use a lot in mcedit. Fixed here;
  • Output sound works - both speakers and headphones;
  • Microphone works (tested with a hands free device);
  • Power manager was reporting my battery life totally wrong but after a full discharge/recharge it seems to have calibrated itself;
  • ATrpms and EPEL are still missing some codecs for RHEL 7 which means no movies; codecs seem to work now with the NUX Desktop repos. Not sure what I was missing when testing it initially;
  • UPDATE 2015-05-04: I do have a Thunderbolt to Ethernet adapter and hot-plug seems to work despite claims that this is not supported in Linux. See here for more info;
  • UPDATE 2015-05-05: Presenting via external projector works with a USB to VGA adapter. See here;

Things that don’t work yet

  • UPDATE 2015-04-30: I’d like to remap the Cmd key to the Menu key found in PC keyboards;
  • Camera doesn’t work, reverse engineering a driver is in progress;
  • I’m missing the ThinkLight from my X220, however the integrated Broadcom FaceTime HD camera doesn’t seem to have a LED flash which can be repurposed for this task;
  • I need a CPU temperature monitor and maybe CPU fan speed needs adjustments;

UPDATE 2015-04-28: Check the list above for links to wifi and backlight drivers and how to disable the boot chime.

UPDATE 2015-04-29: You can find precompiled RPMS in my Macbook Air RHEL 7 repository.

UPDATE 2015-04-30: Added more links and split the list into stuff which already works and stuff that doesn’t.

UPDATE 2015-05-04: Added info about Thunderbolt to Ethernet adapter.

UPDATE 2015-05-05: Added info about USB to VGA adapter.

Fedora 22 on MacBook Air

I did try Fedora 22 Beta and experienced bug #1215458. Also for some reason the installation hit an error downloading a package and didn’t let me retry but forced me to exit the process.

I’ll continue posting my updates until the system runs smoothly like it is supposed to.

Hardware info

ADDED ON 2015-05-02

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# dmidecode 
# dmidecode 2.12
# SMBIOS entry point at 0x8afae000
SMBIOS 2.7 present.
32 structures occupying 1663 bytes.
Table at 0x8AFAD000.

Handle 0x0000, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L1 Cache
    Configuration: Enabled, Not Socketed, Level 1
    Operational Mode: Write Back
    Location: Internal
    Installed Size: 32 kB
    Maximum Size: 32 kB
    Supported SRAM Types:
  Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Parity
    System Type: Data
    Associativity: 8-way Set-associative

Handle 0x0001, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L1 Cache
    Configuration: Enabled, Not Socketed, Level 1
    Operational Mode: Write Back
    Location: Internal
    Installed Size: 32 kB
    Maximum Size: 32 kB
    Supported SRAM Types:
  Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Parity
    System Type: Instruction
    Associativity: 8-way Set-associative

Handle 0x0002, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L2 Cache
    Configuration: Enabled, Not Socketed, Level 2
    Operational Mode: Write Back
    Location: Internal
    Installed Size: 256 kB
    Maximum Size: 256 kB
    Supported SRAM Types:
  Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Single-bit ECC
    System Type: Unified
    Associativity: 8-way Set-associative

Handle 0x0003, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L3 Cache
    Configuration: Enabled, Not Socketed, Level 3
    Operational Mode: Write Back
    Location: Internal
    Installed Size: 4096 kB
    Maximum Size: 4096 kB
    Supported SRAM Types:
  Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Multi-bit ECC
    System Type: Unified
    Associativity: 16-way Set-associative

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
    Socket Designation: U3E1
    Type: Central Processor
    Family: Core i7
    Manufacturer: Intel(R) Corporation
    ID: D4 06 03 00 FF FB EB BF
    Signature: Type 0, Family 6, Model 61, Stepping 4
    Flags:
  FPU (Floating-point unit on-chip)
  VME (Virtual mode extension)
  DE (Debugging extension)
  PSE (Page size extension)
  TSC (Time stamp counter)
  MSR (Model specific registers)
  PAE (Physical address extension)
  MCE (Machine check exception)
  CX8 (CMPXCHG8 instruction supported)
  APIC (On-chip APIC hardware supported)
  SEP (Fast system call)
  MTRR (Memory type range registers)
  PGE (Page global enable)
  MCA (Machine check architecture)
  CMOV (Conditional move instruction supported)
  PAT (Page attribute table)
  PSE-36 (36-bit page size extension)
  CLFSH (CLFLUSH instruction supported)
  DS (Debug store)
  ACPI (ACPI supported)
  MMX (MMX technology supported)
  FXSR (FXSAVE and FXSTOR instructions supported)
  SSE (Streaming SIMD extensions)
  SSE2 (Streaming SIMD extensions 2)
  SS (Self-snoop)
  HTT (Multi-threading)
  TM (Thermal monitor supported)
  PBE (Pending break enabled)
    Version: Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz
    Voltage: 1.0 V
    External Clock: 25 MHz
    Max Speed: 2200 MHz
    Current Speed: 3100 MHz
    Status: Populated, Enabled
    Upgrade: <OUT OF SPEC>
    L1 Cache Handle: 0x0001
    L2 Cache Handle: 0x0002
    L3 Cache Handle: 0x0003
    Serial Number:  
    Asset Tag:  
    Part Number:  
    Core Count: 2
    Core Enabled: 2
    Thread Count: 4
    Characteristics:
  64-bit capable
  Multi-Core
  Hardware Thread
  Execute Protection
  Enhanced Virtualization
  Power/Performance Control

Handle 0x0005, DMI type 0, 24 bytes
BIOS Information
    Vendor: Apple Inc.
    Version: MBA71.88Z.0166.B00.1502131457
    Release Date: 02/13/2015
    ROM Size: 8192 kB
    Characteristics:
  PCI is supported
  BIOS is upgradeable
  BIOS shadowing is allowed
  Boot from CD is supported
  Selectable boot is supported
  ACPI is supported
  Smart battery is supported
  Function key-initiated network boot is supported
  UEFI is supported
    BIOS Revision: 0.1

Handle 0x0006, DMI type 1, 27 bytes
System Information
    Manufacturer: Apple Inc.
    Product Name: MacBookAir7,2
    Version: 1.0
    Serial Number: C1MPF52YG944
    UUID: 25EF0280-EC82-42B0-8FB6-10ADCCC67C02
    Wake-up Type: Power Switch
    SKU Number: System SKU#
    Family: Mac

Handle 0x0007, DMI type 2, 17 bytes
Base Board Information
    Manufacturer: Apple Inc.
    Product Name: Mac-937CB26E2E02BB01
    Version: MacBookAir7,2
    Serial Number: C07511704VSG92GA1
    Asset Tag: Base Board Asset Tag#
    Features:
  Board is a hosting board
    Location In Chassis: Part Component
    Chassis Handle: 0x0008
    Type: Motherboard
    Contained Object Handles: 0

Handle 0x0008, DMI type 3, 24 bytes
Chassis Information
    Manufacturer: Apple Inc.
    Type: Laptop
    Lock: Not Present
    Version: Mac-937CB26E2E02BB01
    Serial Number: C1MPF52YG944
    Asset Tag: Chassis Board Asset Tag#
    Boot-up State: Safe
    Power Supply State: Safe
    Thermal State: Safe
    Security Status: None
    OEM Information: 0x00000000
    Height: Unspecified
    Number Of Power Cords: Unspecified
    Contained Elements: 0
    SKU Number: Not Specified

Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: Not Specified
    Internal Connector Type: None
    External Reference Designator: USB0
    External Connector Type: Access Bus (USB)
    Port Type: USB

Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: Not Specified
    Internal Connector Type: None
    External Reference Designator: USB1
    External Connector Type: Access Bus (USB)
    Port Type: USB

Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: Not Specified
    Internal Connector Type: None
    External Reference Designator: Audio Line In
    External Connector Type: Mini Jack (headphones)
    Port Type: Audio Port

Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: Not Specified
    Internal Connector Type: None
    External Reference Designator: Thunderbolt
    External Connector Type: None
    Port Type: Other

Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: Microphone
    Internal Connector Type: Other
    External Reference Designator: Not Specified
    External Connector Type: None
    Port Type: None

Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: Speaker
    Internal Connector Type: Other
    External Reference Designator: Not Specified
    External Connector Type: None
    Port Type: None

Handle 0x000F, DMI type 41, 11 bytes
Onboard Device
    Reference Designation: Integrated Video Controller
    Type: Video
    Status: Enabled
    Type Instance: 1
    Bus Address: 0000:00:00.0

Handle 0x0010, DMI type 41, 11 bytes
Onboard Device
    Reference Designation: Azalia Audio Codec
    Type: Sound
    Status: Enabled
    Type Instance: 1
    Bus Address: 0000:00:00.0

Handle 0x0011, DMI type 41, 11 bytes
Onboard Device
    Reference Designation: SATA
    Type: SATA Controller
    Status: Enabled
    Type Instance: 1
    Bus Address: 0000:00:00.0

Handle 0x0012, DMI type 13, 22 bytes
BIOS Language Information
    Language Description Format: Abbreviated
    Installable Languages: 1
  en
    Currently Installed Language: en

Handle 0x0013, DMI type 22, 26 bytes
Portable Battery
    Location: Not Specified
    Manufacturer: Not Specified
    Name: Not Specified
    Design Capacity: Unknown
    Design Voltage: Unknown
    SBDS Version: Not Specified
    Maximum Error: 0%
    SBDS Serial Number: 0000
    SBDS Manufacture Date: 1980-00-00
    SBDS Chemistry: Not Specified
    OEM-specific Information: 0x00000000

Handle 0x0014, DMI type 32, 11 bytes
System Boot Information
    Status: No errors detected

Handle 0x0015, DMI type 131, 6 bytes
OEM-specific Type
    Header and Data:
  83 06 15 00 06 07

Handle 0x0016, DMI type 133, 12 bytes
OEM-specific Type
    Header and Data:
  85 0C 16 00 02 00 00 00 00 00 00 00

Handle 0x0017, DMI type 128, 88 bytes
OEM-specific Type
    Header and Data:
  80 58 17 00 03 00 00 00 36 F5 03 FC 3F FF 03 FC
  02 00 03 00 00 00 00 00 00 00 99 FF FF FF AF FF
  00 00 B0 FF FF FF D4 FF 00 00 D7 FF FF FF D9 FF
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00

Handle 0x0018, DMI type 134, 20 bytes
OEM-specific Type
    Header and Data:
  86 14 18 00 32 2E 32 37 46 30 31 00 00 00 00 00
  00 00 00 00

Handle 0x0019, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 8 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x001A, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0019
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: SODIMM
    Set: None
    Locator: DIMM0
    Bank Locator: BANK 0
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1600 MHz
    Manufacturer: 0x80AD
    Serial Number: 0x00000000
    Asset Tag: Not Specified
    Part Number: 0x483943434E4E4E384A544D4C41522D4E544D
    Rank: Unknown
    Configured Clock Speed: 1600 MHz

Handle 0x001B, DMI type 130, 186 bytes
OEM-specific Type
    Header and Data:
  82 BA 1B 00 1A 00 00 00 B0 00 91 20 F1 03 04 12
  05 0A 03 11 01 08 0A 00 00 01 78 78 90 50 90 11
  50 E0 10 04 3C 3C 01 90 00 00 00 00 00 00 00 00
  00 A8 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80
  AD 01 00 00 00 00 00 00 57 FB 48 39 43 43 4E 4E
  4E 38 4A 54 4D 4C 41 52 2D 4E 54 4D 00 00 80 AD
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00

Handle 0x001C, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0019
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: SODIMM
    Set: None
    Locator: DIMM0
    Bank Locator: BANK 1
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1600 MHz
    Manufacturer: 0x80AD
    Serial Number: 0x00000000
    Asset Tag: Not Specified
    Part Number: 0x483943434E4E4E384A544D4C41522D4E544D
    Rank: Unknown
    Configured Clock Speed: 1600 MHz

Handle 0x001D, DMI type 130, 186 bytes
OEM-specific Type
    Header and Data:
  82 BA 1D 00 1C 00 00 00 B0 00 91 20 F1 03 04 12
  05 0A 03 11 01 08 0A 00 00 01 78 78 90 50 90 11
  50 E0 10 04 3C 3C 01 90 00 00 00 00 00 00 00 00
  00 A8 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80
  AD 01 00 00 00 00 00 00 57 FB 48 39 43 43 4E 4E
  4E 38 4A 54 4D 4C 41 52 2D 4E 54 4D 00 00 80 AD
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00

Handle 0x001E, DMI type 19, 31 bytes
Memory Array Mapped Address
    Starting Address: 0x0000000000000000k
    Ending Address: 0x00000001FFFFFFFFk
    Range Size: 8 GB
    Physical Array Handle: 0x0019
    Partition Width: 0

Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table

# uname -a
Linux aero 3.10.0-229.1.2.el7.x86_64 #1 SMP Fri Mar 6 17:12:08 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

# lsusb
Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 003: ID 05ac:0291 Apple, Inc. 
Bus 002 Device 002: ID 05ac:8406 Apple, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 05ac:828f Apple, Inc. 

# lspci
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
00:1c.1 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #2 (rev e3)
00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3)
00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3)
00:1c.5 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #6 (rev e3)
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
02:00.0 Multimedia controller: Broadcom Corporation 720p FaceTime HD Camera
03:00.0 Network controller: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter (rev 03)
04:00.0 SATA controller: Samsung Electronics Co Ltd Device a801 (rev 01)

# efivar --list
605dab50-e046-4300-abb6-3dd810dd8b23-MokListRT
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootCurrent
8be4df61-93ca-11d2-aa0d-00e098032b8c-ErrOutDev
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOutDev
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-gfx-saved-config-restore-status
8be4df61-93ca-11d2-aa0d-00e098032b8c-LangCodes
7c436110-ab2a-4bbb-a880-fe41995c9f82-BootCampProcessorPstates
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-SSN
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-GR_CAUSE
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-FirmwareFeatures
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-FirmwareFeaturesMask
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-HW_ICT
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-HW_MLB
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-MLB
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-HW_ROM
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-ROM
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-HW_BID
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-HardwareBootMode
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-BBIF
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut
eb704011-1402-11d3-8e77-00a0c969723b-MTC
7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolume
36c28ab5-6566-4c50-9ebd-cbb920f83843-current-network
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-current-network
7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolumeDB
7c436110-ab2a-4bbb-a880-fe41995c9f82-boot-gamma
7c436110-ab2a-4bbb-a880-fe41995c9f82-backlight-level
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOrder
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0001
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0000
4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14-AAPL,PathProperties0000
8d63d4fe-bd3c-4aad-881d-86fd974bc1df-last-oslogin-ident
36c28ab5-6566-4c50-9ebd-cbb920f83843-preferred-count
36c28ab5-6566-4c50-9ebd-cbb920f83843-preferred-networks
7c436110-ab2a-4bbb-a880-fe41995c9f82-fmm-computer-name
7c436110-ab2a-4bbb-a880-fe41995c9f82-LocationServicesEnabled
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-boot-device
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-boot-device-data
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0080
af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e-AcpiGlobalVariable
7c436110-ab2a-4bbb-a880-fe41995c9f82-bluetoothActiveControllerInfo
7c436110-ab2a-4bbb-a880-fe41995c9f82-bluetoothInternalControllerInfo
8be4df61-93ca-11d2-aa0d-00e098032b8c-fpf_provisioned
8be4df61-93ca-11d2-aa0d-00e098032b8c-epid_provisioned
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootFFFF
8be4df61-93ca-11d2-aa0d-00e098032b8c-Lang
7c436110-ab2a-4bbb-a880-fe41995c9f82-ALS_Data
8be4df61-93ca-11d2-aa0d-00e098032b8c-MemoryConfih
8be4df61-93ca-11d2-aa0d-00e098032b8c-MemoryConfig
8be4df61-93ca-11d2-aa0d-00e098032b8c-Timeout
05299c28-3953-4a5f-b7d8-f6c6a7150b2a-SetupDefaults
4dfbbaab-1392-4fde-abb8-c41cc5ad7d5d-Setup

Videos From Bulgaria Web Summit 2015

| Comments

We're full

Bulgaria Web Summit 2015 is over. The event was incredible and I had a lot of fun moderating the main room. We had many people coming from other countries and I’ve made lots of new friends. Thank you to everyone who attended!

You can find video recordings of all talks in the main room (in order of appearance) below:

Hope to see you next time in Sofia!

Mean while I learned about DEVit in Thessaloniki in May and another one in Zagreb in October. See you there :)

How to Find if LVM Volume Is Thinly Provisioned

| Comments

The latest versions of Red Hat Enterprise Linux, CentOS and Fedora all support LVM thin provisioning. Here’s how to tell if a logical volume has been thinly provisioned or not.

Using lvs to display volume information look under the Attr column. Attribute values have the following meaning:

The lv_attr bits are:

1 Volume type: (C)ache, (m)irrored, (M)irrored without initial sync, (o)rigin,
(O)rigin with merging snapshot, (r)aid, (R)aid without initial sync,
(s)napshot, merging (S)napshot, (p)vmove, (v)irtual, mirror or raid (i)mage,
mirror or raid (I)mage out-of-sync, mirror (l)og device, under (c)onversion,
thin (V)olume, (t)hin pool, (T)hin pool data, raid or pool m(e)tadata or
pool metadata spare.

This is how lvs looks like when you have a regular LVM setup:

1
2
3
4
# lvs
  LV   VG              Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel_dhcp70-183 -wi-ao---- 17,47g                                                    
  swap rhel_dhcp70-183 -wi-ao----  2,00g

When using LVM thin provisioning you’re looking for the left-most attribute bit to be V, t or T. Here’s an example:

1
2
3
4
5
# lvs
  LV     VG              Attr       LSize  Pool   Origin Data%  Meta%  Move Log Cpy%Sync Convert
  pool00 rhel_dhcp71-101 twi-aotz-- 14,55g               7,52   3,86                            
  root   rhel_dhcp71-101 Vwi-aotz-- 14,54g pool00        7,53                                   
  swap   rhel_dhcp71-101 -wi-ao----  2,00g

Tip: Linux-IO Default LUN Is 0 Instead of 1

| Comments

I’ve been testing iBFT in KVM which worked quite well with a RHEL 6 iSCSI target and failed miserably when I switched to RHEL 7 iSCSI target.

1
2
3
4
5
6
iPXE> dhcp net0
DHCP (net0 52:54:00:12:34:56)... ok
iPXE> set keep-san 1
iPXE> sanboot iscsi:10.0.0.1:::1:iqn.2015-05.com.example:target1
Could not open SAN device: Input/output error (http://ipxe.org/1d704539)
iPXE>

The error page says

Note that the default configuration when Linux is the target is for the disk to be LUN 1.

Well this is not true for Linux-IO (targetcli). The default LUN is 0!

1
2
3
iPXE> sanboot iscsi:10.0.0.1:::0:iqn.2015-05.com.example:target1
Registered SAN device 0x80
Booting from SAN device 0x80

Kudos to Bruno Goncalves from Red Hat in helping me debug this issue!

How to Configure Targetcli to Listen on IPv4 and IPv6

| Comments

In order to configure targetcli to listen on both IPv4 and IPv6 one has to delete the default IPv4 portal configuration and replace it with IPv6 instead.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# targetcli 
/>
/> cd iscsi/iqn.2015-04.com.example:target1/tpg1/portals
/iscsi/iqn.20.../tpg1/portals> ls
o- portals ............................................................................................................ [Portals: 1]
  o- 0.0.0.0:3260 ............................................................................................................. [OK]
/iscsi/iqn.20.../tpg1/portals> delete 0.0.0.0 3260
Deleted network portal 0.0.0.0:3260
/iscsi/iqn.20.../tpg1/portals> create ::0
Using default IP port 3260
Created network portal ::0:3260.
/iscsi/iqn.20.../tpg1/portals> ls
o- portals ............................................................................................................ [Portals: 1]
  o- [::0]:3260 ............................................................................................................... [OK]
/iscsi/iqn.20.../tpg1/portals> exit

# netstat -antp | grep 3260
tcp6       0      0 :::3260                 :::*                    LISTEN

It appears the target is listening only on IPv6 but in fact it will also accept connections over IPv4. I’ve tried it.

This is a bit counter intuitive, however if you try adding the IPv6 address without removing the default IPv4 one targetcli will throw an error:

1
2
3
4
/iscsi/iqn.20.../tpg1/portals> create ::0
Using default IP port 3260
Could not create NetworkPortal in configFS.
/>

For more information about targetcli usage see my previous post How to Configure iSCSI Target on Red Hat Enterprise Linux 7.