Search code examples
sqlaixondemand

OnDemand arsdoc query against the system log


I have done extensive googleing, but found no hard results. I am trying to use arsdoc to query the system log. My problem is, I can get all the records since the beginning of time, or I get no records, buy trying to grab the last day of records. In this case, I am trying to get the number of concurrent users via msg num 201.

This is my command

arsdoc query -u myAcc -p myPass -h myServer -f "System Log" -i "WHERE MSG_NUM=201" -v -o tmp.dat

This is the output for that command.

2014-06-05 13:34:54.828072: ARS6080I Login successful

2014-06-05 13:34:54.828659: ARS6062I Searching for folder 'System Log' ...

2014-06-05 13:34:54.850558: ARS6084I Search successful

2014-06-05 13:34:54.851071: ARS6063I Searching for documents in 'System Log' ...

2014-06-05 13:34:54.851402: ARS6117I Querying database with SQL string 'WHERE MSG_NUM=201'

2014-06-05 13:34:55.512897: ARS6084I Search successful

2014-06-05 13:34:55.513412: ARS6071I Writing 17170 hits in file 'tmp.dat'...

2014-06-05 13:34:56.286820: ARS6092I Write successful

2014-06-05 13:34:56.344858: ARS6026I arsdoc completed.

As expected, it works, but I dont want 17,000 records. I want to get the last day or so's records. The command that I am trying that yields no results is the following:

arsdoc query -u myAcc -p myPass -h myServer -f "System Log" -i "WHERE time_stamp > 1401854400 AND MSG_NUM=201" -v -o tmp.dat

This is the output for that command.

2014-06-05 13:41:28.691230: ARS6080I Login successful

2014-06-05 13:41:28.691407: ARS6062I Searching for folder 'System Log' ...

2014-06-05 13:41:28.707746: ARS6084I Search successful

2014-06-05 13:41:28.707948: ARS6063I Searching for documents in 'System Log' ...

2014-06-05 13:41:28.708031: ARS6117I Querying database with SQL string 'WHERE time_stamp > 1401854400 AND MSG_NUM=201'

2014-06-05 13:41:28.723833: ARS6085E Search unsuccessful

2014-06-05 13:41:28.724127: ARS6034W No hits were found that matched search criteria.

2014-06-05 13:41:28.728520: ARS6026I arsdoc completed.

I have no idea what I am doing wrong.


Solution

  • If you are using V9 of Content Manager OnDemand then your "System Log" applcation group may be using the column time_stamp_dt vs. time_stamp. Please see the select below for a system log data table:

    SQL> select min(time_stamp), max(time_stamp) from sl2;

    MIN(TIME_STAMP) MAX(TIME_STAMP)


             -1              -1
    

    SQL> select min(time_stamp_dt) from sl2;

    MIN(TIME_STAMP_DT)

    06-NOV-13 08.28.06.348954 PM

    SQL> select max(time_stamp_dt) from sl2;

    MAX(TIME_STAMP_DT)

    23-JUL-14 03.37.02.100321 PM