Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help for cautil select conlog

Status
Not open for further replies.

helge003

Programmer
Jan 14, 2002
1
DE
Hi

It try to use the cautil select conlog to export the eventlog messages to a .csv file

can you help me finding the right syntax, the syntax of
the reference guide i've tried doesn't work

has anybody a suggestion ??

THX

helge003
 
Hello

Try this...

cautil select conlog msg=* list conlog output=c:\message.csv

Rdgs

SueS001
 
This is an old post so it may not be relevant anymore - but then again someone may find it useful.

here's one I did earlier. Run it from a batch file and it will extract all messages from todays log and manipulate the file to create a final csv containing the nodename, time and message text. The cautil command is in bold.

:: *********** DAILY MESSAGE EXTRACT *********** ::

:: Export todays date to tempory file - in form of "day date" eg Fri 07/05/2002
date /t > d:\tng\logs\date.txt

:: Set the Date as variable "today"
for /F "tokens=2-4 delims=/ " %%i in (d:\tng\logs\date.txt) do set today=%%j/%%i/%%k

:: Select all messages from todays CA log and output to csv file
cautil sel conlog msg='*' START=%today%,00:00 LI CONLOG OUT=c:\tng\logs\conlog.csv EXPAND=No

:: Select the date from the temp file. Strip off the slashes and set it as variable "filename"
for /F "tokens=2-4 delims=/ " %%i in (d:\tng\logs\date.txt) do set FileName=%%i%%j%%k

:: Extract the interesting bits from the csv file (date, time, node, message) and output to final csv file
:: Filename is CompleteLog_%filename%.csv EG "CompleteLog_07052002.csv"
for /F "tokens=1-26 delims=," %%a in (d:\tng\logs\conlog.csv) do echo %%a,%%b,%%d,%%x%%y%%z >> d:\tng\logs\CompleteLog_%FileName%.csv

::**************** END *******************::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top