Get application uptime

后端 未结 4 1142
有刺的猬
有刺的猬 2020-12-31 02:59

I\'ve written an application in java and I want to add a feature to report the uptime of the application. Is there a Class/method in the JVM that can do this?

Should

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 03:57

    It is just like Heartbeat application. IN which You have write small application which communicate to your java application. Whenever You application start you have to store the time with date in file/database. Monitor application will check the application running or not. The monitor application also take difference of end time and start time sand display the application time.

提交回复
热议问题