Author Topic: retrieving sys logs from system i  (Read 3202 times)

rajesh_400

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
retrieving sys logs from system i
« on: March 19, 2020, 08:35:41 AM »
Hi All,

I am trying to use below simple query to get system logs on 10.1v using arsdoc query. Please help what is wrong here.

arsdoc query -u xxx -p xx -G "System Log" -h uuuu -i "WHERE msg_num = 88 and time_stamp = 2020-03-15"
 -S "2020-03-14,2020-03-15,%Y-%m-%d"          -o outfilep -v                                                               


2020-03-19 11:32:48.315312: ARS6117I Querying database with SQL string 'WHERE msg_num = 88 and time_stamp = 2020-03-15'   
                                                                                                                           
2020-03-19 11:32:48.351616: ARS6085E Search unsuccessful                                                                   
                                                                                                                           
2020-03-19 11:32:48.351944: ARS6034W No hits were found that matched search criteria.                                     


Thank you very much!
  :)

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2228
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: retrieving sys logs from system i
« Reply #1 on: March 19, 2020, 10:20:47 AM »
Are you sure you're searching the correct field for time_stamp?  If you've upgraded your System Logs, you should have a time_stamp_dt field that contains the new database-native time format.

-JD.
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

rajesh_400

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: retrieving sys logs from system i
« Reply #2 on: March 19, 2020, 11:18:05 AM »
Hi JD,

Thanks for your reply!

I am checking the System log app group and see time_stamp field (data type : Date/Time(TZ) (old style)) . So, i am using that field

rajesh_400

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: retrieving sys logs from system i
« Reply #3 on: March 19, 2020, 04:36:28 PM »

I figured it now. Using the new fields worked!  :D

Thanks again JD!

Darrell Bryant

  • Full Member
  • ***
  • Posts: 104
  • Sed fugit interea fugit inreparabile tempus-Virgil
    • View Profile
Re: retrieving sys logs from system i
« Reply #4 on: March 23, 2020, 06:47:37 AM »
You can also use the native IBM i command, Query Document (QRYDOCOND). It is an easier to use front end to arsdoc query and is available at v7.2 and higher. See the Content Manager OnDemand newsletter for 2Q2016 and 3Q2017. Links can be found at https://www.ibm.com/support/pages/node/628001
#IBMi #iSeries #PDF #XML #400 Indexer #ASM

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2228
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: retrieving sys logs from system i
« Reply #5 on: March 24, 2020, 05:05:57 AM »
And for future reference, here's a section in the wiki about CMOD Date & Time formats:

https://cmod.wiki/index.php?title=Date_and_Time_formats_in_Content_Manager_OnDemand

-JD.
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