简体   繁体   English

如何记录 WebLogic 启动时间?

[英]How to log WebLogic startup time?

When Tomcat starts, its last log line is as following:当Tomcat启动时,它的最后一行日志如下:

INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 20147 ms

Which is clearly a feature to log on purpose the startup time in milliseconds, really useful as official stat.这显然是一个以毫秒为单位记录启动时间的功能,作为官方统计数据非常有用。

When WebLogic starts however, its last log line is:然而,当 WebLogic 启动时,它的最后一行是:

<WebLogicServer> <CIS1405986> <AdminServer> <[STANDBY] ExecuteThread: \
'10' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> \
 <5097d97d-cb6a-41aa-b418-717a3f768636-0000000d> <1479382972090> \
<[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > \
<BEA-000365> <Server state changed to RUNNING.> 

Acknowledging the RUNNING status, but not providing any info concerning its startup time.确认RUNNING状态,但不提供有关其启动时间的任何信息。

Question : is there any way to make WebLogic log its startup time or find it anywhere in its console?问题:有什么方法可以让 WebLogic 记录其启动时间或在其控制台中的任何位置找到它?

If all fails, and independent of WebLogic, you can deploy a WAR that queries the JVM uptime in an init class and emits that to the log, and does nothing else.如果一切都失败了,并且独立于 WebLogic,您可以部署一个 WAR,该 WAR 查询 init 类中的 JVM 正常运行时间并将其发送到日志,并且不执行任何其他操作。 See https://stackoverflow.com/a/817835/1037626https://stackoverflow.com/a/817835/1037626

In the WLS console, go to Environment--> Servers --> Admin Server.在 WLS 控制台中,转至环境--> 服务器--> 管理服务器。 Click on Monitoring tab and then to General.单击“监视”选项卡,然后单击“常规”。 You can see Activation time, which tells you when the server is started.您可以看到激活时间,它告诉您服务器何时启动。

MBean Attribute: ServerRuntimeMBean.ActivationTime MBean 属性:ServerRuntimeMBean.ActivationTime

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM