如何查看服务器上次是谁进行了重启 *** 作

如何查看服务器上次是谁进行了重启 *** 作,第1张

执行 last reboot 命令结果如下
只能看到重启的时间,怎样看上次是哪个IP和用户执行的重启 *** 作
查看 /var/log/message结果如下,没有显示有执行重启命令,服务器执行了init *** 作,是否是由于人为外部强制重启了服务器?
Apr 4 21:46:15 FtpServer syslog-ng[2353]: Log statistics; dropped='pipe(/dev/xconsole)=3379', dropped='pipe(/dev/tty10)=0', processed='center(queued)=25745', processed='center(received)=10450', processed='destination(messages)=10432', processed='destination(mailinfo)=2', processed='destination(mailwarn)=0', processed='destination(localmessages)=287', processed='destination(newserr)=0', processed='destination(mailerr)=0', processed='destination(netmgm)=0', processed='destination(warn)=5196', processed='destination(console)=4905', processed='destination(null)=4', processed='destination(mail)=2', processed='destination(xconsole)=4905', processed='destination(firewall)=8', processed='destination(acpid)=4', processed='destination(newscrit)=0', processed='destination(newsnotice)=0', processed='source(src)=10450'
Apr 4 22:06:15 localhost -- MARK --
Apr 4 22:10:19 localhost syslog-ng[5546]: syslog-ng starting up; version='209'
Apr 4 22:10:19 localhost firmwaresh[5592]: Cannot find firmware file 'intel-ucode/06-2c-02'
Apr 4 22:10:19 localhost firmwaresh[5597]: Cannot find firmware file 'intel-ucode/06-2c-02'
Apr 4 22:10:19 localhost firmwaresh[5604]: Cannot find firmware file 'intel-ucode/06-2c-02'
Apr 4 22:10:19 localhost firmwaresh[5611]: Cannot find firmware file 'intel-ucode/06-2c-02'
Apr 4 22:10:19 localhost rchal: CPU frequency scaling is not supported by your processor
Apr 4 22:10:19 localhost rchal: boot with 'CPUFREQ=no' in to avoid this warning
资料来源:>在开始-》运行里输入命令也可在命令提示符中输入
at 7:00 /every:M,T,W,Th,F,S,Su cmd /c shutdown -r -t 60 (每天早上7点自动重启一次)
时间你可以自己修改

首先运行记事本程序,在文本编辑窗口中输入命令代码“shutdown -r -f -t 10”,其中f参数用来强行关闭服务器系统中的顽固进程和应用程序,r参数用来指定服务器系统重新启动,t参数表示系统关机倒记时的时间,之后将这段代码保存成“bat”格式的批处理文件,例如在这里我们可以将它保存为“aaabat”;
下面,依次单击“开始”/“程序”/“附件”/“系统工具”/“任务计划”命令,用鼠标双击其后界面中的“添加新任务”图标,打开新任务创建向导界面,单击“下一步”按钮,从应用程序列表框中单击“浏览”按钮,打开文件选择对话框,将之前生成的“aaabat”文件选中并导入到向导窗口中,之后为新建的计划任务取个合适的名称,比方说在这里我们将新任务名称设置为“定时启动服务器”,并且将“该任务的执行”设置为“每周”;
单击“下一步”按钮后,将新任务的运行起始时间指定为每周“0:00”,再单击“完成”结束服务器定时重启任务的创建 *** 作。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/12920456.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-28
下一篇 2023-05-28

发表评论

登录后才能评论

评论列表(0条)

保存