CoffMan Blog Victor Fariña Infante , info about my own projects and thoughts.

16Jul/040

Howto Maintain a large number of sites centralized with Jabber.

network map Page of the project The problem I find at my work was the next :

The problem:

When you maintain and update a large number of unix (or windows) machines you must review if all machines are UP, and in case of failure you must do something (well it depends on admin ;) ), also you would like to review if all goes well before a weekend ( admins tends to me very vagues).

The solution:

The architecture of the application is simple: you must rely on a machine (the central server or backup server) here you install NAGIOS (http://www.nagios.org/download/), this is a program in C that monitors the health of each server. You must configure a lot of archives (it takes a half day or so but its nice) in which indicate what servers to monitor and wich service offers each server, the alerts, the methos of communication and so on ... Ths next step (when you install nagios and test it) is to install sendJabber ( only on CVS at the moment) configure it with a valid account on a jabber server and tell him the user/users to send alerts. The next is configure again Nagios to send alerts throw sendJabber its so simpe sa adding a line to misccommands.cfg , then you must restart Nagios and all is OK. Just sit in front your computer and if something fails you must receive an alert on your Jabber client (I recommend GAIM )

I will post a more extense howto on the next days.

TODO:

On future releases onf sendJabber you can intereact with NAGIOS server, send commands and receive status about servers. and more ...

7Jun/040

Bluetooth Project

The idea evolves me on an urban bus, while i am sitting at the bus a lot of people try to use the smart card (with prepaid i suppose), which fails a lot. The tech-idea is to use a bluetooth device (like headphone device) to authenticate with bus receiver and let the user pass the bus .
This method would be more reliable and more standard than the smart card, accelarating the entrance of users on the bus, and stop delaying because smart card beeps on error.

Technically:
On the hardware side, we need a bluetooth devices that may be with power on, at the time to arrives to bus. The first thinking is to use a bluetooth mobile phone that a lot of people alredy have.
The Software may be a java application on the phone (or on the bluetooth hardware) that are capable of communicating with an authentication gateway

18May/040

JDiary an ncurses Diary, journal and beyond ....

This weekend i started a new project , i new idea ... (usually those that never ends up ;)) ) Problem:

The habitual method of my day work is to connect (via putty) to a remote machine where i configured the pdmenu with a interface to administer the system and to read mail (via mutt) connec IRC (BitchX) etc ... Recently i would like to annotate all things i just do on a day (a typical diary ) but if this diary could run on a vt100/ansi terminal, then I can do everithing from the pdmenu interface.

solution

After trying to find a diary ncurses based (google, freshmeat, sourceforge, ...) i desist .. then i need to make one ... I started to develope it on JAVA with the CHARVA library (first the GUI is SWING based) then i will convert it to console mode. the style of the window must be integrable with the pdmenu interface on the capture. I am started this project on my CVS and on Sourceforge (without link at the moment). on a few days i put links an more technical stuff.

If you are interested on the project go to the page of the project: http://www.wickle.com/weblog/index.php?content=jdiary

11Mar/040

Tips for wickle.com from the desktop

The idea is to build a java client that connects asyncrony to the web http://www.wickle.com/tips , and returns am aleatory tip. I started this project a couple years ago, but (it offen happens to me) i never ends it on a nice manner ... I think on a simple interface with no window decorations (like Post-it product) and from wich you can put your own tips (sincronized with your account on the web). The functionallity required :

  • View random tips.
  • View tips of specified categories.
  • Let user search for tips based on a pattern.
  • Publish their own tips.
  • more features soon i think ;)
21Feb/040

Instalacion servidor NS con Metamod y AMX bajo Linux Howto

 

Howto para instalar servidor dedicado de Natural Selection 3.0beta3 bajo Linux con AMX

Distribucion: Debian 3.0 con actualizaciones de seguridad Maquina : AMD XP 2 GHz 1 Gb RAM 40 Gb Disco Duro Tarjeta grafica ATI

1.- Downloads: Antes de empezar vamos a bajarnos los archivos necesarios: hldsupdatetool.bin (2.84 MB) - Location: ftp://hlserver:[email protected]/Linux/hldsupdatetool.bin ns_v3_b1_dedicated_server.zip (132 MB) - Location: Check downloads page on natural-selection.org ns_v30_b3_patch_dedicated_server.zip (Beta 3 update) (~26MB) - Location: Location: Check downloads page on natural-selection.org con esto nos llega para empezar ... Ver el howto a pantalla completa 2.- PRE-instalacion: Creacion de usuario solo para este server y iniciamos la creacion del directorio para el servidor de NS: Como ROOT # adduser ns (ponemos datos y password) # mkdir -p /opt/halflife/ns (ponedlo en el lugar q mas os guste) # chown hl.hl /opt/halflife/* -R Como usuario ns Entramos en el sistema con el nuevo usuario: chmod755hldsupdatetool.bin(hacemosejecutableelarchivohldsupdatetool.bin)chmod 755 hldsupdatetool.bin (hacemos ejecutable el archivo hldsupdatetool.bin) ./hldsupdatetool.bin (lo ejecutamos, nos extraera el archivo steam) mkdirhlds_l(esteesellugarpordefectoenlasversionesanterioresasiqueloconservaremos)mkdir hlds\_l (este es el lugar por defecto en las versiones anteriores asi que lo conservaremos) cp steam hlds_l/ (copiamos el recien extraido steam al directorio q acabamos de crear)

3.- Instalacion Steam: Creamos una cuenta steam para el server(o usamos una que ya tengamos creada) : cd/opt/halflife/ns/hlds_l(noscolocamoseneldirectorioainstalartodo)cd /opt/halflife/ns/hlds\_l (nos colocamos en el directorio a instalar todo) ./steam -create micorreo@midominio,com password \"Pregunta estupida\" respuesta una vez creada la cuenta ejecutamos el steam para q se autoactualice : $ ./steam -update valve . micorreo@midominio,com password Y Esto se baja de internet e instala la base necesaria para ejecutar HL (y el NS en particular) puede tarda 15 minutos tranquilamente.

4.- Instalacion NS: ahora extraemos el mod NS que nos bajamos antes en el directorio /opt/halflife/ns/hlds_l : cd/opt/halflife/ns/hlds_lcd /opt/halflife/ns/hlds\_l unzip ns_v3_b1_dedicated_server.zip (poned la ruta entera de donde tengais el archivo zipeado ) y ahora el parche beta3: $ unzip ns_v30_b3_patch_dedicated_server.zip Esto nos crea el directorio nsp y descomprime todo ahi dentro. y LISTO PARA FUNCIONAR

5.- Iniciar el Servidor linea basica de comando para ponerlo a andar : cd/opt/halflife/ns/hlds_lcd /opt/halflife/ns/hlds\_l ./hlds_run -game nsp +exec server.cfg +ip xxx.xxx.xxx.xxx +maxplayers 12 +map ns_eclipse

6.-Configuracion basica: adaptar el server.cfg a nuestras necesidades (parametros con comentarios muy explicativos)

7.-Instalacion AMX y Metamod: Las versiones Testadas ultimas son : AMX 0.98 ns3 ---> http://www.modns.org/forums/index.php?showtopic=308 Metamod 1.17b -->http://www.modns.org/forums/index.php?showtopic=236 (para la debian 3.0 que usa GLIBC 2.2 necesitamos bajarnos el Metamod compilado por TromPT que hay dentro del post.

8.- Metamod Una vez bajados deszipeamos el Metamod en : cd/opt/halflife/ns/hlds_l/nspcd /opt/halflife/ns/hlds\_l/nsp mkdir -p addons/metamod/dll

para que se ejecute el Metamod al iniciar el NS editamos el archivo : /opt/halflife/ns/hlds_l/nsp/liblist.gam y sustituimos todas las lineas que pongan gamedll_linux y ponemos gamedll_linux \"addons/metamod/dlls/metamod_i386b.so\" (la b es por q tenemos libc6) si tuvieramos libc5 usariamos la libreria sin la b. listo , con esto ya esta instalado el METAMOD.

9.- Instalacion AMX 0.98 descomprimimos el amx0.98 q nos bajamos antes en /opt/halflife/ns/hlds_l/ns y nos crea addons/amx/ y dentro de ahi todo lo necesario para el AMX Ahora necesitamos que el Metamod cargue el AMX al iniciar el NS, entonces creamos el archivo plugins.ini en el directorio del metamod con lo siguiente dentro (archivo /opt/halflife/ns/hlds_l/ns/addons/metamod/plugins.ini) : linux addons/amx/dlls/amx_mm_i386.so

ahora al iniciar el NS ya se carga el AMX (que lo ejecuta el Metamod)

10.- Configuracion AMX Todo lo referente al AMX esta en : /opt/halflife/ns/hlds_l/ns/addons/amx el archivo de configuracion del AMX es amx.cfg (poco hay que tocar nombre de server, password de server etc ...) el archivo de configuracion de usuarios es users.ini basta añadir una linea por cada usuario con sus permisos ejemplo para un admin: \"STEAM_0:0:xxxxxxx\" \"\" \"abcdfghijlmnopqrstu\" \"ce\" para ver tu steamID pones status en la consola dentro de una partida de NS.

para usar los menus del AMX dentro del juego NS hay que bindear unas teclas que no vienen por defecto : bind \"1\" \"slot1\" .... bind \"9\" y por ultimo \"slot9\" bind \"0\" \"slot10\" en el archivo userconfig.cfg estan bien ;). yo tambien tengo : bind F5 \"amxmodmenu\" bind F6 \"amx_mapmenu\" para acceder rapidamente desde el juego a los menus de administracion.

11.- Instalacion de plugins para el AMX: Los plugins para el AMX son archivos con extension amx (ya compilados) para usarlos solo tenemos que bajarlos y luego copiarlos a /opt/halflife/ns/hlds_l/ns/addons/amx/plugins se activan añadiendo una linea con el nombre del nuevo plugin en el archivo plugins.ini del directorio anterior. por ejemplo : plugin hiveccstatus.amx para ver la vida del hive y del CC en todo momento cphiveccstatus.amx/opt/halflife/ns/hlds_l/ns/addons/amx/pluginscp hiveccstatus.amx /opt/halflife/ns/hlds\_l/ns/addons/amx/plugins echo \"hiveccstatus.amx ; Status para el Hive y para el CC\" >> /opt/halflife/ns/hlds_l/ns/addons/amx/plugins/plugins.ini y listo.

12.- Compilacion de plugins para el AMX: Los plugins aun sin compilar tienen la extension sma, para compilarlos los copiamos en el directorio: /opt/halflife/ns/hlds_l/ns/addons/amx/examples y los compilamos tal que asi : cd/opt/halflife/ns/hlds_l/ns/addons/amx/examplescd /opt/halflife/ns/hlds\_l/ns/addons/amx/examples ./sc nuevo_plugin.sma esto nos genera un nuevo_plugin.amx que instalamos exactamente igual que en el punto anterior.

13.- Programas que facilitan la administracion de NS, scripts de inicio y demas en http://www.wickle.com/weblog/index.php?p=57&more=1#more57

Conclusion Con Linux, es mas facil instalar un servidor de NS que instalar en Windoz las Office.

links : http://www.natural-selection.org http://www.natural-selection.org/forums/index.php?showforum=33 Linux Server Help http://www.vadakill.com/nsguides/ http://modns.org Todo lo relacionado con los MODS para el NS (AMX, Metamod, etc ... )

CoffMan -- 21-feb-2004

4Feb/040

Admin Multiple Steam Game Servers from ssh console v0.9

Este proyecto intenta reunir un conjunto de scripts para administrar uno o varios Servidores de Juegos basados en Steam (y en el antiguo HL) desde la consola de linux, de modo que con un simple SSH podamos conectarnos a nuestro server y administrar fácilmente todas las características básicas del servidor de juegos. Permite ademas varios usuarios conectados a la vez administrando servidores completamente independientes. Requiere tener funcionando el/los servidores de Juegos a administrar. También requiere tener ssh instalado ( jeje parecía obvio no ??) y tener screen, que habitualmente viene con todas las distribuciones , ademas se necesita pdmenu, un cojonudo programa para hacer y manejar ventanas en modo consola (http://www.kitenet.net/programs/pdmenu/ ) (or apt-get pdmenu) Screenshots and Features (english only) .... Features :

  • Admin multiple servers of games included HL, Natural Selection, Counter Strike, DoD, etc ...
  • Connection accepted from SSH (this is a very secure method to admin a server)
  • Direct control to the console server.
  • Automatic detection of currently running Games servers.
  • Start / Stop new Servers.
  • Admin Servers from multiple platforms (putty client for windows) (Java SSH for web) (ssh client for linux) etc ...
  • Nice colored interface . ;)

Screenshots Start point (connect via ssh) Select active servers to admin: Console admin of a Counter Strike Server: Start a Server (Counter Strike and Natural selection at the moment) it's not difficult to extend.

This software is GPL . I am packaging all the components to distribute it. If you need them shortly i can sent it to you by mail.

3Dec/030

Small Linux box to view DivX,MP3,TV,News,Inet and more on TV ... aka TopBox

Goal : The goal is to build a system (hardware and software) on which i can view all my collection of DivXs,MP3 and DVDs remotely, because i have all films on a big Hard Drive on another Linux System (Debian 3.0).

The hardware i am looking for is : VIA EPIA-M 9000 Mini-ITX Mainboard or VIA EPIA M10000 Nehemiah (137 eur.aprox ) the case (look one) 512 MB RAM wireless card D-Link 512+

the only PROBLEM i have is to boot up from a wireless network card ... http://www.viaarena.com/?PageID=281

links : [http://linuxathome.net/reviews/via\_epia\_m\_900001.php](http://linuxathome.net/reviews/via_epia_m_900001.php) [http://linitx.com](http://linitx.com) [http://linpvr.org/](http://linpvr.org/) [http://www.mythtv.org/](http://www.mythtv.org/) [http://www.viaarena.com/?PageID=58](http://www.viaarena.com/?PageID=58)

Changes 02-jan-04 :

I finally decided tu reuse an "old" computer with the following configuration :

  • Athlon XP 2000 Mhz (64 € ) (the old one fire up ;) )
  • GeForce 4 MX440 with TV-OUT of course (50 € )
  • A borrowed Avermedia TV TUNER (69 € when i buy it)
  • Probably D-link DWL-520+ for Wireless connection to network
1Dec/030

Simon Says on J2ME

Don simonI start to develop a new porting of Simon Says , One of the best games i like to play. The main difference with the rest of the Simon Says games is that it may be a portable game (for all devices J2ME capables, applets and java frontend) it may have a network secuence of the day, on that, people can compete for make the longest secuence, for these characterisc a user must register, and play with a mobile or PDA. on a few days I release the beta, with nice graphics and sound.

4Nov/030

New project: Mantain an Monitor a large group of Linux servers

Example network mapThe problem : Them work of mantain a bunch of linux servers is hard ... when you have 1 or 2 is easy to mantain it, but when the number of servers grows to 10 or more , and when each one need a monthly maintenance (upgrade packages, install new applications, ...) the problem is BIGGER ...

At the moment i could not find any solution to this problem. Beacause of that i am starting to develop a group of applications to manage these problem

the solution / the application The application must be on java (to port to another operating systems if needed) there must be a number of clients for every server you must mantain and a server (or 2 for data reduntant) . The java clients must send data (UDP i think) every minuto or so with status information (ENCRIPTED i think), a java client console on a desktop must connect to the server and can view all information from the administrator servers. At the first phase of the project the only purpose is to view data (like on snmp) on the servers distributed, from a java client (or browser maybe) The second state must be to interact with these servers remotely and at the same time on groups of any number of servers (for ex. reboot all, od change data on all or install package A on all at the same time). These operation will need a password obviously. In the next days i start these proyect on Sourceforge and ALL cooperations will be welcome.

26Oct/030

Ricochet Robot on J2ME v0.9

This is a tryinf of build a porting of the classic game boar Ricochet Robot on a J2ME style , its my first J2ME and don\'t expect a lot of features ... Is developed under JBUILDER with mobileset pack, but i am currently migrating to eclipse. The test hardware is a Siemens S55 Ricochet Robot web game is on http://www.wickle.com/ricochet The objective of this game is to place the indicated robot on the finish chip, for that end you can move on 4 directions only and the robot stop walk when it finds an object or a wall.

Screenshots and Features (english only) .... Plans to implement:

  • Play over the net with online updating of scores with ither players.
  • Play with Multiple people simultanously (via bluetooth)
  • Adapt to all screen types , currently it try to adapt but on some cases it fails.

        This software is GPL . download here. Make donations is you find this application useful ;)