Javier Barber
Senior Sysadmin Freelancer
BLACKBERRY EN LINUX
Programa para gestionar la BB: barry Para cargar la batería del dispositivo: /usr/sbin/bcharge
PROGRAMAS PARA EL ACCESO POR PUERTO SERIE EN LINUX
minicom – cutecom
INFORMACION DE PROCESADORES EN LINUX
$ more /proc/cpuinfo En equipos con redhat también: /usr/sbin/x86info -a Para sacar directamente el número de cores o procesadores: $ grep cores /proc/cpuinfo $ grep processor /proc/cpuinfo En debian para sacar la información de la/s CPUS: $ cpufreq-info
PRUEBAS DE CARGA EN LINUX
Programa «Stress» (http://weather.ou.edu/~apw/projects/stress/) Here is an example invocation: a load average of four is imposed on the system by specifying two CPU-bound processes, one I/O-bound process, and one memory allocator process. $ stress –cpu 2 –io 1 –vm 1 –vm-bytes 128M –timeout 10s –verbose
TIPS DE LA BASH
Tenemos la variable $RANDOM que nos muestra un número aleatorio cada vez. Hacer una secuencia de números: $ seq 1 10 (Contaría del uno al 10) Crear una serie de ficheros de tamaño aleatorio: $ for i in $(seq 1 1000); do let «size = ($RANDOM/100)»; dd if=/dev/urandom \ of=file-$i count=$size 2>/dev/null;done
CONSOLAS RSC DE SERVIDORES SUN
Para entrar en la ‘ok’ podemos hacerlo a la fuerza con uadmin 1 0.
CREACIÓN DE MIRROR ENTRE DISCOS DE SOLARIS
root@host#metainit -f d13 1 1 c0t0d0s3 d13: Concat/Stripe is setup root@host#metainit d3 -m d13 d3: Mirror is setup root@host#metainit -f d23 1 1 c0t1d0s3 d23: Concat/Stripe is setup root@host#metattach d3 d23 d3: submirror d23 is attached root@host#metastat -p
COMANDOS ÚTILES DE VIM
Historial de comandos – q: Comentar la linea de un codigo C al pulsar ‘v’ – :map v I//
LLAMADA PARA MOSTRAR ESCRITORIO DE DCOP
$dcop kicker kicker toggleShowDesktop
PROXY INVERSO CON APACHE
ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> #<VirtualHost *:80> #ServerName webserver.agrega.indra.es ProxyPreserveHost On (Importante si tenemos host virtuales en destino) ProxyPass / http://172.22.145.114/ ProxyPassReverse / http://172.22.145.114/