02.01.2016 Views

Linux

linux_admin_text-1.0.0_2

linux_admin_text-1.0.0_2

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3 <br />

# ls /etc/cron.hourly/<br />

0anacron<br />

# cat /etc/cron.hourly/0anacron<br />

#!/bin/bash<br />

# Skip excecution unless the date has changed from the previous run<br />

if test -r /var/spool/anacron/cron.daily; then<br />

day=`cat /var/spool/anacron/cron.daily`<br />

fi<br />

if [ `date +%Y%m%d` = "$day" ]; then<br />

exit 0;<br />

fi<br />

# Skip excecution unless AC powered<br />

if test -x /usr/bin/on_ac_power; then<br />

/usr/bin/on_ac_power &> /dev/null<br />

if test $? -eq 1; then<br />

exit 0<br />

fi<br />

fi<br />

/usr/sbin/anacron -s<br />

/etc/cron.d/raid-check RAID raid-check <br />

1 <br />

# cat /etc/cron.d/raid-check<br />

# Run system wide raid-check once a week on Sunday at 1am by default<br />

0 1 ∗ ∗ Sun root /usr/sbin/raid-check<br />

/etc/cron.d/sysstat sar 10 <br />

/usr/lib64/sa/sa1 23 53 /usr/lib64/sa/sa2 <br />

# cat /etc/cron.d/sysstat<br />

# Run system activity accounting tool every 10 minutes<br />

∗/10 ∗ ∗ ∗ ∗ root /usr/lib64/sa/sa1 1 1<br />

# 0 ∗ ∗ ∗ ∗ root /usr/lib64/sa/sa1 600 6 &<br />

# Generate a daily summary of process accounting at 23:53<br />

53 23 ∗ ∗ ∗ root /usr/lib64/sa/sa2 -A<br />

www.lpi.or.jp 93 (C) LPI-Japan

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!