This document explains how to manually edit the Cisco CNS Access Registrar RexAcctScript so that your accounting log files reflect a CSV-format.
There are no specific requirements for this document.
The information in this document is based on Cisco CNS Access Registrar versions 1.7 and 3.0.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
If you want your accounting log files to reflect a CSV-format that can be used in your billing applications, edit the RexAcctScript manually and recompile it. The file is located by default at $ARINSTALLPATH/examples/rexacctscript/AcctAsScript.cpp.
To change the format of the accounting, make the changes shown in this table:
| Line Number AR 1.7
|| Line number AR 3.0
|| *(pEnd++) = "\n";
|| *(pEnd++) = ",";
|| *(pEnd++) = "\t";
|| *(pEnd++) = " ";
Note: " " contains a space.
For you compile and install the RexAcctScript script, use gcc 2.95-3. For additional details, refer to Cisco CNS Access Registrar User's Guide - Using the REX Accounting Script.
The output of the accounting file needs to look something like 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,
Acct-Session-Id = 0000000D, Acct-Authentic = RADIUS, NAS-Port-Type = Virtual,,,,,
Tue, 26 Sep 2000 17:15:23 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 = Stop,
Acct-Delay-Time = 0, Acct-Session-Id = 0000000D, Acct-Authentic = RADIUS,
Acct-Session-Time = 1, Acct-Terminate-Cause = User Request, NAS-Port-Type = Virtual,,,,,
The accounting files now contain a comma (",") between each entry.