Cisco Cisco Access Registrar 5.0 トラブルシューティングガイド

ページ / 2
CAR 5.x Accounting File Generation Procedure for
CSV Format
Document ID: 116426
Contributed by Calvin Ryver, Cisco TAC Engineer.
Sep 26, 2013
Contents
Introduction
Edit the RexAcct Script
Related Information
Introduction
This document describes how to manually edit the RexAcctScript so that your accounting log files reflect a
Comma Separated Values (CSV) format.
Edit the RexAcct Script
The VerifylibRexAcctScript.so file is located in the cisco−ar > scripts > radius > rex directory. 
Note: In order to configure the log files to use the CSV format, you must manually edit and recompile the
script. This procedure is documented in the Using the REX Accounting Script User Guide, Chapter 25.
In order to change the format of the accounting file, navigate to opt > AICar1 > examples > rexacctscript >
AcctAsScript.cpp
, and make these changes:
Line Number             From                         To
2048              *(pEnd++) = "\n";           *(pEnd++) = ",";
2037              *(pEnd++) = "\t";           *(pEnd++) = " ";
Note: The quotation marks ("  ")  contain a space.
You might receive an error message such as this:
AcctAsScript.cpp:2080:18: error: empty character constant
If you receive this error message, then check the AcctAsScript.cpp file for a string and value that matches this:
*(pEnd++) = '';
Modify the script to look like this:
*(pEnd++) = '\t
The accounting file output should now resemble this:
Tue,  26  Sep  2000  17:15:22
User?Name  =  sven, NAS?IP?Address  =  10.200.68.2,  NAS?Port  =  2,
Service?Type  =  NAS  Prompt, Calling?Station?Id  =  172.17.246.244,
Acct?Status?Type  =  Start,  Acct?Delay?Time  =  0,