• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System Up Time

 
Bill Norton
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me be more more specific.
In rfc1514 a variable is described as
systemUpTime which is how long it has been since the system was initialized.
I believe almost any system(Linux, Solaris, NT, HPUX, etc) keeps this information somehow. I was hoping that there was a Java method which would return this value.
Thank you,
Bill

[This message has been edited by Bill Norton (edited April 10, 2001).]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Up time?? Time it was turned on? Time it has been running since turned on?? Either way I don't think that windows (at any rate) tracks either of those.
 
Randall Twede
Ranch Hand
Posts: 4469
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im not sure what you mean by current system's up time.
But if this helps any, If you are using servlets, you can find out how long since the server was booted by recording when init() was called with this code in the init() method:
String dateTime = DateFormat.getDateTimeInstance().format(date);
then to find elapsed time you would have to use the same line(with different variable name) and do some math.
not sure if that helps any.
------------------
Dont blindly believe everything I say.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic