一次数据库hang的处理
数据库hang住的时候,应用自然是挂了,连sysdba都无法登陆。只能启用sqlplus的-prelim参数。[@more@]sqlplus -prelim "/as sysdba"oradebug setmypidoradebug unlimitoradebug hanganalyze 3--90 secoradebug hanganalyze 3exitsqlplus -prelim "/as sysdba"oradebug setmypidoradebug unlimitoradebug dump systemstate 10--wait 90 secondsoradebug dump systemstate 10--wait 90 secondsoradebug dump systemstate 10exit找到hanganalyze的trace文件,有如下信息:Found 12 objects waiting for <cnode/sid/ses
列出size大于某特定值的所有子目录
下面的脚本根据你给定的目录和阈值,会遍历所有子目录,并列出大于阈值的所有子目录名称和大小。注意如何在awk中引用shell变量。[@more@]dasomg01(215)% cat big_dir.sh#!/bin/shif [ $# -ne "2" ]then pgm=`basename $0` echo "Usage: $pgm <target_dir> <bytes> " echo " target_dir => the directory to be checked" echo " bytes => the threshold" exit 1ficd $1threshold=$2for i in `ls -l|grep '^d'|awk '{print $9}'`do du $i | awk '{if ($1>'&