




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
RH系统管理系统管理工具第1页/共36页UNIT6:agendaTaskautomationSystemloggingSystemmonitoringBakcupandrestore第2页/共36页自动化任务RedhatlinuxprovidesthreefacilitiesAt–executeataskataspecifictimeCron–executetasksatscheduledintervalsAnacron–runtasksafter规定prescribedintervalshavepasswd第3页/共36页Usingat适用于计划一次性任务UsecroninsteadforrecuringeventsUseatq,atrmtomanagejobsAtq–listspendingjobs(andjobids)atqAtrm–deletespendingjobbyjobidatrmjobidExample:attimexxxx-xx-xx$at6:00At>mailjoe<joe.msgctrl+d第4页/共36页ControllingaccesstoatUseaccessfiles/etc/at.allow默认不存在/etc/at.deny默认允许所有人用Containsusernamestowhomaccessisallowedordenied第5页/共36页Usingcron适用于计划重复性任务Usecrontabtoedit,install,andviewjobschedulesSyntaxCrontab[-uuser]file针对用户或者当前Crontab[-l|-r|-e]文件自动创建,list,rm,edit,user第6页/共36页Crontab格式306**0/home/joe/mailmom.shMinute0-59第30分钟,逗号Hour0-23第六个小时Day1-31第几天Month1-12第几个月Dayofweek0-6星期几Command命令;第7页/共36页SystemcrontabfilesDifferentformatthanusercrontabfilesMastercrontabfile/etc/crontabrunsexecutablesinCat/etc/crontab/etc/cron.hourly/etc/cron.daily/etc/cron.weekly/etc/cron.monthly/etc/cron.d/directorycontainsadditionalsystemcrontabfiles第8页/共36页ControllingaccesstocronRestrict/allowuseraccesstocron/etc/cron.allow/etc/cron.denyContainsusernamestoallow/denyaccessfor第9页/共36页UsinganacronDoesnotassumemachineispoweredatalltimes.NotadaemonlikecronUserfulonlaptops,workstationsOnlybyroot第10页/共36页TheanacrontabfileSchedulesanacrontasksCat/etc/anacrontabFormatdifferentfromcrontab710weekly.tasks/opt/bin/weekly.shInterval(days)间隔Delay(min)10minlaternotatthesametimeLabelsuchasnameCommand第11页/共36页UsingtmpwatchCleansoldfilesoutofspecifieddirectoriesUsefulforkeeping/tmpdirectoryfromfillingupTmpwatchisrundailyin/etc/cron.daily240个小时autodelbytmpwatch/tmpdir第12页/共36页SystemlogconfigurationCentralizedsystemloggingLoggingdaemonsSyslogdklogd第13页/共36页Systemlogconfiguration/etc/syslog.confConfiguressystemlogging/etc/sysconfig/syslogSetsswitchesusedwhenstartingsyslogdandklogdfromthesystemVstartupscript/var/log/messagesFilewhereloggedmessagesarewritten第14页/共36页Systemlogging/var/log/dmesgKernelbootmessages/var/log/messagesStandardsystemerrormessages/var/log/maillogMailsystemmessagesDmesgPrintscontentsofkernelringbuffer第15页/共36页Systemlogging-cont/var/log/xferlogftptransfersusingwu-ftpdVsftpduses/var/log/vsftpd.log/var/log/secureSecurityinformationSystemloginandnetworkconnectioninfo第16页/共36页MaintaininglogsMaintainwithlogrotateKeepslogfilesformgettingtoolargeKeepsfilesystemformfillingupLogrotateisrundailyin/etc/cron.dailyHighlyconfigurableConfigurealllogsin/etc/logrotate.confConfigureindividuallogfilesinfileswithin/etc/logrotate.d第17页/共36页MonitoringlogsMonitorwithlogwatchHelpscatchproblemissuesDetectssuspiciousbehaviorLogwatchisrundailyin/etc/cron.dailyConfiguredin/etc/log.d/conf/logwatch.confSendsnightlyemailreportOthertools第18页/共36页ManagingwhatisThewhatiscommandreliesonadatabaseDatabaseupdatedwithmakewhatisUpdateddailyvia/etc/cron.dailyscript第19页/共36页SystemmonitoringandprocesscontrolTop,gtop-displaysnapshotofprocessesProcinfo–displayinformationform/procVwstat–reportsvirtualmemorystatsIostat-listsinformationonresourceusage,includingi/ostatisticsFreesummaryofsystemmemoryusageRenicechangepriorityofaprocessKillsendsystemsignaltoaprocess第20页/共36页Top,gtop显示,管理执行中的程序Topd1cCcompleteinformationd1(second)间隔HelppleasepressH第21页/共36页procinfo显示系统状态ProcinfoProcinfo–f-n3(second)第22页/共36页vwstat虚拟内存的状态第23页/共36页free显示内存状态Free–ttotalFree–s10(second)第24页/共36页renice调整优先权-ggroupname-ppid-uusernameRenice-1013575Renice5–ugabelianRange-20to19第25页/共36页kill删除执行中的程序或者工作-llist信息编号-s信息名称或者编号Program(id&name)第26页/共36页BackuptotapeIDEtapeScsitapedevicesFloppytapedevices第27页/共36页ControllingtapedrivesUsethemtutilitytocontroltapedriveMt–f/dev/storewind(rewind)Mt–f/dev/st0fsf50(position)Mt–f/dev/st0offline(eject)Mt–f/dev/st0erase(erase)Mt–f/dev/st0rewoff(rewind,eject)第28页/共36页UsingtarOriginallyusedfortapesAlsousedforcreatingarchivefilesParametersyntaxUsextoextractformarchiveUsectocreateformarchiveUsevforverboseoutputExampletarxvfarchive.tar第29页/共36页TaruseTarcvf/dev/other/usr/srcTarcMf/dev/fd0H1440/usr/srcTar–create–newer`10062002`--file/dev/other/usr/srcTarxpvf/dev/otherTar–cv–fsetbakup/etc第30页/共36页Usingdump/restore不推荐Backupandrestoreext2/3filesystemsDoesnotworkwithotherfilesystemsCandofullorincrementalbackupsExampleDump-0u–f/dev/nst0/dev/hda2Restore–rf/dev/nst0第31页/共36页UsingcpioSimilartotarDoesnotrecursedirectoriesbyitseltPrpingoutputfromfindintocpioiscommonExampleFind/tmp|cpio–ocv>/dev/nst0第32页/共36页RemotebackupsDumpandtarcanusermt(remotetapemgr
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年专业市场租赁合同暨品牌孵化运营合作协议
- 2025年企业年会场地租赁与高端音响设备租赁一体化合同
- 指纹机管理办法
- 旧机电管理办法
- 标样件管理办法
- 破碎料管理办法
- 纳入管理办法把
- 全国校企管理办法
- 三业活动管理办法
- 分红险管理办法
- 许昌市政协委员管理办法
- 社区居委会安全生产管理制度
- 连申线兴东线至海安界段航道整治工程环评资料环境影响
- 客户信息传递管理办法
- 2025至2030中国热成型钢(PHS)市场销售模式及未来投资风险评估报告
- GB/T 30099-2025实验室离心机
- 实验室留样管理制度
- 2025-2030中国阻焊油墨行业运行现状与场竞争格局分析报告
- 建筑桩基技术规范 JGJ 94-2008知识培训
- 公司电商财务管理制度
- 2025年中国铷铯及其化合物行业市场前景预测及投资价值评估分析报告
评论
0/150
提交评论