Skip to content
namwoong edited this page Jun 28, 2014 · 12 revisions

sar examples

10 Useful Sar Examples

sar.sh

#! /bin/sh

SAR_DIR=/home/sar/
SAR_FILE='hostname'.'date + "%Y%m%d_%H%M"'.sar

ps -ef|grep sar|grep -v grep|awk '{print "kill -9", $2}' | sh

find / -name nohup.out -exec rm -rf {} \;

nohup sar -A -o $SAR_DIR/$SAR_FILE 5 17280 & >/dev/null 2>&1

sar 데이타 확인

sar -f [filename] -s [hh:mm:ss] -e [hh:mm:ss]
Clone this wiki locally