CentOS 5の最近のブログ記事

Aug
17
2008

Dom0からしか時刻を更新できないというXenの仕様で、ずっと嵌りっぱなし。
今日もタイムゾーンはCDTのまま。

パラメタの変更が必要らしいですが。

# echo 1 >/proc/sys/xen/independent_wallclock

or
vi /etc/sysctl.conf
xen.independent_wallclock = 1

してから
/usr/sbin/timeconfig

だの
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

しても、
# date

Sat Aug 16 15:00:03 CDT 2008

何故でしょう。

Jan
12
2009

Clam AV(Anti Virus)のDaily ScanがCPU(Disk I/O)を喰って重いので、とりあえずnice値を下げる。

#!/bin/bash

PATH=/usr/bin:/bin

# clamd update
yum -y update clamd > /dev/null 2>&1

# excludeopt setup
excludelist=/root/clamscan.exclude
if [ -s $excludelist ]; then
for i in `cat $excludelist`
do
if [ $(echo "$i"|grep \/$) ]; then
i=`echo $i|sed -e 's/^\([^ ]*\)\/$/\1/p' -e d`
excludeopt="${excludeopt} --exclude-dir=$i"
else
excludeopt="${excludeopt} --exclude=$i"
fi
done
fi

# signature update
freshclam > /dev/null

# virus scan
CLAMSCANTMP=`mktemp`
nice -n 19 clamscan --recursive --remove ${excludeopt} / > $CLAMSCANTMP 2>&1
[ ! -z "$(grep FOUND$ $CLAMSCANTMP)" ] && \

# report mail send
grep FOUND$ $CLAMSCANTMP | mail -s "Virus Found in `hostname`" harahoro.hirehare@gmail.com
rm -f $CLAMSCANTMP

ついでに、/etc/cron.daily/* の実行時間も変更。
サーバが米国中西部標準時(-0600)で動作しているので、9時間ほど後ろにずらしてみた。

# vi /etc/crontab

PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 13 * * * root run-parts /etc/cron.daily
22 13 * * 0 root run-parts /etc/cron.weekly
42 13 1 * * root run-parts /etc/cron.monthly

Jun
20
2009

# yum clean metadata

する。

FYI:http://bugs.centos.org/view.php?id=3481

過去のエントリ(一覧)

最近のコメント

Powered by Movable Type 4.261
Creative Commons License
このブログはクリエイティブ・コモンズでライセンスされています。