This content has been marked as final.
Show 4 replies
-
1. Re: How to get the JBoss Start time
peterj Jan 1, 2007 8:36 PM (in response to danielgalan)Look at the StartDate attribute of the jboss.system:type=Server MBean (caveat: I am using 5.0 beta 1, not sure if 3.2.x has that attribute)
-
2. Re: How to get the JBoss Start time
danielgalan Jan 3, 2007 4:42 AM (in response to danielgalan)Thanks Peter,
ObjectName mbeanId = new ObjectName("jboss.system:type=Server"); MBeanServer server = MBeanServerLocator.locateJBoss(); Date startDate = (Date)server.getAttribute(new ObjectName("jboss.system:type=Server"), "StartDate"); Date jbossStartupTime = new Date(System.currentTimeMillis() - startDate.getTime());
so thats the way I receive the Startuptime now.
Bye -
3. Re: How to get the JBoss Start time
mcallaf Sep 25, 2012 12:42 PM (in response to danielgalan)Hello,
I'm having the same need, i tried this proposal but it gives me an IllegalStateExeption:
Exception in thread "main" java.lang.IllegalStateException: No 'jboss' MBeanServer found!
Do i have to add something in my standalone.xml?
** I'm using JBOSS 7.1.1 final
Thank you.
-
4. Re: How to get the JBoss Start time
wdfink Sep 26, 2012 6:38 AM (in response to mcallaf)You can read the start-time attribute from the CLI with '/core-service=platform-mbean/type=runtime:read-attribute( name=start-time)'.
BTW you should create a new thread instead of using such old one because the server will be complete different.