Cern Week 24

I spent most of the week rewriting the
CERN-CC-NodeServiceManagerMsg
As already mentioned this tool scanns all the hosts and if the ssh certificate is about to expire sends an email to the responsible person. Further it creates a webpage so that people can easially check what has to be done.
After some analysis on the current program I decided to rewrite the whole thing. The old version was not maintained the guy who had written it had left and it looked more like a patchwork rung than a properly designed pice of code.
So following a lot of perl code some results
Some optimization I made

$ time CERN-CC-NodeServiceManagerMsg > /dev/null

real 1m12.080s
user 0m23.730s
sys 0m1.930s
$ time ./sendIt > /dev/null

real 0m1.514s
user 0m0.430s
sys 0m0.040s
and more

$ time ./CERN-CC-NodeCertCheck -m > /dev/null

real 0m0.784s
user 0m0.500s
sys 0m0.050s

While reducing the time for the program to run from 72 seconds to 0.78 seconds, I started adding more features, like command line options, showing the ok nodes, checking if the path where the web page should be created exists and if not create the whole path tree, etc... After this was all ok I started writing the spec file for the rpm. Further I wrote a little 'man page' after I had built a source rpm and a 'normal' rpm my package went into testing. After the results had came back and the only thing not Ok was a typo in the email. I started uploading the package onto the official cern repository and rolled it out.
Another thing I did was help a friend with png transparency under windows. Better the not existing one. So now his web page dynamically loads the appropriate image. png for Linux and gif for windows with a Internet Explorer version before 7. I further spent some time on my phone Perl rewrite which is turning out to be quite tricky. Not only because of the backwards compatibility.

No comments: