1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries tagged english
</title>
5 <description>Entries tagged english
</description>
10 <title>The sorry state of multimedia browser plugins in Debian
</title>
11 <link>../../The_sorry_state_of_multimedia_browser_plugins_in_Debian.html
</link>
12 <guid isPermaLink=
"true">../../The_sorry_state_of_multimedia_browser_plugins_in_Debian.html
</guid>
13 <pubDate>Tue,
25 Nov
2008 00:
10:
00 +
0100</pubDate>
15 <p
>Recently I have spent some time evaluating the multimedia browser
16 plugins available in Debian Lenny, to see which one we should use by
17 default in Debian Edu. We need an embedded video playing plugin with
18 control buttons to pause or stop the video, and capable of streaming
19 all the multimedia content available on the web. The test results and
20 notes are available on
21 <a href=
"http://wiki.debian.org/DebianEdu/BrowserMultimedia
">the
22 Debian wiki
</a
>. I was surprised how few of the plugins are able to
23 fill this need. My personal video player favorite, VLC, has a really
24 bad plugin which fail on a lot of the test pages. A lot of the MIME
25 types I would expect to work with any free software player (like
26 video/ogg), just do not work. And simple formats like the
27 audio/x-mplegurl format (m3u playlists), just isn
't supported by the
28 totem and vlc plugins. I hope the situation will improve soon. No
29 wonder sites use the proprietary Adobe flash to play video.
</p
>
31 <p
>For Lenny, we seem to end up with the mplayer plugin. It seem to
32 be the only one fitting our needs. :/
</p
>
37 <title>Devcamp brought us closer to the Lenny based Debian Edu release
</title>
38 <link>../../Devcamp_brought_us_closer_to_the_Lenny_based_Debian_Edu_release.html
</link>
39 <guid isPermaLink=
"true">../../Devcamp_brought_us_closer_to_the_Lenny_based_Debian_Edu_release.html
</guid>
40 <pubDate>Sun,
7 Dec
2008 12:
00:
00 +
0100</pubDate>
42 <p
>This weekend we had a small developer gathering for Debian Edu in
43 Oslo. Most of Saturday was used for the general assemly for the
44 member organization, but the rest of the weekend I used to tune the
45 LTSP installation. LTSP now work out of the box on the
10-network.
46 Acer Aspire One proved to be a very nice thin client, with both
47 screen, mouse and keybard in a small box. Was working on getting the
48 diskless workstation setup configured out of the box, but did not
49 finish it before the weekend was up.
</p
>
51 <p
>Did not find time to look at the
4 VGA cards in one box we got from
52 the Brazilian group, so that will have to wait for the next
53 development gathering. Would love to have the Debian Edu installer
54 automatically detect and configure a multiseat setup when it find one
55 of these cards.
</p
>
60 <title>Software video mixer on a USB stick
</title>
61 <link>../../Software_video_mixer_on_a_USB_stick.html
</link>
62 <guid isPermaLink=
"true">../../Software_video_mixer_on_a_USB_stick.html
</guid>
63 <pubDate>Sun,
28 Dec
2008 15:
40:
00 +
0100</pubDate>
65 <p
>The
<a href=
"http://www.nuug.no/
">Norwegian Unix User Group
</a
> is
66 recording our montly presentation on video, and recently we have
67 worked on improving the quality of the recordings by mixing the slides
68 directly with the video stream. For this, we use the
69 <a href=
"http://dvswitch.alioth.debian.org/
">dvswitch
</a
> package from
70 the Debian video team. As this require quite one computer per video
71 source, and NUUG do not have enough laptops available, we need to
72 borrow laptops. And to avoid having to install extra software on
73 these borrwed laptops, I have wrapped up all the programs needed on a
74 bootable USB stick. The software required is dvswitch with assosiated
75 source, sink and mixer applications and
76 <a href=
"http://www.kinodv.org/
">dvgrab
</a
>. To allow this setup to
77 work without any configuration, I
've patched dvswitch to use
78 <a href=
"http://www.avahi.org/
">avahi
</a
> to connect the various parts
79 together. And to allow us to use laptops without firewire plugs, I
80 upgraded dvgrab to the one from Debian/unstable to get one that work
81 with USB sources. We have not yet tested this setup in a production
82 setup, but I hope it will work properly, and allow us to set up a
83 video mixer in a very short time frame. We will need it for
84 <a href=
"http://www.goopen.no/
">Go Open
2009</a
>.
</p
>
86 <p
><a href=
"http://www.nuug.no/pub/video/bin/usbstick-dvswitch.img.gz
">The
87 USB image
</a
> is for a
1 GB memory stick, but can be used on any
88 larger stick as well.
</p
>
93 <title>When web browser developers make a video player...
</title>
94 <link>../../When_web_browser_developers_make_a_video_player___.html
</link>
95 <guid isPermaLink=
"true">../../When_web_browser_developers_make_a_video_player___.html
</guid>
96 <pubDate>Sat,
17 Jan
2009 18:
50:
00 +
0100</pubDate>
98 <p
>As part of the work we do in
<a href=
"http://www.nuug.no
">NUUG
</a
>
99 to publish video recordings of our monthly presentations, we provide a
100 page with embedded video for easy access to the recording. Putting a
101 good set of HTML tags together to get working embedded video in all
102 browsers and across all operating systems is not easy. I hope this
103 will become easier when the
&lt;video
&gt; tag is implemented in all
104 browsers, but I am not sure. We provide the recordings in several
105 formats, MPEG1, Ogg Theora, H
.264 and Quicktime, and want the
106 browser/media plugin to pick one it support and use it to play the
107 recording, using whatever embed mechanism the browser understand.
108 There is at least four different tags to use for this, the new HTML5
109 &lt;video
&gt; tag, the
&lt;object
&gt; tag, the
&lt;embed
&gt; tag and
110 the
&lt;applet
&gt; tag. All of these take a lot of options, and
111 finding the best options is a major challenge.
</p
>
113 <p
>I just tested the experimental Opera browser available from
<a
114 href=
"http://labs.opera.com
">labs.opera.com
</a
>, to see how it handled
115 a
&lt;video
&gt; tag with a few video sources and no extra attributes.
116 I was not very impressed. The browser start by fetching a picture
117 from the video stream. Not sure if it is the first frame, but it is
118 definitely very early in the recording. So far, so good. Next,
119 instead of streaming the
76 MiB video file, it start to download all
120 of it, but do not start to play the video. This mean I have to wait
121 for several minutes for the downloading to finish. When the download
122 is done, the playing of the video do not start! Waiting for the
123 download, but I do not get to see the video? Some testing later, I
124 discover that I have to add the controls=
"true
" attribute to be able
125 to get a play button to pres to start the video. Adding
126 autoplay=
"true
" did not help. I sure hope this is a misfeature of the
127 test version of Opera, and that future implementations of the
128 &lt;video
&gt; tag will stream recordings by default, or at least start
129 playing when the download is done.
</p
>
131 <p
>The test page I used (since changed to add more attributes) is
132 <a href=
"http://www.nuug.no/aktiviteter/
20090113-foredrag-om-foredrag/
">available
133 from the nuug site
</a
>. Will have to test it with the new Firefox
136 <p
>In the test process, I discovered a missing feature. I was unable
137 to find a way to get the URL of the playing video out of Opera, so I
138 am not quite sure it picked the Ogg Theora version of the video. I
139 sure hope it was using the announced Ogg Theora support. :)
</p
>
144 <title>Using bar codes at a computing center
</title>
145 <link>../../Using_bar_codes_at_a_computing_center.html
</link>
146 <guid isPermaLink=
"true">../../Using_bar_codes_at_a_computing_center.html
</guid>
147 <pubDate>Fri,
20 Feb
2009 08:
50:
00 +
0100</pubDate>
149 <p
>At work with the University of Oslo, we have several hundred computers
150 in our computing center. This give us a challenge in tracking the
151 location and cabling of the computers, when they are added, moved and
152 removed. Some times the location register is not updated when a
153 computer is inserted or moved and we then have to search the room for
154 the
"missing
" computer.
</p
>
156 <p
>In the last issue of Linux Journal, I came across a project
157 <a href=
"http://www.libdmtx.org/
">libdmtx
</a
> to write and read bar
158 code blocks as defined in the
159 <a href=
"http://en.wikipedia.org/wiki/Data_Matrix
">The Data Matrix
160 Standard
</a
>. This is bar codes that can be read with a normal
161 digital camera, for example that on a cell phone, and several such bar
162 codes can be read by libdmtx from one picture. The bar code standard
163 allow up to
2 KiB to be written in the tag. There is another project
164 with
<a href=
"http://www.terryburton.co.uk/barcodewriter/
">a bar code
165 writer written in postscript
</a
> capable of creating such bar codes,
166 but this was the first time I found a tool to read these bar
169 <p
>It occurred to me that this could be used to tag and track the
170 machines in our computing center. If both racks and computers are
171 tagged this way, we can use a picture of the rack and all its
172 computers to detect the rack location of any computer in that rack.
173 If we do this regularly for the entire room, we will find all
174 locations, and can detect movements and removals.
</p
>
176 <p
>I decided to test if this would work in practice, and picked a
177 random rack and tagged all the machines with their names. Next, I
178 took pictures with my digital camera, and gave the dmtxread program
179 these JPEG pictures to see how many tags it could read. This worked
180 fairly well. If the pictures was well focused and not taken from the
181 side, all tags in the image could be read. Because of limited space
182 between the racks, I was unable to get a good picture of the entire
183 rack, but could without problem read all tags from a picture covering
184 about half the rack. I had to limit the search time used by dmtxread
185 to
60000 ms to make sure it terminated in a reasonable time frame.
</p
>
187 <p
>My conclusion is that this could work, and we should probably look
188 at adjusting our computer tagging procedures to use bar codes for
189 easier automatic tracking of computers.
</p
>
194 <title>Checking server hardware support status for Dell, HP and IBM servers
</title>
195 <link>../../Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html
</link>
196 <guid isPermaLink=
"true">../../Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html
</guid>
197 <pubDate>Sat,
28 Feb
2009 23:
50:
00 +
0100</pubDate>
199 <p
>At work, we have a few hundred Linux servers, and with that amount
200 of hardware it is important to keep track of when the hardware support
201 contract expire for each server. We have a machine (and service)
202 register, which until recently did not contain much useful besides the
203 machine room location and contact information for the system owner for
204 each machine. To make it easier for us to track support contract
205 status, I
've recently spent time on extending the machine register to
206 include information about when the support contract expire, and to tag
207 machines with expired contracts to make it easy to get a list of such
208 machines. I extended a perl script already being used to import
209 information about machines into the register, to also do some screen
210 scraping off the sites of Dell, HP and IBM (our majority of machines
211 are from these vendors), and automatically check the support status
212 for the relevant machines. This make the support status information
213 easily available and I hope it will make it easier for the computer
214 owner to know when to get new hardware or renew the support contract.
215 The result of this work documented that
27% of the machines in the
216 registry is without a support contract, and made it very easy to find
217 them.
27% might seem like a lot, but I see it more as the case of us
218 using machines a bit longer than the
3 years a normal support contract
219 last, to have test machines and a platform for less important
220 services. After all, the machines without a contract are working fine
221 at the moment and the lack of contract is only a problem if any of
222 them break down. When that happen, we can either fix it using spare
223 parts from other machines or move the service to another old
226 <p
>I believe the code for screen scraping the Dell site was originally
227 written by Trond Hasle Amundsen, and later adjusted by me and Morten
228 Werner Forsbring. The HP scraping was written by me after reading a
229 nice article in ;login: about how to use WWW::Mechanize, and the IBM
230 scraping was written by me based on the Dell code. I know the HTML
231 parsing could be done using nice libraries, but did not want to
232 introduce more dependencies. This is the current incarnation:
</p
>
240 sub get_support_info {
241 my ($machine, $model, $serial, $productnumber) = @_;
244 if ( $model =~ m/^Dell / ) {
245 # fetch website from Dell support
246 my $url =
"http://support.euro.dell.com/support/topics/topic.aspx/emea/shared/support/my_systems_info/no/details?c=no
&amp;cs=nodhs1
&amp;l=no
&amp;s=dhs
&amp;ServiceTag=$serial
";
247 my $webpage = get($url);
248 return undef unless ($webpage);
251 my @lines = split(/\n/, $webpage);
252 foreach my $line (@lines) {
253 next unless ($line =~ m/Beskrivelse/);
254 $line =~ s/
&lt;[^
>]+?
>/;/gm;
255 $line =~ s/^.+?;(Beskrivelse;)/$
1/;
257 my @f = split(/\;/, $line);
259 my $lastend =
"";
260 while ($f[
3] eq
"DELL
") {
261 my ($type, $startstr, $endstr, $days) = @f[
0,
5,
7,
10];
263 my $start = POSIX::strftime(
"%Y-%m-%d
",
264 localtime(str2time($startstr)));
265 my $end = POSIX::strftime(
"%Y-%m-%d
",
266 localtime(str2time($endstr)));
267 $str .=
"$type $start -
> $end
";
269 $lastend = $end if ($end gt $lastend);
271 my $today = POSIX::strftime(
"%Y-%m-%d
", localtime(time));
272 tag_machine_unsupported($machine)
273 if ($lastend lt $today);
275 } elsif ( $model =~ m/^HP / ) {
276 my $mech = WWW::Mechanize-
>new();
278 'http://www1.itrc.hp.com/service/ewarranty/warrantyInput.do
';
281 'BODServiceID
' =
> 'NA
',
282 'RegisteredPurchaseDate
' =
> '',
283 'country
' =
> 'NO
',
284 'productNumber
' =
> $productnumber,
285 'serialNumber1
' =
> $serial,
287 $mech-
>submit_form( form_number =
> 2,
288 fields =
> $fields );
289 # Next step is screen scraping
290 my $content = $mech-
>content();
292 $content =~ s/
&lt;[^
>]+?
>/;/gm;
293 $content =~ s/\s+/ /gm;
294 $content =~ s/;\s*;/;;/gm;
295 $content =~ s/;[\s;]+/;/gm;
297 my $today = POSIX::strftime(
"%Y-%m-%d
", localtime(time));
299 while ($content =~ m/;Warranty Type;/) {
300 my ($type, $status, $startstr, $stopstr) = $content =~
301 m/;Warranty Type;([^;]+);.+?;Status;(\w+);Start Date;([^;]+);End Date;([^;]+);/;
302 $content =~ s/^.+?;Warranty Type;//;
303 my $start = POSIX::strftime(
"%Y-%m-%d
",
304 localtime(str2time($startstr)));
305 my $end = POSIX::strftime(
"%Y-%m-%d
",
306 localtime(str2time($stopstr)));
308 $str .=
"$type ($status) $start -
> $end
";
310 tag_machine_unsupported($machine)
313 } elsif ( $model =~ m/^IBM / ) {
314 # This code ignore extended support contracts.
315 my ($producttype) = $model =~ m/.*-\[(.{
4}).+\]-/;
316 if ($producttype
&amp;
&amp; $serial) {
318 get(
"http://www-
947.ibm.com/systems/support/supportsite.wss/warranty?action=warranty
&amp;brandind=
5000008&amp;Submit=Submit
&amp;type=$producttype
&amp;serial=$serial
");
320 $content =~ s/
&lt;[^
>]+?
>/;/gm;
321 $content =~ s/\s+/ /gm;
322 $content =~ s/;\s*;/;;/gm;
323 $content =~ s/;[\s;]+/;/gm;
325 $content =~ s/^.+?;Warranty status;//;
326 my ($status, $end) = $content =~ m/;Warranty status;([^;]+)\s*;Expiration date;(\S+) ;/;
328 $str .=
"($status) -
> $end
";
330 my $today = POSIX::strftime(
"%Y-%m-%d
", localtime(time));
331 tag_machine_unsupported($machine)
340 <p
>Here are some examples on how to use the function, using fake
341 serial numbers. The information passed in as arguments are fetched
342 from dmidecode.
</p
>
345 print get_support_info(
"hp.host
",
"HP ProLiant BL460c G1
",
"1234567890"
346 "447707-B21
");
347 print get_support_info(
"dell.host
",
"Dell Inc. PowerEdge
2950",
"1234567");
348 print get_support_info(
"ibm.host
",
"IBM eserver xSeries
345 -[
867061X]-
",
349 "1234567");
352 <p
>I would recommend this approach for tracking support contracts for
353 everyone with more than a few computers to administer. :)
</p
>
355 <p
>Update
2009-
03-
06: The IBM page do not include extended support
356 contracts, so it is useless in that case. The original Dell code do
357 not handle extended support contracts either, but has been updated to