Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Posts
    5

    Unanswered: 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

  2. #2
    Join Date
    Sep 2010
    Location
    Germany, Brunswick
    Posts
    55
    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".

  3. #3
    Join Date
    Nov 2008
    Posts
    65
    Provided Answers: 1
    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 ;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •