How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'to date/time? - Veritas Net Backup

This is a discussion on How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'to date/time? - Veritas Net Backup ; Hello, How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed' to date/time, please? For example, Started = 1146157200 Elapsed = 241 Ended = 1146157441 I think they use Julian Day Number in seconds, right? TIA, Vinicius....

+ Reply to Thread
Results 1 to 8 of 8

Thread: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'to date/time?

  1. How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'to date/time?

    Hello,

    How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed' to
    date/time, please?

    For example,
    Started = 1146157200
    Elapsed = 241
    Ended = 1146157441

    I think they use Julian Day Number in seconds, right?


    TIA,
    Vinicius.

  2. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'todate/time?

    Vinicius wrote:
    > Hello,
    >
    > How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed' to
    > date/time, please?
    >
    > For example,
    > Started = 1146157200
    > Elapsed = 241
    > Ended = 1146157441
    >
    > I think they use Julian Day Number in seconds, right?
    >
    >
    > TIA,
    > Vinicius.


    Well...today (05/06/2006 12:00) is 2453862, so it isn't JDN or MDJ.

    Any ideas about these fields, please?


    TIA,
    Vinicius.

  3. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and'Elapsed'to date/time?

    in article 445cf786@ROSASTDMZ05., Vinicius at cviniciusm@uol.com.br wrote on
    5/6/06 11:01 AM:

    > Vinicius wrote:
    >> Hello,
    >>
    >> How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed' to
    >> date/time, please?
    >>
    >> For example,
    >> Started = 1146157200
    >> Elapsed = 241
    >> Ended = 1146157441
    >>
    >> I think they use Julian Day Number in seconds, right?
    >>
    >>
    >> TIA,
    >> Vinicius.

    >
    > Well...today (05/06/2006 12:00) is 2453862, so it isn't JDN or MDJ.
    >
    > Any ideas about these fields, please?
    >
    >
    > TIA,
    > Vinicius.


    It's seconds since 1/1/70 00:00:00.

    --Paul


  4. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed' to date/time?

    Hi Vinicius,
    Here's some very rough (they make all assumptions, and absolutely no checks,
    on incoming parameters...) VBscript functions;
    Rgds,
    Dave.




    Function fs_dt_to_secs( ps_datetime )
    fs_dt_to_secs = DateDiff( "s", "01/01/1970 00:00:00", ps_datetime )
    End Function

    Function fs_secs_to_dt( pl_seconds )
    fs_secs_to_dt = DateAdd( "s", pl_seconds, "01/01/1970 00:00:00" )
    End Function

    Function fs_secs_to_d_hh_mm_ss( pl_seconds )
    Dim ll_diff, ll_dddd, ll_hh, ll_mm, ll_ss, ls_duration
    ll_diff = CLng( pl_seconds )
    ll_ss = ll_diff - ( ( ll_diff \ 60 ) * 60 )
    ll_diff = ll_diff \ 60
    ll_mm = ll_diff - ( ( ll_diff \ 60 ) * 60 )
    ll_diff = ll_diff \ 60
    ll_hh = ll_diff - ( ( ll_diff \ 24 ) * 24 )
    ll_diff = ll_diff \ 24
    ll_dddd = ll_diff
    ls_duration = ""
    If ll_dddd > 0 Then
    ls_duration = ls_duration & CStr( ll_dddd ) & " "
    ls_duration = ls_duration & fs_zeroes( ll_hh, 2 ) & ":"
    Else
    ls_duration = ls_duration & CStr( ll_hh ) & ":"
    End If
    ls_duration = ls_duration & fs_zeroes( ll_mm, 2 ) & ":"
    ls_duration = ls_duration & fs_zeroes( ll_ss, 2 )
    fs_secs_to_d_hh_mm_ss = ls_duration
    End Function

    Function fs_zeroes( pl_number, pl_length )
    Dim ls_result
    ls_result = String( pl_length, "0" ) & CStr( pl_number )
    ls_result = Right( ls_result, pl_length )
    fs_zeroes = ls_result
    End Function


    [end]



  5. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'


    You can use the bpdbm command to convert the ctime in the fileds to the current
    date/time.

    The command syntax is:
    /usr/openv/netbackup/bin/bpdbm -ctime 1146157200

    Or for Windows:

    \VERITAS\NetBackup\bin\bpdbm -ctime 1146157200



    Vinicius wrote:
    >Hello,
    >
    >How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed' to
    >date/time, please?
    >
    >For example,
    >Started = 1146157200
    >Elapsed = 241
    >Ended = 1146157441
    >
    >I think they use Julian Day Number in seconds, right?
    >
    >
    >TIA,
    >Vinicius.



  6. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'

    Thanks Debbie, that's new to me.

    Both,
    bpdbm -?
    bpdbm -Q
    don't show the -ctime option.

    ....and, in Windows NBU v6.0 MP1, the command only seems to be available on
    the master server, not on media or admin consoles.

    Thanks,
    Dave.



  7. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'


    That's a hidden switch and it's only available on master servers (since that's
    the only server with the bpdbm process running).

    I've seen a few other tools that also do a ctime conversion - you may want
    to search for those to find one that maybe suits your needs a little better.


    "D R" wrote:
    >Thanks Debbie, that's new to me.
    >
    >Both,
    > bpdbm -?
    > bpdbm -Q
    >don't show the -ctime option.
    >
    >....and, in Windows NBU v6.0 MP1, the command only seems to be available

    on
    >the master server, not on media or admin consoles.
    >
    >Thanks,
    >Dave.
    >
    >



  8. Re: How to convert the bpdbjobs fields 'Started', 'Ended' and 'Elapsed'


    "Deb" wrote:
    >
    >That's a hidden switch and it's only available on master servers (since

    that's
    >the only server with the bpdbm process running).
    >
    >I've seen a few other tools that also do a ctime conversion - you may want
    >to search for those to find one that maybe suits your needs a little better.
    >



    It'll also work on media servers as the bpdbm binary is installed on there
    as well. And I didn't know about this either and is going to be SUCH a useful
    tool.

    THanks,

    E.


+ Reply to Thread