boto is currently certified at Journeyer level.

Name: Eduardo Habkost
Member since: 2001-09-22 05:04:36
Last Login: 2007-11-07 13:06:03

FOAF RDF Share This

Homepage: http://www.raisama.net

Notes:

As I won't update this page frequently, you should look at my web page if you want to know something about me.

Projects

Recent blog entries by boto

Syndication: RSS 2.0

SMART and bad block reallocation fun

I’ve spent last night trying to find out how to handle some bad blocks reported by smartd, on the hard disk of a old laptop. The Bad block HOWTO for smartmoontools has lots of useful information, but too many calculations to be done by hand. To ease on the task, I’ve written a script to help on the task. The script simply does the calculations described on the HOWTO and shows you the result.

This is a sample run:

# ./lba2fs.py /dev/sda 11475078  # SMART says LBA 11475078 is bad
lba2fs, by Eduardo Habkost <ehabkost@raisama.net>
If you want to know what to do with the output of this program, check:

http://smartmontools.sourceforge.net/badblockhowto.html

[/dev/sda sector 11475078]
Press Return to automatically probe, or enter command:
cmd>
I think I've found: partition table
Checking the partition list...
/dev/sda2 sector 11073453
[/dev/sda2 sector 11073453]
Press Return to automatically probe, or enter command:
cmd>
I think I've found: LVM volume
Checking the PE where the block is located
pe_start: 384 sectors
PE: 168
Checking on which LV the PE is located
Found PE range on map (LV)
Checking maps of LV...
/dev/VolGroup00/LogVol00 sector 11073069
[/dev/VolGroup00/LogVol00 sector 11073069]
Press Return to automatically probe, or enter command:
cmd>
I think I've found: ext3 filesystem
Checking ext2 fs block...
Block size: 4096
Block: 1384133
debugfs 1.41.4 (27-Jan-2009)

GOOD: ext2fs block 1384133 at /dev/VolGroup00/LogVol00, not in use

You can zero the block running the following command, but:
1) Don't do that if the device is in use (e.g. filesystem mounted)
2) *You will lose data* that is stored on the block. It looks like
   It is safe to do that on this block, but be careful. Are your
   backups up to date?  8)

  dd if=/dev/zero of=/dev/VolGroup00/LogVol00 bs=4096 count=1 seek=1384133

I recommend doing a read-test on the block first, to see if an I/O error
is returned. Use the 'read' command for that.

[ext2fs block 1384133 at /dev/VolGroup00/LogVol00, not in use]
Press Return to automatically probe, or enter command:
cmd>

As you can see above, fortunately on my case the bad block was unused on the ext2 filesystem, and I could safely write to it to force the drive to reallocate the bad sector, and the I/O errors are gone.

The script just try to read from the devices, with no code to write to them, so it should be always safe to run it. However, be very careful when using the numbers calculated by it to write to a disk sector. Always keep your backups up to date.

Syndicated 2009-03-22 20:01:20 from Eduardo Habkost / diary » In English

As merdas que a gente escreve

English readers: skip to the paragraph in engrish below. It’s the fun part. 8)

Ontem eu estava organizando o monte de tranqueira que tenho guardada nos armários. E achei o texto do meu “projeto final” do curso técnico de processamento de dados que fiz na ET-UFPR, durante o ensino médio.

O projeto final do curso da ET-UFPR era uma maneira dos alunos fazerem de conta que aprenderam a programar e a planejar um sistema de informação, e da escola manter os alunos (bastante) ocupados durante o último ano do curso. Não importa que você aprendeu a programar, que o programa que foi feito não funciona (e se compõe principalmente de telinhas bonitinhas feitas arrastando componentes no Delphi), nem que você não sabe pra que diabos vai usar a maior parte dos diagramas que botou na “monografia” do seu projeto final. O mais importante é que você teve muito trabalho para fazer o projeto.

(A maior prova de que o projeto era um grande faz-de-conta é o nome que encontrei na página da dedicatória. Sério: onde a minha equipe (incluindo eu) estava com a cabeça quando dedicou o trabalho ao MJB[1]?)

O trabalho tinha um “resumo”, em português, e um “abstract”, em inglês (não lembro se isso foi idéia da nossa equipe ou de algum professor fã de protocolos acadêmicos). O texto em inglês foi a coisa mais hilária que li recentemente. A equipe que fez o trabalho era composta de quatro pessoas, e eu não lembro quem foi que traduziu o texto para o inglês. Mas tenho certeza que todos os quatro revisaram a coisa e acharam que estava bom.

Para sua diversão, aqui estão as duas versões do texto, exatamente do jeito que encontrei. Em minha defesa, eu só posso dizer: eu tinha 16 anos na época.

Em português:

Resumo

Um zoológico é um local que disponibiliza aos visitantes a oportunidade de conhecer animais de várias partes do mundo, proporcionando simultaneamente lazer e conhecimento. Para que este objetivo seja alcançado, é necessário um trabalho de bastidores que envolve material humano (técnicos-administrativos com as mais diversas funções), controle da dieta e da saúde dos animais e orientação aos visitantes. Diante do grande volume de dados e informações necessárias para este controle, que deve ser feito de forma rápida e eficiente, os recursos da informática tornam-se ferramentas muito úteis. Assim, estamos desenvolvendo um aplicativo que tem como objetivo auxiliar os técnicos veterinários no gerenciamento de algumas informações relativas aos animais que ali estão alojados, como: alimentação, ocorrências veterinárias e alojamentos; e além disso, proporcionar aos visitantes, através de recursos audiovisuais (multimídia), uma forma interativa de obter informações gerais sobre os animais: localização no zoológico, origem, alimentação, peculiaridades, etc., bem como sua própria situação na área do parque. Estamos utilizando como ferramentas para o desenvolvimento do sistema a metodologia de análise orientada a objeto, UML, descrita por FURLAN (1998) e a linguagem de programação Borland Delphi, versão 4.0, utilizando SQL Server para o gerenciamento do banco de dados. O aplicativo será disponibilizado para utilização em rede, sob o sistema operacional Windows 95 ou superior. A implantação do sistema possibilitará uma redução no volume de papéis e no esforço necessário para o controle dos animais, melhor orientação e maior comodidade aos visitantes e também uma melhora significativa no processo de gestão do zoológico.


Em inglês:

(English readers: the piece of engrish below is an excerpt (typed exactly as-is) from the documentation of a “project” my team produced at a technical course during high school. It’s pure fun, so I am sharing it. In my defense, all I can say is: I was only 16.)

Abstract

A zoo is a place that gives to the visitor the opportunity to know animals of anywhere in the world, offer simultaneously leisure and knowing. To this purpose be reached, is necessary a lot of work of the tambours, that include human material (manage technician with several functions), the control of the alimentation and the healthy of the animals and orientation to the visitors. Because of the large volume of information necessary to this control, that has to be done fast and efficaciously, the resourses of technology became tools so useful. So, we are developing a system that has a purpose an auxiliary to veterinary technician in the management of some information relatives to the animals that are accommodated, how: alimentation, veterinary occurrence and accommodation; and beyond, offer to the visitants through multimedia, an interactive form to get general information about the animals: localization in the zoo, origin, alimentation, peculiarities, etc., his own situation in the area of the park. We are using UML, described by FURLAN (1998) as object-oriented analysis method. The programming language used was Borland Delphi, version 4.0, with SQL Server to the management of the Data Base. The system will be available to use in network, under the operation system Windows 95 or updated. The implantation of the system will allow a decrease of paper volume and work necessary to animals control, a better orientation and a bigger confort for the visitors and a signification improve in the management of the zoo.


[1] O professor orientador durante o projeto. Vou me abster de comentar sobre o que acho dele.

Syndicated 2008-10-20 02:08:33 from Eduardo Habkost / diary

Meme

Meme

From Rich Sharples:

  1. Take a picture of yourself right now.
  2. Don’t change your clothes, don’t fix your hair…just take a picture.
  3. Post that picture with NO editing.
  4. Post these instructions with your picture.

Via Rich Sharples:

  1. Tire uma fotos sua nesse exato momento.
  2. NÃO troque de roupa, NÃO arrume seu cabelo. Simplesmente tire uma foto.
  3. Poste essa foto, SEM editá-la.
  4. Poste estas instruções junto com a foto.

Syndicated 2008-10-02 17:20:35 from Eduardo Habkost / diary

4a7d3d609129a9296bf7ac0608c2097

Can somebody explain to me where this hex string comes from?

It has lots of matches on Google. Most of them are on blog comments. But they appear on valid comments, so I don’t think it is some marker string being used by spam bots.

Syndicated 2008-03-27 17:33:14 from Eduardo Habkost / diary

Getting a mailing-list archive URL from a Message-ID

It happens often to me: I am reading a mailing list on mutt and I want to send a pointer to the message to somebody.

I always wanted to be able to press a key on mutt, and a script would query mailing list archives and find a URL for the message on a mailing list archive. Today I have found this to be possible. Gmane has a “Message-Id” URL format tha allows you to do it. Just point to http://mid.gmane.org/<message-id> and it will redirect to the message on the archives, if it is present.

Now, getting a URL for a mailing list message is as simple as piping the message from mutt to this small script:

#!/bin/bash
mid="$(grep -m 1 -i ^Message-ID: | cut -d: -f2 | sed -e 's/^ *//')"
kfmclient openURL 'http://mid.gmane.org/'"$mid"

And this can be bound this to a keystroke under mutt by simply using something like this on .muttrc:

macro pager U "msg2url\n”

There are other mailing list archives with similar features. But they are more specific to some mailing lists, so they are not as comprehensive as Gmane. Some examples:

  • http://kerneltrap.org/mailarchive/message-id/<message-id> (for KernelTrap mailing list archives)
  • http://www.red-bean.com/threadfind (mostly Subversion-related mailing lists)

Syndicated 2007-10-09 15:50:55 from Eduardo Habkost / diary

22 older entries...

 

boto certified others as follows:

  • boto certified boto as Journeyer
  • boto certified rms as Master
  • boto certified clausen as Master
  • boto certified marcelo as Master
  • boto certified baretta as Journeyer
  • boto certified gwm as Journeyer
  • boto certified lclaudio as Master
  • boto certified niemeyer as Master
  • boto certified riel as Master
  • boto certified ruda as Journeyer
  • boto certified Roxo as Journeyer
  • boto certified maragato as Journeyer
  • boto certified webseeker as Apprentice
  • boto certified bruder as Journeyer
  • boto certified xsandro as Apprentice
  • boto certified ralf as Master
  • boto certified godoy as Journeyer
  • boto certified morcego as Journeyer
  • boto certified olive as Master
  • boto certified minami as Journeyer
  • boto certified fbl as Journeyer
  • boto certified eliphas as Journeyer
  • boto certified claudio as Master
  • boto certified quintela as Journeyer
  • boto certified jgarzik as Master
  • boto certified livio as Journeyer
  • boto certified davem as Master
  • boto certified aristeu as Journeyer
  • boto certified caio1982 as Apprentice
  • boto certified spuk as Apprentice
  • boto certified DV as Master

Others have certified boto as follows:

  • boto certified boto as Journeyer
  • clausen certified boto as Apprentice
  • acme certified boto as Journeyer
  • maragato certified boto as Apprentice
  • ruda certified boto as Journeyer
  • webseeker certified boto as Apprentice
  • bruder certified boto as Apprentice
  • xsandro certified boto as Apprentice
  • minami certified boto as Journeyer
  • fbl certified boto as Journeyer
  • morcego certified boto as Journeyer
  • niemeyer certified boto as Journeyer
  • riel certified boto as Journeyer
  • livio certified boto as Journeyer
  • caio1982 certified boto as Master
  • rootsh certified boto as Apprentice
  • faw certified boto as Master
  • chakie certified boto as Master
  • nixnut certified boto as Master
  • lmvaz certified boto as Master

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page