parsed.org

Tips by tag: monitor

Check for Locks by http://xinu.myopenid.com/ on Feb 13, 2008 07:29 AM

If you suspect a locking issue with your SQL Server database, this is how you can check with SQL Server 2005.

  1. Launch Microsoft SQL Server Management Studio
  2. In the left panel, click Management > Activity Monitor.
  3. At the top, click the 'Filter...' button.
  4. In the Resources section, enter the name of your database.
  5. Click OK to apply.
  6. Scroll to the far right and check for 'Blocking' and 'Blocked By'.

Thanks to McG for the tip.

activityblockedblockingdatabaselockinglocksmicrosoftmonitorsqlserverstudio
Simple swap monitor by mandric on Sep 25, 2007 06:32 PM

This is a simple swap monitor script:

#!/bin/bash
# Notify me one time if my swap is over MAXSWAP and log the
# swap usage as well in SWAPLOG.
# Usage: ./monitor.sh &

SWAPLOG=~/logs/monitor/swap
MAXSWAP=5
INTERVAL=30

send_sms_msg () {
  if [ "$1" ]; then STRING=$1; fi
  if [ $SMS_SENT ]; then
    return 0
  else
    echo $STRING | mailx -s 'monitor msg' 5101234567@cingularme.com
    SMS_SENT=1
  fi
}

while true; do
    # parse free output, get current swap value
    swaptest=`free -m |grep Swap|perl -pe 's/Swap:\s+\S+\s+(\S+).*/$1/'`
    if [ $swaptest -ge $MAXSWAP ]; then
        echo `date` Swap is: $swaptest >> $SWAPLOG
        send_sms_msg "Swap is: $swaptest"
    fi;
    sleep $INTERVAL
done;
bashmemorymonitorscriptshellswaptools
RSS