Archive for March, 2009

PostHeaderIcon IE7 and empty your cache

Ofcourse, we all know how to remove your browser history. A couple of days ago I had this problem: The cache did not wanted to be emptied… Empty everything, empty password cache etc.

Luckely, there are alternatives. Just start your DOS Box and try the following commands:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 (Removes everything from cache)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1 (Removes history of visited sites)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2 (Removes only the Cookies)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 (Removes temporary Internetfiles)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16 (Removes data from forms)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32 (Removes your saved passwords)

Enjoy :)

PostHeaderIcon Check and fix MSSQL 2000/2005 databases

To quickly check why your MSSQL 2000/2005 database is giving errors run

dbcc checkdb (database_name) with data_purity
go

then to fix it, run the following

dbcc checkdb (database_name, repair_rebuild) with data_purity
go

The repair_rebuild and data_purity are supposed to be written like that, don’t change them!. It might take some time to process, specially on a bit slower system.

PostHeaderIcon Simple shell based monitoring

I needed something to simply monitor the availability of my servers without causing much CPU load since it would be running on my DNS-313 which has only a 125Mhz ARM CPU and about 16MB’s of ram. 

I wrote the following script. Just fill in your content, change the e-mail addy, crontab it to run every 10 minutes with the monitor parameter and you’r all set to have your servers monitored.

enjoy

 

#!/bin/bash

# Variables
KEYWORD=open
NC_CMD=”/bin/nc -zvw 5″
GREP_CMD=”/bin/grep -v”
MAILX_CMD=”/usr/bin/mailx”
SCANLOG=/tmp/svrscan.log
ALARMLOG=/tmp/alarm.log
NOTIFY=my\@mail.com

case $1 in

server1)
        echo
        echo “scanning server1.my.domain…”
        $NC_CMD server1.my.domain 22
        $NC_CMD server1.my.domain 80
        $NC_CMD server1.my.domain 903
        ;;
server2)
        echo
        echo “scanning server2.my.domain…”
        $NC_CMD server2.my.domain 22
        $NC_CMD server2.my.domain 25
        $NC_CMD server2.my.domain 110
        $NC_CMD server2.my.domain 143
        $NC_CMD server2.my.domain 993
        $NC_CMD server2.my.domain 995
        $NC_CMD server2.my.domain 3306
        ;;
server3)
        echo
        echo “scanning server3.my.domain…”
        $NC_CMD server3.my.domain 21
        $NC_CMD server3.my.domain 80
        ;;
all)
        $0 server1
        $0 server2
        $0 server3
        ;;
monitor)
        $0 all 2> $SCANLOG
        $GREP_CMD $KEYWORD $SCANLOG > $ALARMLOG
        exec 3< $ALARMLOG
        while read <&3
        do
                echo $REPLY > /tmp/notify.$$
                $MAILX_CMD -s “$REPLY” $NOTIFY < /tmp/notify.$$
                rm /tmp/notify.$$
        done
        exec 3>&-
        rm $SCANLOG
        rm $ALARMLOG
        ;;
*)
        echo “Usage $0 (<servername> / all / monitor)”
        ;;
esac

Search