Module user_default
This module implements short form commands for the Erlang shell.
Copyright © 2016 - 2026 SigScale Global Inc.
See also: //stdlib/shell_default.
This module implements short form commands for the Erlang shell.
The functions in this module are available when called without
a module name in an interactive shell. These are meant to be used
by operations support staff to quickly get status information
about a running system.
| help/0 | Get help on shell local commands. |
| ts/0 | Display the total number of records in ocs tables. |
| td/0 | Display the current ocs table distribution. |
| su/0 | Display scheduler utilization. |
| up/0 | Display system uptime. |
| di/0 | Get information on running diameter services. |
| di/1 | Get information on running diameter services. |
| di/2 | Get information on running diameter services. |
| dc/0 | Get diameter capability values. |
| ll/1 | Get the last five events written to log. |
| ll/2 | Get the last N events written to log. |
| ql/2 | Query diameter logs. |
| ql/3 | Query diameter logs. |
| ql/4 | Query diameter logs. |
| dia_application/1* | Print the Application name header. |
| dia_count/2* | Print the command name and count. |
Get help on shell local commands.
Display the total number of records in ocs tables.
Display the current ocs table distribution.
Display scheduler utilization.
Display system uptime.
di() -> Result
- Result = [ServiceResult]
- ServiceResult = {Service, [term()]}
- Service = term()
Get information on running diameter services.
di(Info) -> Result
- Info = [Item]
- Item = peer | applications | capabilities | transport | connections | statistics | Capability
- Capability = 'Origin-Host' | 'Origin-Realm' | 'Vendor-Id' | 'Product-Name' | 'Origin-State-Id' | 'Host-IP-Address' | 'Supported-Vendor' | 'Auth-Application-Id' | 'Inband-Security-Id' | 'Acct-Application-Id' | 'Vendor-Specific-Application-Id' | 'Firmware-Revision'
- Result = [ServiceResult]
- ServiceResult = {Service, [term()]}
- Service = term()
Get information on running diameter services.
di(ServiceType, Info) -> Result
- ServiceType = auth | acct
- Info = [Item]
- Item = peer | applications | capabilities | transport | connections | statistics | Capability
- Capability = 'Origin-Host' | 'Origin-Realm' | 'Vendor-Id' | 'Product-Name' | 'Origin-State-Id' | 'Host-IP-Address' | 'Supported-Vendor' | 'Auth-Application-Id' | 'Inband-Security-Id' | 'Acct-Application-Id' | 'Vendor-Specific-Application-Id' | 'Firmware-Revision'
- Result = term() | {error, Reason}
- Reason = unknown_service
Get information on running diameter services.
Get diameter capability values.
Get the last five events written to log.
Get the last N events written to log.
ql(Log, Match) -> Events
- Log = acct | auth
- Match = MatchFilter | [MatchFilter]
- MatchFilter = RadiusMatch | DiameterMatchSpec | NrfMatchSpec | RatedMatchSpec
- RadiusMatch = {Attribute, AttributeMatch}
- Attribute = byte()
- AttributeMatch = {exact, term()} | {notexact, term()} | {lt, term()} | {lte, term()} | {gt, term()} | {gte, term()} | {regex, term()} | {like, [term()]} | {notlike, [term()]} | {in, [term()]} | {notin, [term()]} | {contains, [term()]} | {notcontain, [term()]} | {containsall, [term()]}
- DiameterMatchSpec = {DiameterMatchHead, MatchConditions}
- DiameterMatchHead = #'3gpp_ro_CCR'{} | #'3gpp_ro_CCA'{} | #'3gpp_ro_RAR'{} | #'3gpp_ro_RAA'{} | #'3gpp_gx_CCR'{} | #'3gpp_gx_CCA'{} | #'3gpp_gx_RAR'{} | #'3gpp_gx_RAA'{}
- NrfMatchSpec = {NrfMatchHead, MatchConditions}
- NrfMatchHead = map()
- RatedMatchSpec = {RatedMatchHead, MatchConditions}
- RatedMatchHead = #rated{bucket_value = non_neg_integer() | undefined | '_', bucket_type = cents | octets | seconds | messages | undefined | '_', currency = string() | undefined | '_', is_billed = boolean() | '_', is_tax_exempt = boolean() | undefined | '_', tariff_type = atom() | undefined | '_', product = term() | undefined | '_', price_name = string() | undefined | '_', price_type = tariff | usage | event | undefined | '_', description = string() | undefined | '_', tax_excluded_amount = non_neg_integer() | undefined | '_', tax_included_amount = non_neg_integer() | undefined | '_', tax_rate = integer() | undefined | '_', usage_rating_tag = usage | included | non_included | undefined | '_'}
- MatchConditions = [tuple()]
- Events = [ocs_log:acct_event()]
Query diameter logs.
Start will be minus one hour from now.
ql(Log, Match, Start) -> Events
- Log = acct | auth
- Match = MatchFilter | [MatchFilter]
- MatchFilter = RadiusMatch | DiameterMatchSpec | NrfMatchSpec | RatedMatchSpec
- RadiusMatch = {Attribute, AttributeMatch}
- Attribute = byte()
- AttributeMatch = {exact, term()} | {notexact, term()} | {lt, term()} | {lte, term()} | {gt, term()} | {gte, term()} | {regex, term()} | {like, [term()]} | {notlike, [term()]} | {in, [term()]} | {notin, [term()]} | {contains, [term()]} | {notcontain, [term()]} | {containsall, [term()]}
- DiameterMatchSpec = {DiameterMatchHead, MatchConditions}
- DiameterMatchHead = #'3gpp_ro_CCR'{} | #'3gpp_ro_CCA'{} | #'3gpp_ro_RAR'{} | #'3gpp_ro_RAA'{} | #'3gpp_gx_CCR'{} | #'3gpp_gx_CCA'{} | #'3gpp_gx_RAR'{} | #'3gpp_gx_RAA'{}
- NrfMatchSpec = {NrfMatchHead, MatchConditions}
- NrfMatchHead = map()
- RatedMatchSpec = {RatedMatchHead, MatchConditions}
- RatedMatchHead = #rated{bucket_value = non_neg_integer() | undefined | '_', bucket_type = cents | octets | seconds | messages | undefined | '_', currency = string() | undefined | '_', is_billed = boolean() | '_', is_tax_exempt = boolean() | undefined | '_', tariff_type = atom() | undefined | '_', product = term() | undefined | '_', price_name = string() | undefined | '_', price_type = tariff | usage | event | undefined | '_', description = string() | undefined | '_', tax_excluded_amount = non_neg_integer() | undefined | '_', tax_included_amount = non_neg_integer() | undefined | '_', tax_rate = integer() | undefined | '_', usage_rating_tag = usage | included | non_included | undefined | '_'}
- MatchConditions = [tuple()]
- Start = calendar:datetime() | ocs_log:timestamp()
- Events = [ocs_log:acct_event()]
Query diameter logs.
End time will be now.
ql(Log, Match, Start, End) -> Events
- Log = acct | auth
- Match = MatchFilter | [MatchFilter]
- MatchFilter = RadiusMatch | DiameterMatchSpec | NrfMatchSpec | RatedMatchSpec
- RadiusMatch = {Attribute, AttributeMatch}
- Attribute = byte()
- AttributeMatch = {exact, term()} | {notexact, term()} | {lt, term()} | {lte, term()} | {gt, term()} | {gte, term()} | {regex, term()} | {like, [term()]} | {notlike, [term()]} | {in, [term()]} | {notin, [term()]} | {contains, [term()]} | {notcontain, [term()]} | {containsall, [term()]}
- DiameterMatchSpec = {DiameterMatchHead, MatchConditions}
- DiameterMatchHead = #'3gpp_ro_CCR'{} | #'3gpp_ro_CCA'{} | #'3gpp_ro_RAR'{} | #'3gpp_ro_RAA'{} | #'3gpp_gx_CCR'{} | #'3gpp_gx_CCA'{} | #'3gpp_gx_RAR'{} | #'3gpp_gx_RAA'{}
- NrfMatchSpec = {NrfMatchHead, MatchConditions}
- NrfMatchHead = map()
- RatedMatchSpec = {RatedMatchHead, MatchConditions}
- RatedMatchHead = #rated{bucket_value = non_neg_integer() | undefined | '_', bucket_type = cents | octets | seconds | messages | undefined | '_', currency = string() | undefined | '_', is_billed = boolean() | '_', is_tax_exempt = boolean() | undefined | '_', tariff_type = atom() | undefined | '_', product = term() | undefined | '_', price_name = string() | undefined | '_', price_type = tariff | usage | event | undefined | '_', description = string() | undefined | '_', tax_excluded_amount = non_neg_integer() | undefined | '_', tax_included_amount = non_neg_integer() | undefined | '_', tax_rate = integer() | undefined | '_', usage_rating_tag = usage | included | non_included | undefined | '_'}
- MatchConditions = [tuple()]
- Start = calendar:datetime() | ocs_log:timestamp()
- End = calendar:datetime() | ocs_log:timestamp()
- Events = [ocs_log:acct_event()]
Query diameter logs.
dia_application(Application) -> ok
- Application = non_neg_integer()
Print the Application name header.
dia_count(Command, Count) -> ok
- Command = tuple()
- Count = non_neg_integer()
Print the command name and count.
Generated by EDoc