This document explains how to manually edit the RexAcctScript so that your accounting log files reflect a CSV-format.
There are no specific requirements for this document.
The information in this document applies to all versions of Cisco Access Registrar.
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 at:
/opt/AICar1/examples/rexacctscript/AcctAsScript.cpp
To change the format of the accounting, make these changes:
Line Number | From | To |
---|---|---|
2048 | *(pEnd++) = "\n"; | *(pEnd++) = ","; |
2037 | *(pEnd++) = "\t"; | *(pEnd++) = " "; |
Note: " " contains a space.
In order to successfully compile and install this script, refer to Using the REX Accounting Script.
The output of the accounting file appears similar to 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.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
19-Jan-2006 |
Initial Release |