Author Topic: Sending System Log Information to a file  (Read 7434 times)

JimWilson

  • Guest
Sending System Log Information to a file
« on: January 04, 2008, 06:26:24 AM »
Does anyone know how to send data from the system log to a file?
In OnDemand Client, ' system log ' I tried looking up all message # 82 for 2007, it found 313,948 loads, then I selected all, then I tried to do a copy and received a message saying it could only copy up to 200,000 lines.
At a command prompt what would I key in to get the system log message # 82 from 01/01/2007 to 12/31/2007 to go to a file?
This is on a Windows Box, OnDemand version 8.3

JimWilson

  • Guest
Re: Sending System Log Information to a file
« Reply #1 on: January 18, 2008, 07:34:45 AM »
Here is what I did

arsdoc query -h ServerName -H -f "System Log" -i "WHERE (msg_num = 82) and (time_stamp BETWEEN 1177218000 and 1199167199)" -o I:\DocGet\TEST.TXT -u AdminUser -p Password -v

jo19021

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Sending System Log Information to a file
« Reply #2 on: December 14, 2010, 11:44:32 AM »
That works.  Now, how can I create a query against the system log to run every day, and use the current system date to query the past 24 hours of activity.  The -S does not seem to work and I am getting the last 3 months worth. 

jo19021

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Sending System Log Information to a file
« Reply #3 on: December 14, 2010, 11:58:00 AM »
This is the query I have so far that is not working.

arsdoc query -h ARCHIVE -u admin -p ondemand -f "System Log" -o jaybosyslog.txt -i "WHERE (msg_num BETWEEN 34 and 64)? ?S ?12/13/10,12/13/10,%x?

pankaj.puranik

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: Sending System Log Information to a file
« Reply #4 on: December 14, 2010, 10:03:42 PM »
This may not be a solution but this is what you could do until you find a solution.

If you are on a unix system, you could simply write a shell script and use the arsdoc query and the unix 'date' function. Set this script as a batch to run every day.

Cheers
Pankaj.

pankaj.puranik

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: Sending System Log Information to a file
« Reply #5 on: December 14, 2010, 10:06:25 PM »
There's one more option.
Create a named query on the System Log folder and use the date range as 't-1' and 't'.
Use this named query in the arsdoc query with the named query option.
This should work.

Cheers
Pankaj.

jo19021

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Sending System Log Information to a file
« Reply #6 on: February 04, 2011, 10:44:31 AM »
That worked great.  Does ondemand allow for delimiting the output of a query?