问题原文
原帖链接 · Robert Foster · CC BY-SA 4.0
I'm looking for a way to only look through the last 10 mins of a WebLogic log file that has line formatting like this.
####<Sep 21, 2018 1:56:20 PM EDT> <Notice> <Stdout>
I want to grep for a specific string and if it fails wait 60 seconds and try again. This would be for RHEL 7, and I'm open to using sed, awk, etc.
已采纳解答
原帖链接 · kenlukas · CC BY-SA 4.0
Since you're using RHEL 7 WebLogic is probably using systemd now. Which means you can take advantage of journalctl and the --since option.
From this article https://www.qualogy.com/techblog/oracle/introducing-weblogic-to-systemd# it looks like you'll use either wls_nodemanager or wls_adminserver or both. To view both use:
journalctl -u wls_nodemanager -u wls_adminserver --since "10min ago"
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
