# UDR Module Configuration Mode Commands

The UDR Module Configuration Mode allows you to configure Usage Data Record (UDR) file transfer parameters.

IMPORTANT:

The commands or keywords/variables that are available are dependent on platform type, product version, and installed license(s).
cdr

This command allows you to configure EDR/UDR file transfer parameters.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    cdr { purge { storage-limit storage_limit | time-limit time_limit } [ max-files max_records_to_purge ] | push-interval push_interval | push-trigger space-usage-percent trigger_percentage | remove-file-after-transfer | transfer-mode { pull [ module-only ] | push primary { encrypted-url encrypted_url | url url } [ [ max-files max_records ] [ max-tasks task_num ] [ module-only ] [ secondary { encrypted-secondary-url encrypted_secondary_url | secondary-url secondary_url } ] [ via local-context ] + ] | use-harddisk }default cdr [ purge | push-interval | push-trigger
    space-usage-percent | remove-file-after-transfer | transfer-mode [ module-only | push via ] | use-harddisk ] +no cdr [ purge | remove-file-after-transfer | use-harddisk ] +

default

Configures the default setting for the specified keyword(s):

- purge: Disabled
- push-interval: 300 seconds
- push-trigger: 80 percent
- remove-file-after-transfer: Disabled
- transfer mode: Pull
- push via: line cardMIO is used for push
- use-harddisk: Disabled

IMPORTANT:

The use-harddisk keyword is only available on ASR 5000 chassis.
no

If previously configured, disables the specified configuration:

- purge: Disables purging of records.
- remove-file-after-transfer: Retains a copy of the file even after it has been pushed or pulled to another server.
- use-harddisk: Disables data storage on the SMC hard disk.

IMPORTANT:

The use-harddisk keyword is available only on the ASR 5000 chassis.
purge { storage-limit storage_limit | time-limit time_limit } [ max-files max_records_to_purge ]

Specifies to purge/delete the UDR records based on "time" or "volume" limit.

When the configured threshold limit is reached on the hard disk drive, the records that are created dynamically in the /mnt/hd-raid/data/records/ directory are automatically deleted. Files that are manually created should be deleted manually.

- storage-limit storage_limit: Specifies to start deleting files when the specified megabytes of space is used for storage.storage_limit specifies the volume limit for the record files, in megabytes, and must be an integer from 10 through 143360.
- time-limit time_limit: Specifies to start deleting files older than the specified time limit.time_limit specifies the time limit for the record files, and must be an integer from 600 through 2592000.
- max-files max_records_to_purge: Specifies the maximum number of records to purge.max_records_to_purge must be an integer from 1000 through 10000.

push-interval value

Specifies the transfer interval (in seconds) to push UDR/EDR files to an external file server.

value must be an integer from 60 through 3600.

Default: 300
push-trigger space-usage-percent trigger_percentage

Specifies the UDR/EDR disk space utilization percentage, upon reaching which an automatic push is triggered and files are transferred to the configured external server.

trigger_percentage specifies the UDR/EDR disk utilization percentage for triggering push, and must be an integer from 10 through 80.

Default: 80%
remove-file-after-transfer

Specifies that the system must delete UDR/EDR files after they are transferred to the external file server.

Default: Disabled
transfer-mode { pull [ module-only ] | push primary { encrypted-url encrypted_url | url url } [ [ max-files max_records ] [ max-tasks task_num ] [ module-only ] [ secondary { encrypted-secondary-url encrypted_secondary_url | secondary-url secondary_url } ] [ via local-context ] + ]

Specifies the UDR/EDR file transfer mode.

- pull: Specifies that the L-ESS is to pull the UDR files.
- push: Specifies that the system is to push UDR files to the configured L-ESS.
- max-files max_records: Specifies the maximum number of files sent per iteration based on configured file size.Default: 4000
- max-tasks task_num: Specifies the maximum number of tasks (child processes) that will be spawned to push the files to the remote server. The task_num must be an integer from 4 through 8.Default: 4

  IMPORTANT:

  Note that increasing the number of child processes will improve the record transfer rate. However, spawning more child will consume additional resource. So, this option needs to be used with proper resource analysis.
- module-only: Specifies that the transfer-mode is only applicable to the UDR module; if not configured it is applicable to both EDR and UDR modules. This enables support for individual record transfer-mode configuration for each module.
- primary encrypted-url encrypted_url: Specifies the primary location in encrypted format to which the system pushes the UDR files.encrypted_url must be the primary location name in an encrypted format, and must be an alphanumeric string of 1 through 1024 characters.
- primary url url: Specifies the primary location to which the system pushes the UDR files.url must be the primary location, and must be an alphanumeric string of 1 through 1024 characters in the format: //user:password@host:[port]/directory.
- secondary encrypted-secondary-url encrypted_secondary_url: Specifies the secondary location in encrypted format to which the system pushes the UDR files when the primary location is unreachable or fails.encrypted_secondary_url must be the location in an encrypted format, and must be an alphanumeric string of 1 through 1024 characters.
- secondary secondary-url secondary_url: Specifies the secondary location to which the system pushes the UDR files when the primary location is unreachable or fails.secondary_url must be the secondary location, and must be an alphanumeric string of 1 through 1024 characters in the format: //user:password@host:[port]/directory.
- via local-context: Selects the LC/SPIO for transfer of UDRs. The system pushes the UDR files via SPIO in the local context.
- via local-context: Selects the MIO for transfer of UDRs. The system pushes the UDR files via the MIO in the local context.

use-harddisk

IMPORTANT:

The use-harddisk keyword is available only on the ASR 5000 chassis.

Specifies that on an ASR 5000 chassis, the hard disk on the SMC will be used to store UDR/EDR files. When configured to use the hard disk for UDR/EDR storage, UDR/EDR files are transferred from packet processing cards to the hard disk on the SMC.

Specifies that on an ASR 5500 chassis, the hard disk array on the FSCs will be used to store UDR/EDR files. On configuring to use the array for UDR/EDR storage, UDR/EDR files are transferred from DPCs to the array.

Default: Disabled
+

Indicates that more than one of the previous keywords can be entered within a single command.
Usage:

Use this command to configure how UDRs are moved and stored.

On the ASR 5000 ASR 5500 chassis, run this command only from the local context. Running in any other context would fail and deliver an error message.

If PUSH transfer mode is configured, the L-ESS server URL to which the UDR files need to be transferred to must be specified. The configuration allows a primary and a secondary server to be configured. Configuring the secondary server is optional. Whenever a file transfer to the primary server fails for four consecutive times, the files will be transferred to the secondary server. The transfer will switch back to the original primary server when:

- Four consecutive transfer failures to the secondary server occur
- After switching from the primary server, 30 minutes elapses

When changing the transfer-mode from pull to push, disable the PULL from L-ESS and then change the transfer mode to push. Make sure that the push server URL configured is accessible from the local context. Also, make sure that the base directory that is mentioned contains udr directory created within it.

When changing the transfer-mode from push to pull, after changing, enable PULL on the L-ESS. Any of the ongoing PUSH activity will continue till all the scheduled file transfers are completed. If there is no PUSH activity going on at the time of this configuration change, all the PUSH related configuration is nullified immediately.

The cdr use-harddisk command is available only on the ASR 5000 ASR 5500 chassis. This command can be run only in a context where CDRMOD is running. Configuring in any other context will result in failure with the message “Failure: Please Check if CDRMOD is running in this context or not.”

The cdr use-harddisk command can be configured either in the UDR or EDR module, but will be applicable to both record types. Configuring in one of the modules will prevent the configuration to be applied in the other module. Any change to this configuration must be done in the module in which it was configured, the change will be applied to both record types.

The VPNMgr can send a maximum of 4000 files to the remote server per iteration. However if the individual file size is big (say when compression is not enabled), then while transferring 4000 files SFTP operation takes a lot of time. To prevent this, the cdr transfer-mode push command can be configured with the keyword max-files, which allows operators to configure the maximum number of files sent per iteration based on configured file size.
Example:
The following command configures the system to retain a copy of the data file after it has been transferred to the storage location:

    no cdr remove-file-after-transfer

end

Exits the current configuration mode and returns to the Exec mode.
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    end

Usage:

Use this command to return to the Exec mode.
exit

Exits the current mode and returns to the parent configuration mode.
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    exit

Usage:

Use this command to return to the parent configuration mode.
file

This command allows you to configure UDR file parameters.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    file [ charging-service-name { include | omit } ] [ compression { gzip | none } ] [ current-prefix string ] [ delete-timeout seconds ] [ directory directory_name ] [ exclude-checksum-record ] [ field-separator { hyphen | omit | underscore } ] [ file-sequence-number
    rulebase-seq-num ] [ headers ] [ name file_name ] [ reset-indicator ] [ rotation [ num-records number | time seconds | volume bytes ] ] [ sequence-number { length length | omit | padded | padded-six-length | unpadded } ] [ storage-limit limit ] [ time-stamp { expanded-format | rotated-format | unix-format } ] [ trailing-text string ] [ trap-on-file-delete ] [ udr-seq-num ] [ xor-final-record ] +default file [ charging-service-name ] [ compression ] [ current-prefix ] [ delete-timeout ] [ directory ] [ field-separator ] [ file-sequence-number ] [ headers ] [ name ] [ reset-indicator ] [ rotation { num-records | time | volume } ] [ sequence-number ] [ storage-limit ] [ time-stamp ] [ trailing-text ] [ udr-seq-num ]

default

Configures the default setting for the specified keyword(s). Using the default file command will reset some but not all keyword parameters to their default values. To ensure that the default is reset for a specific parameter, include the corresponding keyword in the command.
charging-service-name { include | omit }

Specifies to include/exclude name of the charging service in the file name.

- include: Includes name of the charging service in the UDR file name.
- omit: Excludes name of the charging service in the UDR file name.

Default: include
compression { gzip | none }

Configures gzip compression of the UDR file.

- gzip: Enables GNU zip compression of the UDR file at approximately 10:1 ratio.
- none: Disables Gzip compression.

Default: none
current-prefix string

Specifies a string to add to the beginning of the UDR file that is currently being used to store UDR records.

string must be an alphanumeric string of 1 through 31 characters.

Default: curr
delete-timeout seconds

Specifies a timeout period (in seconds) when completed UDR files are deleted. By default, files are never deleted.

seconds must be an integer from 3600 through 31536000.

Default: Disabled
directory directory_name

Specifies a subdirectory in the default directory in which to store UDR files.

directory_name must be an alphanumeric string of 1 through 191 characters.

Default: /records/udr
exclude-checksum-record

When entered, this keyword excludes the final record containing #CHECKSUM followed by the 32-bit Cyclic Redundancy Check (CRC) of all preceding records from the UDR file.

Default: Disabled, inserts checksum record into the UDR file header.
field-separator { hyphen | omit | underscore }

Specifies the field separators to be used between two fields of a UDR file name.

- hyphen: Specifies to use ‘-’ (hyphen) as the field separator.
- omit: Excludes the field separator.
- underscore: Specifies to use ‘_’ (underscore) as the field separator.

Default: underscore
file-sequence-number rulebase-seq-num

Generates unique file sequence numbers for different rulebase-format-name combinations.
headers

Includes a file header summarizing the record layout.
name file_name

Default: udr

Specifies a string to use as the base file name for UDR files.

file_name must be an alphanumeric string of 1 through 31 characters. The file name format is as follows:

base_rulebase_format_sequencenum_timestamp

- base: Specifies type of record in file or contains the operator-specified string. Default: udr
- rulebase: Specifies the name of the ACS rulebase. UDRs from different rulebases go into different UDR files.
- format: Specifies the name of the UDR format if single-udr-format is specified, else the format field (and the trailing underscore) is omitted from the file name.
- sequencenum: This is a 5-digit sequence number to detect the missing file sequence. It is unique among all UDR files on the system.
- timestamp: Contains a timestamp based on file creation time in UTC formatted as: MMDDYYYYHHMMSS.

UDR files that have not been closed have a string added to the beginning of their file names.

File name for a UDR file in CSV format that contains information for a rulebase named rulebase1 and a UDR schema named udr_schema1 appears as follows:

udr_rulebase1_udr_schema1_00005_01302006143409

If file name is not configured, the system creates files for EDRs/UDRs/FDRs (xDRs) using the following name template with limits to 256 characters:

basename_ChargSvcName_ timestamp_SeqNumResetIndicator_FileSeqNumber

- basename: A global-based configurable text string that is unique per system that uniquely identifies the global location of the system running ACS.
- ChargSvcName: A system context-based configurable text string that uniquely identifies a specific context-based charging service.
- timestamp: Date and time at the instance of file creation. Date and time in the format: “MMDDYYYYHHmmSS”, where HH is a 24-hour value from 00-23.
- SeqNumResetIndicator: A one-byte counter used to discern the potential for duplicated FileSeqNumber with a range of 0 through 255, which is incremented by a value of 1 for the following conditions:
  - Failure of an ACS software process on an individual packet processing card
  - Failure of the system such that a second system takes over (for example, a standby or backup chassis put in place according to Inter-chassis Session Recovery)
  - File Sequence Number (FileSeqNumber) rollover from 999999999 to 0
- FileSeqNumber: unique file sequence number for the file is a 9-digit integer from 000000000 through 999999999. It is unique on each chassis.

File name for a closed xDR file in CSV format that contains information for ACS xyz_city1 and charging service name preapaid2 with timestamp 12311969190000, and file sequence number counter reset indicator to 002 for file sequence number 034939002 appears as follows:

xyz_city1_preapaid2_12311969190000_002_034939002

File name for a running xDR file in CSV format that contains information for the same parameters for file sequence number 034939003 prefixed with curr_ and appears as follows:

curr_xyz_city1_preapaid2_12311969190000_002_034939002

IMPORTANT:

When the "rulebase name" and "edr-format-name" options are enabled through this file command, if the "field-separator" value is "underscore" (default value) then, in the filename, the fields Rulebase name and EDR format name will be separated by "hyphen". If the "field-separator" value is "hyphen" then, in the filename, the fields Rulebase name and EDR format name will be separated by "underscore". This will ensure that the number of the fields in the filename is not increased and does not affect the backend billing system.
reset-indicator

Specifies to include the reset indicator counter value, from 0 to 255, in the UDR file name and is incremented (by one) whenever any of the following conditions occur:

- An ACSMgr/SessMgr process fails.
- An Inter-chassis Session Recovery (ICSR) peer chassis has transitioned from standby to active.
- The sequence number in sequence-number keyword has rolled over to zero.

rotation { num-records records | time seconds | volume bytes }

Specifies when to close a UDR file and create a new one.

- num-records records: Specifies the number of records that should be added to the file. When the number of records in the file reaches this specified value, the file is complete.records must be an integer from 100 through 10240.Default: 1024
- time seconds: Specifies the period of time to wait before closing the UDR file and creating a new one.seconds must be an integer from 30 through 86400.Default: 3600 seconds
- volume bytes: Specifies the maximum size of the UDR file before closing it and creating a new one.bytes must be an integer from 51200 through 62914560.Default: 102400 bytesNote that higher settings may provide the best compression ratio when the compression keyword is set to gzip.

sequence-number { length length | omit | padded | padded-six-length | unpadded }

Specifies including or excluding the sequence number in the file name.

- length length: Includes the sequence number with the specified length.length must be the length of the file sequence number with preceding zeroes in the file name, and must be an integer from 1 through 9.

  IMPORTANT:

  The length configuration is applicable in both UDR and EDR modules. When applied in both modules without the file udr-seq-num configuration, the minimum among the two values will come into effect for both modules. With the file udr-seq-num config, each module will use its own value of length.
- omit: Excludes the sequence number from the file name.
- padded: Includes the padded sequence number with preceding zeros in the file name. This is the default setting.
- padded-six-length: Includes the padded sequence number with six preceding zeros in the file name.
- unpadded: Includes the unpadded sequence number in the file name.

Default: padded
storage-limit limit

Specifies deleting files when the specified amount of space, in bytes, is used up for UDR/EDR file storage on packet processing card RAM.

On an ASR 5000 ASR 5500 chassis, limit must be an integer from 10485760 through 536870912.

Default: 33554432

IMPORTANT:

On the ASR 5000 chassis, the total storage limit is 536870912 bytes (512 MB). This limit is for both UDR and EDR files combined.
time-stamp { expanded-format | rotated-format | unix-format }

Specifies the timestamp of when the file was created be included in the file name.

- expanded-format: Specifies the UTC MMDDYYYYHHMMSS format.
- rotated-format: Specifies the YYYYMMDDHHMMSS format.
- unix-format: Specifies the UNIX format of x.y, where x is the number of seconds since 1/1/1970 and y is the fractional portion of the current second that has elapsed.

trailing-text string

Specifies the inclusion of arbitrary text string in the file name.

string must be an alphanumeric string of 1 through 30 characters.
trap-on-file-delete

Instructs the system to send an SNMP notification (starCDRFileRemoved) when an UDR/EDR file is deleted due to lack of space.

Default: Disabled
udr-seq-num

Specifies that the file sequence numbers that are part of the UDR file names be independently generated. If disabled, a single set of sequence numbers are shared by both UDR and EDR files.

Default: Disabled
xor-final-record

Specifies inserting an XOR checksum (in place of the CRC checksum) into the UDR file header if the exclude-checksum-record keyword is left at its default setting.

Default: Disabled
+

More than one of the previous keywords can be entered within a single command.
Usage:

Use this command to configure UDR file characteristics.
Example:
The following command sets the prefix of the current active UDR file to current:

    file current-prefix current

The following command sets the base file name to UDRfile:

    file name UDRfile