another scene from a favorite movie

this one needs to be explained a little: Jaime Miravilles (gauche) et Salvador Dali (droite) as the two confused priests in “Un Chien Andalou (Andalusian Dog)” 1929 Un Film De Luis Bunuel Et Salvador Dali

my love for the mystical and magical cURL

begin snippet: function port { if [ $? -ne 0 ] ; then printf “warning: ” if [ $? -eq 6 ]; then echo “cant resolve host” fi if [ $? -eq 7 ]; then echo “cant connect to host” fi printf “site may be down\n” else printf “site is up\n” fi } curl -s … Read More

sql dump adder

this script looks in a specific directory for sql dumps labeled xxx_20080101_xxx_alumn.sql.gz, xxx_20080101_xxx_const.sql.gz & xxx_20080101_xxx_log.sql.gz to ungzip and dump back into sql (assuming the db is there already). change as needed. #!/bin/bash # this script assumes that you have the sql backups gzipped FILE_DIR=/export/tmp/backup/temp if [ $# -lt 2 ]; then printf “\nneeds date of … Read More

boredom

boredom led me to write a command that does the same thing but three different ways; assume that the file that is being cat to use for this example contains: line 1 line 2 <form id=”form_login” name=”form_login” method=”post” action=”session_id=XXXXXx.xxxxx.NAM1&locid=0&lf=0&i> and i need NAM1 only. well, i actually need the three letter code and number. it … Read More

another stupid nagios process checker

here is another in the long line of stupid scripts for nagios. this script finds specific process, then counts them and spits out an error level according to setting enjoy!! #!/bin/bash ## replace “ORA_” with some other unique identifier ## from vi :1,$s/ORA_/”unique”/g ORA_TEMP=/tmp/ora_procs.tmp ## replace “ora_” with what you need grep’ed ps -ef | … Read More

nice view

080626 14:45:35 [Note] Slave SQL thread initialized, starting replication in log ‘mysql-bin.000015’ at position 3370, relay log ‘./dbase-relay-bin.000002’ position: 235 080626 14:45:35 [Note] Slave I/O thread: connected to master ‘slave@10.0.0.1:3306’, replication started in log ‘mysql-bin.000015’ at position 3370 ….that makes me feel better….

simple mysql show table status script

all this little script is doing is measuring Data_length used by dividing it by Max_data_length so it can give us a clean number that will be usable for monitoring. this is still a very dirty script so there will be updates: #!/bin/bash FILE_OUT=/tmp/data_out.txt DB_NAME=eyf DB_USERNAME=user DB_PASSWORD=password function warn_db_info { awk ‘{print $1, $7, $8}’| awk … Read More

simple nagios port check

here is a simple little nagios script to check the status of a port with ouput – sounds stupid but i needed it to check 2 specific ports for ouput and it works. #!/bin/bash if [ -z $2 ]; then if [ -z $1 ]; then printf “needs \$1 & \$2 (address & port number)\n” … Read More

*** firesale ***

68th annual pissedoffadmins.com firesale and chutney cyberspace bbq anouncing the second 68th annual pissedoffadmins firesale. after the non-success of last years, i figured lets do it again. but this time, lets run it the whole month of june. some of the items up for grab this year are: thinkpad t42p with tons of stickers (working … Read More

geek humor…… of sorts

so i was talking to mike the other day and this is the what he states about his code: mike s back thanks 😀 i like my code like i like my women tight, clean, black and white and full of hash marks err … covered in comments? hmm…. i’ll work on that for next … Read More