RH系统管理系统管理工具.pptxVIP

  • 3
  • 0
  • 约5.65千字
  • 约 36页
  • 2023-06-13 发布于上海
  • 举报
RH系统管理系统管理工具第1页/共36页 UNIT 6:agendaTask automationSystem loggingSystem monitoringBakcup and restore第2页/共36页 自动化任务Red hat linux provides three facilitiesAt –execute a task at a specific timeCron –execute tasks at scheduled intervalsAnacron –run tasks after 规定prescribed intervals have passwd第3页/共36页 Using at适用于计划一次性任务Use cron instead for recuring eventsUse atq,atrm to manage jobsAtq –lists pending jobs(and job ids) atqAtrm –deletes pending job by job id atrm jobidExample: at time xxxx-xx-xx$at 6:00At mail joe joe.msg ctrl+d第4页/共36页 Controlling access to atUse access files/etc/at.allow 默认不存在/etc/at.deny 默认允许所有人用Contains usernames to whom access is allowed or denied第5页/共36页 Using cron适用于计划重复性任务Use crontab to edit,install,and view job schedulesSyntaxCrontab [-u user] file 针对用户或者当前Crontab [-l|-r|-e] 文件自动创建,list,rm,edit,user第6页/共36页 Crontab 格式30 6 * * 0 /home/joe/mailmom.shMinute 0-59 第 30分钟,逗号Hour 0-23 第六个小时Day 1-31 第几天Month 1-12 第几个月Day of week 0-6 星期几Command 命令;第7页/共36页 System crontab filesDifferent format than user crontab filesMaster crontab file /etc/crontab runs executables inCat /etc/crontab/etc/cron.hourly/etc/cron.daily/etc/cron.weekly/etc/cron.monthly /etc/cron.d/directory contains additional system crontab files第8页/共36页 Controlling access to cronRestrict /allow user access to cron/etc/cron.allow/etc/cron.denyContains usernames to allow / deny access for第9页/共36页 Using anacron Does not assume machine is powered at all times.Not a daemon like cronUserful on laptops,workstationsOnly by root第10页/共36页 The anacrontab fileSchedules anacron tasksCat /etc/anacrontabFormat different from crontab7 10 weekly.tasks /opt/bin/weekly.shInterval(days) 间隔Delay(min) 10 min later not at the same timeLabel such as nameCommand第11页/共36页 Using tmpwatchCleans old files out of specified directoriesUseful for keeping /tmp directory from filling upTmpwatch is run daily in /etc/cron.daily240个小时 auto del by tmpwatch /tmp dir第12页/共36页 System log configurationCentralized system loggingLogg

文档评论(0)

1亿VIP精品文档

相关文档