#觀察系統一般參數
RH20 /home/cts>cat report1.sh
#!/bin/bash
LOG=~/report1.log
date > $LOG
echo "" >> $LOG
echo "=========================df==============================" >> $LOG
df >> $LOG
echo "" >> $LOG
echo "======================blockdev===========================" >> $LOG
blockdev --report /dev/sda >> $LOG
echo "" >> $LOG
echo "======================grub.conf==========================" >> $LOG
cat /etc/grub.conf >> $LOG
echo "" >> $LOG
echo "======================lsb_release========================" >> $LOG
lsb_release -a >> $LOG
echo "" >> $LOG
echo "=======================uname=============================" >> $LOG
uname -a >> $LOG
echo "" >> $LOG
echo "======================meminfo============================" >> $LOG
cat /proc/meminfo >> $LOG
echo "" >> $LOG
echo "======================cpuinfo============================" >> $LOG
cat /proc/cpuinfo >> $LOG
echo "" >> $LOG
echo "======================iostat=============================" >> $LOG
iostat -x >> $LOG
echo "" >> $LOG
echo "======================vmstat=============================" >> $LOG
vmstat -m >> $LOG
echo "" >> $LOG
vmstat -a >> $LOG
echo "" >> $LOG
vmstat -n >> $LOG
echo "" >> $LOG
vmstat -s >> $LOG
echo "" >> $LOG
vmstat -d >> $LOG
echo "" >> $LOG
echo "======================sysctl=============================" >> $LOG
sysctl -a | grep -e lowmem -e pressure -e page-cluster -e zone >> $LOG
#觀察系統io參數
RH20 /home/cts>cat report2.sh
#!/bin/bash
LOG=~/report2.log
date > $LOG
echo "" >> $LOG
echo "======================scheduler==========================" >> $LOG
cat /sys/block/sda/queue/scheduler >> $LOG
echo "" >> $LOG
echo "====================read_ahead_kb========================" >> $LOG
cat /sys/block/sda/queue/read_ahead_kb >> $LOG
echo "" >> $LOG
echo "====================nr_requests==========================" >> $LOG
cat /sys/block/sda/queue/nr_requests >> $LOG
echo "" >> $LOG
echo "===================antic_expire==========================" >> $LOG
cat /sys/block/sda/queue/iosched/antic_expire >> $LOG
echo "" >> $LOG
echo "===================read_expire===========================" >> $LOG
cat /sys/block/sda/queue/iosched/read_expire >> $LOG
echo "" >> $LOG
echo "===================write_expire==========================" >> $LOG
cat /sys/block/sda/queue/iosched/write_expire >> $LOG
echo "" >> $LOG
echo "=====================quantum=============================" >> $LOG
cat /sys/block/sda/queue/iosched/quantum >> $LOG
echo "" >> $LOG
echo "=====================queue===============================" >> $LOG
cat /sys/block/sda/queue/iosched/queue >> $LOG
echo "" >> $LOG
echo "=================front_merges============================" >> $LOG
cat /sys/block/sda/queue/iosched/front_merges >> $LOG
for pidd in $(pidof XGateway)
do
echo "" >> $LOG
top -n 1 -S -b -p $pidd >> $LOG
echo "" >> $LOG
ps -p $pidd -o comm,cmd,user,group >> $LOG
done
echo "" >> $LOG
top -S -b -n1 >> $LOG
#觀察2天的file fragmentation
RH20 /home/cts>cat report3.sh
#!/bin/bash
LOG=~/report3.log
date1="20110317"
date2="20110324"
date > $LOG
echo "" >> $LOG
echo "=========================KGIStkLog==============================" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KGIStkLog/10.0.250.24.Ord >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KGIStkLog/10.0.250.24.Ord >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KGIStkLog/10.0.250.24.Rpt >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KGIStkLog/10.0.250.24.Rpt >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KGIStkLog/10.0.250.24.RptOth >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KGIStkLog/10.0.250.24.RptOth >> $LOG
echo "" >> $LOG
echo "" >> $LOG
echo "=========================KStkSesLog=============================" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KStkSesLog/192.168.248.92.Ord >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KStkSesLog/192.168.248.92.Ord >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KStkSesLog/192.168.248.93.Ord >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KStkSesLog/192.168.248.93.Ord >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KStkSesLog/192.168.248.93.PreRpt >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KStkSesLog/192.168.248.93.PreRpt >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KStkSesLog/192.168.248.93.Rpt >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KStkSesLog/192.168.248.93.Rpt >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KStkSesLog/All.inn >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KStkSesLog/All.inn >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/KStkSesLog/All.preinn >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/KStkSesLog/All.preinn >> $LOG
echo "" >> $LOG
echo "" >> $LOG
echo "=========================orderlog===============================" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/orderlog/IvacMatch.rec >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/orderlog/IvacMatch.rec >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/orderlog/IvacOrder.rec >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/orderlog/IvacOrder.rec >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/orderlog/LocalIvacMatch.rec >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/orderlog/LocalIvacMatch.rec >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/orderlog/IvacStkLocalMat/0000 >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/orderlog/IvacStkLocalMat/0000 >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/orderlog/IvacStkLocalOrd/0000 >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/orderlog/IvacStkLocalOrd/0000 >> $LOG
echo "" >> $LOG
echo "" >> $LOG
echo "=========================OrderLog===============================" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/OrderLog/Stk/Deals.bin >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/OrderLog/Stk/Deals.bin >> $LOG
echo "" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/OrderLog/Stk/SysOrds.inn >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/OrderLog/Stk/SysOrds.inn >> $LOG
echo "" >> $LOG
echo "" >> $LOG
echo "=========================SyncLog================================" >> $LOG
echo "$date1" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date1/SyncLog/Stk.Sync >> $LOG
echo "$date2" >> $LOG
/usr/sbin/filefrag -v /xgw/XGW.Stk.K1/Logs/$date2/SyncLog/Stk.Sync >> $LOG
echo "" >> $LOG
2011年4月1日 星期五
訂閱:
張貼留言 (Atom)
文章分類
- 爬山 (3)
- 參考文章 (3)
- 鳥事 (5)
- 報稅 (1)
- AIX (2)
- ajax (1)
- BCB (3)
- C/C++ (2)
- cloudera (3)
- DISK (1)
- ftp (1)
- Fuse (2)
- gdb (2)
- hadoop (13)
- hdfs (8)
- HPC (2)
- hypertable (12)
- iOS (1)
- iscsi (1)
- JAVA (2)
- KFS (5)
- kickstart (1)
- KVM (2)
- LAMP (2)
- linux (2)
- Lion (1)
- LVM (2)
- mapreduce (3)
- mpi (3)
- mpich2 (4)
- msgpack (2)
- mysql (2)
- nfs (1)
- openmp (2)
- OS (1)
- OSX (2)
- others (5)
- PBS (1)
- performance_tuning (3)
- php (3)
- phplist (3)
- programming (27)
- REST (2)
- RHCA (6)
- rhel (13)
- rhel6 (4)
- scp (1)
- shell_scripts (2)
- snowleopard (2)
- Solaris (6)
- ssh (1)
- syslog (1)
- t-442-1 (4)
- torque (1)
- ubuntu (2)
- VNC (1)
- watercolor (5)
- windows (1)
- yum (1)
沒有留言:
張貼留言