【发布时间】:2017-11-16 01:07:48
【问题描述】:
帮助编写脚本。以下是日志格式。 我想编写一个在 LIVE 日志中搜索关键字的脚本。假设有些人已经停止了服务器,它会显示 shutdown 或 force_shutdown 它还在日志中显示“服务器关闭已由 $user 启动”。
<Apr 19, 2017 1:11:00 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Apr 19, 2017 1:11:06 PM EDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
<Apr 19, 2017 1:11:06 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to shutdown>
<Apr 19, 2017 1:11:06 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to force_shutdown>
<Jan 9, 2008 6:50:30 PM EST> <Notice> <WebLogicServer> <BEA-000388> <JVM
called WLS shutdown hook. The server will force shutdown now>
<Jan 9, 2008 6:50:30 PM EST> <Alert> <WebLogicServer> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
<Jan 9, 2008 6:50:30 PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
想要 grep 所有信息服务器 IP 和服务器主机,以及摊牌时的确切时间戳以及哪个用户。并向用户发送包含所有详细信息的邮件。 请帮帮我
【问题讨论】:
标签: bash shell scripting sh weblogic12c