where get instance start time?
Posted in 2012
Topics: Versions, Editions & End-of-Life
IBM Informix Dynamic Server Version 11.70.TC5IE -- On-Line -- Up 07:17:04 --775488 Kbytes
How can one obtain the 07:17:04 from sysmaster ?
The startup time is:
select dbinfo( 'utc_to_datetime', sh_boottime) from sysshmvals;
(expression)
2012-09-19 09:19:56
1 row(s) retrieved.
>
Current time is:
select dbinfo( 'utc_to_datetime', sh_curtime ) from sysshmvals;
(expression)
2012-09-20 16:44:03
1 row(s) retrieved.
>
Uptime is:
select sh_curtime - sh_boottime from sysshmvals;
The displayed time can be selected with:
> select trunc(diff/18400,0) as days, mod((diff/3600),24) as hours,
mod(diff/60,60) as minutes, mod(diff,60) as seconds
> from (select (sh_curtime - sh_boottime) as diff from sysshmvals) as calc;
days hours minutes seconds
6 6 7 32 19
1 row(s) retrieved.
>
Database closed.
art@galadriel-ii:~$ onstat -
IBM Informix Dynamic Server Version 11.70.FC5W1 -- On-Line -- Up 1 days
07:32:30 -- 491700 Kbytes
--OR - better --
> select trunc(diff/18400,0)||' days
'||mod((diff/3600),24)||':'||mod(diff/60,60)||':'||mod(diff,60)
> from (select (sh_curtime - sh_boottime) as diff from sysshmvals) as calc;
(expression) 6 days 7:32:42
1 row(s) retrieved.
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Sep 20, 2012 at 4:37 PM, Bill Hamilton <garage_dba@verizon.net>wrote:
> IBM Informix Dynamic Server Version 11.70.TC5IE -- On-Line -- Up 07:17:04
> --> 775488 Kbytes
> How can one obtain the 07:17:04 from sysmaster ?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8f23585ffe211a04ca286462
Awesome! I was looking for sysshmvals. Thanks.
I wonder if though if your 18400 is supposed to be 86400 .
-----Original Message-----
From: Art Kagel
Sent: Thursday, September 20, 2012 3:59 PM
To: ids@iiug.org
Subject: Re: where get instance start time? [28341]
The startup time is:
select dbinfo( 'utc_to_datetime', sh_boottime) from sysshmvals;
(expression)
2012-09-19 09:19:56
1 row(s) retrieved.
>
Current time is:
select dbinfo( 'utc_to_datetime', sh_curtime ) from sysshmvals;
(expression)
2012-09-20 16:44:03
1 row(s) retrieved.
>
Uptime is:
select sh_curtime - sh_boottime from sysshmvals;
The displayed time can be selected with:
> select trunc(diff/18400,0) as days, mod((diff/3600),24) as hours,
mod(diff/60,60) as minutes, mod(diff,60) as seconds
> from (select (sh_curtime - sh_boottime) as diff from sysshmvals) as calc;
days hours minutes seconds
6 6 7 32 19
1 row(s) retrieved.
>
Database closed.
art@galadriel-ii:~$ onstat -
IBM Informix Dynamic Server Version 11.70.FC5W1 -- On-Line -- Up 1 days
07:32:30 -- 491700 Kbytes
--OR - better --
> select trunc(diff/18400,0)||' days
'||mod((diff/3600),24)||':'||mod(diff/60,60)||':'||mod(diff,60)
> from (select (sh_curtime - sh_boottime) as diff from sysshmvals) as calc;
(expression) 6 days 7:32:42
1 row(s) retrieved.
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Sep 20, 2012 at 4:37 PM, Bill Hamilton
<garage_dba@verizon.net>wrote:
> IBM Informix Dynamic Server Version 11.70.TC5IE -- On-Line -- Up 07:17:04
> --> 775488 Kbytes
> How can one obtain the 07:17:04 from sysmaster ?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8f23585ffe211a04ca286462
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Yes, 86,400. <hangs head in shame> Must have written that calculation
3000 times over the years - correctly of course. Tough day.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Sep 20, 2012 at 7:20 PM, Bill Hamilton <garage_dba@verizon.net>wrote:
> Awesome! I was looking for sysshmvals. Thanks.
> I wonder if though if your 18400 is supposed to be 86400 .
>
> -----Original Message-----
> From: Art Kagel
> Sent: Thursday, September 20, 2012 3:59 PM
> To: ids@iiug.org
> Subject: Re: where get instance start time? [28341]
>
> The startup time is:
> select dbinfo( 'utc_to_datetime', sh_boottime) from sysshmvals;
>
> (expression)
>
> 2012-09-19 09:19:56
>
> 1 row(s) retrieved.
>
> >
> Current time is:
> select dbinfo( 'utc_to_datetime', sh_curtime ) from sysshmvals;
>
> (expression)
>
> 2012-09-20 16:44:03
>
> 1 row(s) retrieved.
>
> >
> Uptime is:
>
> select sh_curtime - sh_boottime from sysshmvals;
>
> The displayed time can be selected with:
> > select trunc(diff/18400,0) as days, mod((diff/3600),24) as hours,
> mod(diff/60,60) as minutes, mod(diff,60) as seconds
> > from (select (sh_curtime - sh_boottime) as diff from sysshmvals) as calc;
>
> days hours minutes seconds
>
> 6 6 7 32 19
>
> 1 row(s) retrieved.
>
> >
>
> Database closed.
>
> art@galadriel-ii:~$ onstat -
>
> IBM Informix Dynamic Server Version 11.70.FC5W1 -- On-Line -- Up 1 days
> 07:32:30 -- 491700 Kbytes
>
> --OR - better --
>
> > select trunc(diff/18400,0)||' days
> '||mod((diff/3600),24)||':'||mod(diff/60,60)||':'||mod(diff,60)
> > from (select (sh_curtime - sh_boottime) as diff from sysshmvals) as calc;
>
> (expression) 6 days 7:32:42
>
> 1 row(s) retrieved.>
> Art S. Kagel
> Advanced DataTools (www.advancedatatools.com)
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
> other organization with which I am associated either explicitly,
> implicitly, or by inference. Neither do those opinions reflect those of
> other individuals affiliated with any entity with which I am affiliated nor
> those of the entities themselves.
>
> On Thu, Sep 20, 2012 at 4:37 PM, Bill Hamilton
> <garage_dba@verizon.net>wrote:
>
> > IBM Informix Dynamic Server Version 11.70.TC5IE -- On-Line -- Up 07:17:04
> > --> > 775488 Kbytes
> > How can one obtain the 07:17:04 from sysmaster ?
> >
> >
> >
> >
>
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --e89a8f23585ffe211a04ca286462
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae9340e45a49d0e04ca2a7c5a