If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Query - When Informix server/databas has been started

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-10, 15:29
sholtan sholtan is offline
Registered User
 
Join Date: Jul 2006
Posts: 5
Query - When Informix server/databas has been started

I'm trying to find out when Informix DATABASE/SERVER started and how long it has been running. Is there query or command in that I can use to check this? Is there more than one option to find this out and is it same for all Informix versions or diffferent from version to version?

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-21-10, 08:40
InformixWilli InformixWilli is offline
Registered User
 
Join Date: Sep 2010
Location: Germany, Brunswick
Posts: 52
onstat -

IBM Informix Dynamic Server Version 11.50.UC6DE -- On-Line -- Up 8 days 00:52:05 -- 153320 Kbytes

Up for 8 days, 52 minutes and 5 seconds

The start date and time is also written to the online.log a few lines after "Informix Dynamic Server Started" for example "Thu Jan 7 15:54:51 2010".
Reply With Quote
  #3 (permalink)  
Old 11-19-10, 08:58
ibm.ids ibm.ids is offline
Registered User
 
Join Date: Nov 2008
Posts: 64
select
case
when ((sh_curtime-sh_boottime)/86400) > 1 then
((sh_curtime-sh_boottime)/86400)::int ||' day(s) and ' ||
((mod(sh_curtime-sh_boottime,86400))/3600)::int ||':' ||
(mod(mod(sh_curtime-sh_boottime,86400),3600)/60)::int ||':' ||
(mod(mod(mod(sh_curtime-sh_boottime,86400),3600),60))::int
else
' || ' ||
((mod(sh_curtime-sh_boottime,86400))/3600)::int ||':' ||
(mod(mod(sh_curtime-sh_boottime,86400),3600)/60)::int ||':' ||
(mod(mod(mod(sh_curtime-sh_boottime,86400),3600),60))::int
end
from sysmaster:sysshmvals ;


this also works:


select
DBINFO ('utc_to_datetime', sh_curtime) - DBINFO ('utc_to_datetime',
sh_boottime) from sysshmvals ;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On