恢复文件夹权限设置

find -depth -printf '%m:%u:%g:%p\0' |awk -v RS='\0' -F: 'BEGIN { print "#!/bin/sh"; print "set -e"; q = "\047";}{ gsub(q, q q "\\" q); f = $0; sub(/^[^:]*:[^:]*:[^:]*:/, "", f); print "chown --", q $2 ":" $3 q, q f q; print "chmod", $1, q f q;}' > restore-permissions.sh

Oracle RAC interconnect Traffic 监控

Oracle在AWR中提供了Estd Interconnect traffic(KB)指标,由于AWR默认只能查看小时级别的数据,做准实时监控需要以更小的时间粒度来计算这个指标。AWR怎么算的看不到,我们可以查看statspack计算这一指标的方法,在sprepins.sql中可以发现Statspack的计算公式: Estd Interconnect traffic = ((Global Cache blocks received + Global Cache blocks served)*db_block_size +(GCS/GES messages received + GCS/GES messages sent)*200)/elapsed time 在Oracle statistics中,Global Cache Blocks received等的名字转换参见如下SQL: SELECTDECODE(name,'gc cr blocks received','global cache blocks received','gc cr blocks served','global cache blocks served','gc current blocks received','global cache blocks received','gc current blocks served','global cache blocks served',name) AS