Once you have ps-watcher installed the next step is to create a configuration file that contains the rules your want to use for monitoring or acting on what ps-watcher reports, based on the output of the ps command. Along with the supplied configuration file, you can use command-line options to fine-tune the behavior of ps-watcher and assist in debugging.
http://www.linux.com/feature/148189
http://ps-watcher.sourceforge.net/
martes, 30 de septiembre de 2008
Tuna news: release 1.2
Lo nuevo:
http://tunadmin.sourceforge.net/
- Nuevo skin web
- Reconexiones automáticas de los port-forwardings
http://tunadmin.sourceforge.net/
miércoles, 24 de septiembre de 2008
libro para comprar: Clean Code
Quedé muy interesado en este libro, tiene muchas papitas para hacer mejores códigos.
Ej:
The Error Handling chapter is important because of the application of earlier chapters — the Do One Thing rule. Your functions should do one thing — either handle business logic, or exception handling, but not both. It's the difference between this:
try { s = new Socket(4000); s.OpenSocket(); string data = s.ReadFromSocket(); if(data == "32") data = "42"; printer.print(data); } catch(Exception ex) { if(ex == NetworkInterruptException) { //do something } if(ex == PrinterOnFireException) { //do something } logException(ex); }
And this
try { tryToPrintDataFromSocket(); } catch(Exception ex) { logException(ex); }
http://books.slashdot.org/books/08/09/23/2243216.shtml
Ej:
The Error Handling chapter is important because of the application of earlier chapters — the Do One Thing rule. Your functions should do one thing — either handle business logic, or exception handling, but not both. It's the difference between this:
try { s = new Socket(4000); s.OpenSocket(); string data = s.ReadFromSocket(); if(data == "32") data = "42"; printer.print(data); } catch(Exception ex) { if(ex == NetworkInterruptException) { //do something } if(ex == PrinterOnFireException) { //do something } logException(ex); }
And this
try { tryToPrintDataFromSocket(); } catch(Exception ex) { logException(ex); }
http://books.slashdot.org/books/08/09/23/2243216.shtml
Timeout en mysql usando jdbc
Ya que ibatis al parecer no soporta timeout para mysql, se puede usar propiedades
Ellas son especificables en el string de conexión a mysql:
http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html
- connectTimeout
- socketTimeout
- enableQueryTimeouts para usar Statement.setQueryTimeout()
Ellas son especificables en el string de conexión a mysql:
jdbc:mysql://[host:port],[host:port].../[database] [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html
lunes, 22 de septiembre de 2008
Cambio servidor web de proyectos de SourceForge
El acceso ya no es por shell.sourceforge.net, sino por web.sourceforge.net, además hay que usar como login la sgte truculencia:
"The new username spec is USERNAME,PROJECTNAME@web.sourceforge.net"
http://sourceforge.net/community/forum/topic.php?id=3518&page
"The new username spec is USERNAME,PROJECTNAME@web.sourceforge.net"
http://sourceforge.net/community/forum/topic.php?id=3518&page
Cómo obligar al browser respetar un estilo !important
"an "!important" declaration (the keywords "!" and "important" follow the declaration) takes precedence over a normal declaration"
http://www.w3.org/TR/CSS2/cascade.html#important-rules
http://www.w3.org/TR/CSS2/cascade.html#important-rules
lsof descubre por qué du dice que hay menos espacio usado que df
Cuando ocurran cosas raras como que du dice que var usa 17G y sin embargo df dice que hay usados en var 41G, como en este ejemplo:
[pablo@test var]$ du . --max-depth=1 -h
8.7G ./www
4.9G ./log
...
17G .
[pablo@test var]$ df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/mapper/Log02 41G 39G 0 100% /var
se debe a que algún proceso tiene tomados archivos eliminados que aún usan espacio en disco, pero no se ven con ls, quedan como archivos fantasmas. Solución: detener el proceso que tiene tomados esos archivos y ver por qué no hizo "close".
Con el comando lsof se puede ver qué procesos tienen abiertos qué archivos.
[pablo@test var]$ du . --max-depth=1 -h
8.7G ./www
4.9G ./log
...
17G .
[pablo@test var]$ df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/mapper/Log02 41G 39G 0 100% /var
se debe a que algún proceso tiene tomados archivos eliminados que aún usan espacio en disco, pero no se ven con ls, quedan como archivos fantasmas. Solución: detener el proceso que tiene tomados esos archivos y ver por qué no hizo "close".
Con el comando lsof se puede ver qué procesos tienen abiertos qué archivos.
Suscribirse a:
Entradas (Atom)