Author Topic: Issue with arsdoc query  (Read 1777 times)

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 573
    • View Profile
Issue with arsdoc query
« on: February 12, 2021, 11:34:14 AM »
CMOD 9.5, DB2 10.1 - Scratching my head on this one, I've done this before but its been a while. I want to just generate a list of 66 messages for a certain time frame. I think this is what i used last time.

arsdoc query -u admin -p stash.file -h archive -f 'System Log' -i "WHERE TIME_STAMP_DT > '2021-02-12-01.00.00.352804' and TIME_STAMP_DT < '2021-02-12-2.43.45.352804' and MSG_NUM='66'"

I want to get all 66 messages, between 2021-02-12-01.00.00.352804 and 2021-02-12-2.43.45.352804

When I run above arsdoc query, I get this.. Notice the dates look funky... Anyone have a thought?

02/11/21 21:30:34,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(38657GAAA) Off(0) Len(40646) CompOff(0) CompLen(34621) Size(40646) Seg(1) Total Segs(1) Flds(),A,1271258566,
02/11/21 21:30:31,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.009) ObjName(42537GAAA) Off(44384) Len(89182) CompOff(0) CompLen(57683) Size(89182) Seg(1) Total Segs(1) Flds(),A,1271258560,
02/11/21 21:30:30,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.002) ObjName(39760GAAA) Off(0) Len(43120) CompOff(0) CompLen(9725) Size(43120) Seg(1) Total Segs(1) Flds(),A,1271258562,
02/11/21 21:30:29,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(39813GAAA) Off(0) Len(49624) CompOff(0) CompLen(11097) Size(49624) Seg(1) Total Segs(1) Flds(),A,1271342777,
02/11/21 21:00:21,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(38657GAAA) Off(0) Len(40646) CompOff(0) CompLen(34621) Size(40646) Seg(1) Total Segs(1) Flds(),A,1271258566,
02/11/21 21:00:19,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.010) ObjName(42537GAAA) Off(44384) Len(89182) CompOff(0) CompLen(57683) Size(89182) Seg(1) Total Segs(1) Flds(),A,1271258560,
02/11/21 21:00:17,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(39760GAAA) Off(0) Len(43120) CompOff(0) CompLen(9725) Size(43120) Seg(1) Total Segs(1) Flds(),A,1271258562,
02/11/21 21:00:16,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.004) ObjName(39813GAAA) Off(0) Len(49624) CompOff(0) CompLen(11097) Size(49624) Seg(1) Total Segs(1) Flds(),A,1271342777,
02/11/21 20:30:19,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(38657GAAA) Off(0) Len(40646) CompOff(0) CompLen(34621) Size(40646) Seg(1) Total Segs(1) Flds(),A,1271258566,
02/11/21 20:30:17,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.008) ObjName(42537GAAA) Off(44384) Len(89182) CompOff(0) CompLen(57683) Size(89182) Seg(1) Total Segs(1) Flds(),A,1271258560,
02/11/21 20:30:15,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(39760GAAA) Off(0) Len(43120) CompOff(0) CompLen(9725) Size(43120) Seg(1) Total Segs(1) Flds(),A,1271258562,
02/11/21 20:30:14,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.004) ObjName(39813GAAA) Off(0) Len(49624) CompOff(0) CompLen(11097) Size(49624) Seg(1) Total Segs(1) Flds(),A,1271342777,
02/11/21 20:00:32,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(38657GAAA) Off(0) Len(40646) CompOff(0) CompLen(34621) Size(40646) Seg(1) Total Segs(1) Flds(),A,1271258566,
02/11/21 20:00:30,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.006) ObjName(42537GAAA) Off(44384) Len(89182) CompOff(0) CompLen(57683) Size(89182) Seg(1) Total Segs(1) Flds(),A,1271258560,
02/11/21 20:00:28,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.003) ObjName(39760GAAA) Off(0) Len(43120) CompOff(0) CompLen(9725) Size(43120) Seg(1) Total Segs(1) Flds(),A,1271258562,
02/11/21 20:00:26,ADMIN,4,66,Application Group Document Get: Name(APPLICATION_AG_S) Agid(5150) ApplName(APPLICATION_APP_S) Aid(5151) NodeName(-CACHE-) Nid(3) Server(server) Time(0.004) ObjName(39813GAAA) Off(0) Len(49624) CompOff(0) CompLen(11097) Size(49624) Seg(1) Total Segs(1) Flds(),A,1271342777,
« Last Edit: February 12, 2021, 11:46:01 AM by jsquizz »
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2228
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Issue with arsdoc query
« Reply #1 on: February 12, 2021, 12:37:28 PM »
Time zone settings.  ;)
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 573
    • View Profile
Re: Issue with arsdoc query
« Reply #2 on: February 12, 2021, 01:02:15 PM »
Time zone settings.  ;)

I knew it.

Seriously, I knew it.. lol<-- Or i thought!

Database timezone = - 50000 (EST)
Server timezone = - Fri Feb 12 16:22:27 EST 2021

When i search for : "WHERE msg_num = '87' and ODDAT_time_stamp > '2021-02-12 00:05:05'"

My first hit comes back at 07:05:05 the previous day.

Am I missing something? lol
« Last Edit: February 12, 2021, 02:25:18 PM by jsquizz »
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2228
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Issue with arsdoc query
« Reply #3 on: February 12, 2021, 02:54:32 PM »
Remember - you're searching the Content Manager OnDemand database field directly. with the OnDemand arsdoc -i parameter.  And the time in the CMOD database is stored as UTC, without timezones.  You need to adjust your query to match your local timezone.  There's probably a clever way to do this at the database level, but I don't know how, exactly.

-JD.
« Last Edit: February 13, 2021, 12:08:49 PM by Justin Derrick »
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 573
    • View Profile
Re: Issue with arsdoc query
« Reply #4 on: February 12, 2021, 04:05:17 PM »
Remember - you're searching the database field directly. with the OnDemand arsdoc -i parameter.  And the time in the CMOD database is stored as UTC, without timezones.  You need to adjust your query to match your local timezone.  There's probably a clever way to do this at the database level, but I don't know how, exactly.

-JD.

got it, thanks. Colleague is a db2 dba, will bug him
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 573
    • View Profile
Re: Issue with arsdoc query
« Reply #5 on: February 22, 2021, 09:22:25 AM »
quick update on this.

Since I need only the past "66msg" from the last hour.. So at the top of every hour, I am going to run an ARSDOC QUERY command

"WHERE ODDAT_TIME_STAMP >= $VARIABLE.."

$VARIABLE, is derived using basic `date -u` command. This worked perfectly when I figured out the proper flags to use.
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING