The Grow statistics of my (private) mailbox

Yesterday, I decided to reorganize my ‘Archive’ folder of my private mailbox.

My policy is, don’t remove e-mail except if it’s spam :-D

And I noticed some ‘growing’ of the number of e-mails per year in the archive:

 Year Number of mails
2003 133
2004 530
2005 706
2006 865
2007 1869
2008 2335
2009 2832

So some nice graph of it will be:

Mozilla Labs Weave

In one of the last Linux Magazine issues, there was an article with the title “Untangling the Web with Mozilla Weave“. I really recognized the issue of having several Firefox instances with their own bookmarks/tabs/et cetera.

So I thought… let’s give it a try, and so far… it works fine for me. I’ve now set up Weave on my Linux Laptop and Linux workstation at home. The upcoming week I will set up weave for my Linux workstation at work and on my Portable Apps Firefox on ahum Windows Vista workstation.

Load Grid Engine accounting file into MySQL

Recently I need to create a report about utilization of an HPC Cluster that uses Grid Engine, but we didn’t had ARCO and so not running yet for that cluster :-(

So I digged into my brain on how to load data from a “RAW” format into a database… it’s something I did when I worked for PricewaterhouseCoopers Advisory, but then I used financial data.

Please press the continue reading link below… to read more :-D

First you need to create a database within MySQL:

mysql> create database ge_accounting;

Then we create a table containing the accounting information, so we create a file name (for example) create-tables.sql:

create table ge_jobs
(
ge_qname char(30) not null,
ge_hostname char(30) not null,
ge_group char(10) not null,
ge_owner char(10) not null,
ge_job_name char(255) not null,
ge_job_number int unsigned not null primary key,
ge_account char(30) not null,
ge_account_prio int unsigned not null,

tmp_submission_time int unsigned not null,
tmp_start_time int unsigned not null,
tmp_end_time int unsigned not null,

ge_failed int unsigned not null,
ge_exit_status int unsigned not null,
ge_ru_wallclock int unsigned not null,
ge_ru_utime int unsigned not null,
ge_ru_stime int unsigned not null,
ge_ru_maxrss int unsigned not null,
ge_ru_ixrss int unsigned not null,
ge_ru_ismrss int unsigned not null,
ge_ru_idrss int unsigned not null,
ge_ru_isrss int unsigned not null,
ge_ru_minflt int unsigned not null,
ge_ru_majflt int unsigned not null,
ge_ru_nswap int unsigned not null,
ge_ru_inblock int unsigned not null,
ge_ru_oublock int unsigned not null,
ge_ru_msgsnd int unsigned not null,
ge_ru_msgrcv int unsigned not null,
ge_ru_nsignals int unsigned not null,
ge_ru_nvcsw int unsigned not null,
ge_ru_nivcsw int unsigned not null,
ge_project char(30) not null,
ge_department char(30) not null,
ge_granted_pe char(30),
ge_slots int unsigned not null,
ge_task_number int unsigned not null,
ge_cpu int unsigned not null,
ge_mem int unsigned not null,
ge_io int unsigned not null,
ge_category char(255),
ge_iow int unsigned not null,
ge_pe_taskid char(30),
ge_maxvmem int unsigned not null,
ge_arid int unsigned not null,

tmp_ar_submission_time int unsigned not null,

ge_submission_time timestamp not null,
ge_start_time timestamp not null,
ge_end_time timestamp not null,
ge_ar_submission_time timestamp not null

);

So use mysql to load the data:

$ mysql -u root -p ge_accounting < create-tables.sql

Now we can load the data into the database. For this example $SGE_ROOT is set to /apps/ge and the $SGE_CELL is set to default.

$ mysql -u root -p ge_accounting

mysql> LOAD DATA INFILE ‘/apps/ge/default/accounting/accounting’
REPLACE
INTO TABLE ge_jobs
FIELDS TERMINATED BY ‘:’
IGNORE 4 LINES;

And now we’ve to convert the EPOCH time stamps into nice timestamps using the following query:

mysql> UPDATE ge_jobs
SET ge_submission_time = (SELECT FROM_UNIXTIME(tmp_submission_time)),
ge_start_time = (SELECT FROM_UNIXTIME(tmp_start_time)),
ge_end_time = (SELECT FROM_UNIXTIME(tmp_end_time)),
ge_ar_submission_time = (SELECT FROM_UNIXTIME(tmp_ar_submission_time));

And now you can make a query that show a utilization per month based on 16 available slots, but with a 10% reserved non availability due to maintanance by admins:

mysql> SELECT MONTH(ge_submission_time) AS show_month,
SUM(ge_ru_wallclock * ge_slots) AS total_wallclock,
(SUM(ge_ru_wallclock * ge_slots) / (DATE_FORMAT(LAST_DAY(ge_submission_time),’%d’) * 86400 * 16 * 0.9) * 100) AS total_util
FROM ge_jobs
WHERE YEAR(ge_submission_time) = ‘2009’
GROUP BY show_month
ORDER BY show_month;

Please note, the query above is not perferct! I use it based on the submission time… but it doesn’t handle jobs that run in multiple months… have to tweak my query a little bit more for this.

Bleeding edge, is indeed bleeding edge

Yesterday I thought let’s play with FC12 (aka Rawhide, aka FC11.90). So I enabled the Rawhide-repositories on my FC11 laptop and entered “yum -y update”. And after a while it was there… bleeding edge kernel and other packages.

The first issue I run into, was that Firefox 3.5 was not able to run, it caused a segfault. :-( There seems to be a bug in the xulrunner package. So I was able to fix it, by “downgrading” Firefox to 3.0.11, but that one crashed on pages using “Adobe Flash plugin”. So I removed the flash plugin, because I wanted bleeding edge Fedora. So having that “sort out” I wanted to suspend my laptop, and guess what… It didn’t want to suspend… so after some hacking around… it still didn’t work.

So my final decision was Go back to FC11. I was able to “downgrade” my system in about 60 minutes. At home I’ve a mirror repository with al the backups, so during installation I added these repositories, so I also had all the updates in one go.

Lesson learned: “Bleeding edge… is indeed bleeding edge!”

I need my work for my daily work… If I won’t need it for my daily work I would have keep FC12 (aka Rawhide, aka FC11.90) on it to participate in developing FC12.

How to force IE 8 to become IE 7 compatible

For my sister her website (www.m-am.nl) I had issues with IE8 :-(

Some rendering was not done properly, but it worked fine on IE7…

After some searching, I found the fix. Put the next line direct after <head>:

<meta http-equiv="X-UA-Compatible" content="IE=7" /> <!-- for IE8 Compatibility -->

And IE8 will be forced to become compatible with IE7.

So you have something like this:

<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" /> <!-- for IE8 Compatibility -->
    <title>Foo Bar</title>
  </head>
  <body>
    <!-- website content --/>
  </body>
</html>

Require client-SSL certificate for certain content.

On a kind of “intranet” website, which is secured with username/password combinations and HTTPS I’ve implemented the next feature:

– Authorized users can read everything on the website

– Files with in their filename “classified” requires a valid SSL-Client certificate…

Here is the output of my apache config:

<Directory /usr/sites/ssl-site/intranet/htdocs>
  Options Indexes MultiViews
  AllowOverride Authconfig
  Order allow,deny
  Allow from all
  AuthName “intranet”
  AuthType “Basic”
  AuthUserFile /usr/sites/ssl-site/intranet/etc/users.pwl
  require valid-user
</Directory>

<LocationMatch .*(c|C)(l|L)(a|A)(s|S)(s|S)(i|I)(f|F)(i|I)(e|E)(d|D).+>
  SSLVerifyClient require
  SSLVerifyDepth 1
  SSLOptions +OptRenegotiate
</LocationMatch>

 

I still have to sort out some issues, like directories having a directory with the name “classified” in them.

How to add your own Root CA certificate in Windows Vista

What I tried so far… the certificates issued by my own CA were not accepted by any Microsoft application running on Windows Vista…

After some investigations, I found out that you must perform the next actions:

Run the command “certmgr.msc” and right click on Trusted Root Certificate Authorities → All Tasks → Import

And simply follow the wizard to import the certificate :-)