HOWTO Debug Windows

I’ve been out xD
Nop, seriously, I’ve been working hard past months (and I’ll continue a bit more).

But I want to share a new doc I’ve just cooked on the wiki.

As I’ve been 3 days working on trying to find an error on Windows (my actual project deadline is near…) and our Windows “Sysadmins” are not able to help me, I decided to go harder and read M$ documentation about how to debug their “Operating System” (they like the “metaforas” saying that this is a real OS).

At the end? I think I will add “Windows Debugging” as a new skill on my CV.
Talking with my linux workmate, We doubt many of windows sysadmins know all this tools (maybe the most famous one, systernals):

  • Systernals
  • Windbg
  • Debug Diagnostics

Have a look at the wiki post:
http://wiki.ciberterminal.net/doku.php?id=debugging_windows

Follow and Share!!
error
Oracle Metadata Generator (and svn uploader)

UPDATED!!
(See comments)

My first (public) script for Oracle :-) [beers]
This script will (hopefully) do:

  • List all the objects on the database for each SID/SCHEMA given
  • Dump the metadata of each object in a different file
  • Upload everything to the svn

If you’re asking why? you must deal more with programmers :-P
This will add a second line of defense to the expdp CONTENT=METADATA_ONLY classic script.
Continue reading “Oracle Metadata Generator (and svn uploader)”

Follow and Share!!
error
UPS Salicru en Nut

Después de ver la exigua entrada del compañero “cerebro” en su blog y viendo que yo estoy en la misma situación que algunas personas, he dedicido publicar un mini-howto para los SAIS Salicru con NUT (sin cacti :-P)

Lo primero por supuesto es bajar el código fuente (en mi caso obligatorio, seguramente en una distribución normal, no haga falta ;-) ).

En mi caso, lo he configurado con esta linea:
./configure --prefix=/home/apps/nut \
--with-usb \
--without-doc \
--with-serial \
--without-ipmi \
--without-freeipmi \
--without-macosx_ups \
--without-avahi \
--with-cgi

Y compilado como siempre :-P

La configuración tal como dice el blog anterior se basa en el driver “blazer_usb”.
Como no tengo mucho tiempo, en vez de leer el manual fui por la via rápida (prueba-> error o ingeniería inversa) y me ha costado un poco descifrar como va el tema.
La cuestión es que hay que lanzar 3 demonios:

  • upsdrvctl lanza el “driver” encargado de coumincarse con el UPS
  • upsd se comunica con el driver (blazer_usb) y abre un socket
  • upsmon se conecta al socket de upsd y monitoriza

Continue reading “UPS Salicru en Nut”

Follow and Share!!
error
Parallel rsync’ing a huge directory tree

Some days ago I was on the chance to transfer a huge directory.

Huge means ~50TB with +10million files and a deep of only 6 folders under the parent one.
As I must do that kind of transfer more than 10 times with the same amount of folders… I decided to implement some kind of parallel function which launch parallel rsync’s at a given deep of my choose.

The ressult was that “pure bash” little script (the only dependency is “screen”)… You’ll notice that the main function “sync_this()” will run alone in your script only changing 2 or 3 variables ;-)
Continue reading “Parallel rsync’ing a huge directory tree”

Follow and Share!!
error
Mysql Database creation script

Two days ago one of my client dev’s requested me to be able to create db’s on their MySQL instance.
Of course, I won’t give him the “GRANT GRANT WITH GRANT OPTION” :-P, in that case I will simply give him root password :-P
As i didn’t find anything that solves my problem over Internet, I just did mine, as allways..
Here’s he result.

Prereqs:

  • Create a Mysql user with the following grants:
    [cc lang=”bash”]
    GRANT CREATE, RELOAD, SHOW DATABASES, CREATE USER ON *.* TO ‘database_creator’@’localhost’ IDENTIFIED BY ‘YOUR_PASSWORD’ ;
    GRANT INSERT ON `mysql`.`db` TO ‘database_creator’@’localhost’ ;
    [/cc]
  • That will allow us to create databases, users, make some checks and reload privs, while we don’t create a new “root”…

You can download the script code from the wiki, also you’ll find additional information there.

Follow and Share!!
error
Regexp mortal

Hoy realizando una tarea que va a ser repetitiva (MODO CRON ON), he tenido que currar una regexp, la verdad no es muy compleja en sí pero sí larga:

'/(project|production)/production/(hs|ga)[0-9]{2}/Runs/[0-9]{6}_SN[0-9]{3}_[0-9]{4}_[0-9A-Z]{8}XX/(Data/Intensities/(L00[0-9]/C*|BaseCalls/L00[0-9]/C*)|Thumbnail_Images/L00[0-9])'

Cuanto tardará find en procesar algo como esto con una jerarquía de unos 36000K ficheros xD
Respuesta en breve :-)

Follow and Share!!
error