OnDemand User Group

Support Forums => Other => Topic started by: JimWilson on January 04, 2008, 06:26:24 AM

Title: Sending System Log Information to a file
Post by: JimWilson 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
Title: Re: Sending System Log Information to a file
Post by: JimWilson 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
Title: Re: Sending System Log Information to a file
Post by: jo19021 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. 
Title: Re: Sending System Log Information to a file
Post by: jo19021 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?
Title: Re: Sending System Log Information to a file
Post by: pankaj.puranik 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.
Title: Re: Sending System Log Information to a file
Post by: pankaj.puranik 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.
Title: Re: Sending System Log Information to a file
Post by: jo19021 on February 04, 2011, 10:44:31 AM
That worked great.  Does ondemand allow for delimiting the output of a query?