Working with Logs
This section explains how to work with logs.
Writing to Logs
You need to configure the Oracle Communications Session Border Controller to indicate you want messages written to logs.
The log files are written until they become 1 MB in size. The file is then closed and renamed with a .1 appended to the original file name. For example,
sipmsg.log
becomes sipmsg.log.1
. New logs continued to be written to the original file,
sipmsg.log
, until once again they reach the 1 MB limit. Again the file is closed and renamed with a .1 appended to the original file name. The existing file with .1 appended is renamed to .2, for example sipmsg.log.2. This continues until you have 13 1 MB files associated with the log. When this limit is reached, the oldest file (the one with .12 appended to the name) is discarded.
Manually Rotating Logs
You can manually rotate (close) the log file by using the following command:
notify * rotate-logs
The * can be any of the following Oracle Communications Session Border Controller tasks:
- all
- sipd
- sysmand
- berpd
- lemd
- mbcd
- h323d
- algd
- radd
You can manually rotate the log files when you are trying to isolate a specific problem. Working with Oracle Technical Support, you could close all current log files (or just for a specific task) and then run a test of your problem. You can then easily identify the log files to review.
Displaying List of Log Files
You can display the list of log files by using the
display-logfiles ACLI command. Every task writes to its own process log (log.taskname
) and protocol trace logs (transaction logs) are enabled or disabled creating a task.log file. The log files are stored in the
/opt/logs
directory on the
Oracle Communications Session Border Controller.
For example:
ORACLE# display-logfiles Listing Directory /opt/logs: drwxrwxrwx 1 0 0 512 Jul 4 18:02 ./ drwxrwxrwx 1 0 0 512 Jul 6 09:50 ../ -rwxrwxrwx 1 0 0 820707 Jul 6 11:55 acmelog -rwxrwxrwx 1 0 0 3447 Jul 2 17:40 log.sysmand -rwxrwxrwx 1 0 0 3724 Jul 2 15:59 log.bootstrap -rwxrwxrwx 1 0 0 132 Jul 2 17:40 log.brokerd -rwxrwxrwx 1 0 0 740 Jul 2 17:40 log.npsoft -rwxrwxrwx 1 0 0 369 Jul 2 15:59 log.berpd -rwxrwxrwx 1 0 0 26660 Jul 6 11:46 log.cliWorker -rwxrwxrwx 1 0 0 3316 Jul 2 17:40 log.lemd -rwxrwxrwx 1 0 0 852 Jul 2 17:40 log.atcpd -rwxrwxrwx 1 0 0 733 Jul 2 17:40 log.atcpApp -rwxrwxrwx 1 0 0 2877 Jul 2 17:40 log.mbcd -rwxrwxrwx 1 0 0 757 Jul 2 17:40 log.lid -rwxrwxrwx 1 0 0 1151 Jul 2 17:40 log.algd -rwxrwxrwx 1 0 0 741 Jul 2 17:40 log.radd -rwxrwxrwx 1 0 0 728 Jul 2 17:40 log.pusher -rwxrwxrwx 1 0 0 1448 Jul 2 17:40 log.ebmd -rwxrwxrwx 1 0 0 671322 Jul 6 11:55 log.sipd -rwxrwxrwx 1 0 0 681011 Jul 6 11:55 log.h323d -rwxrwxrwx 1 0 0 1169 Jul 2 15:59 log.h248d -rwxrwxrwx 1 0 0 18294 Jul 2 17:40 log.snmpd -rwxrwxrwx 1 0 0 1078 Jul 2 17:40 snmpd.log -rwxrwxrwx 1 0 0 190 Jul 2 15:59 log.acliSSH0 -rwxrwxrwx 1 0 0 191 Jul 2 15:59 log.acliSSH1 -rwxrwxrwx 1 0 0 192 Jul 2 15:59 log.acliSSH2 -rwxrwxrwx 1 0 0 192 Jul 2 15:59 log.acliSSH3 -rwxrwxrwx 1 0 0 192 Jul 2 15:59 log.acliSSH4 -rwxrwxrwx 1 0 0 3043 Jul 6 11:38 log.acliConsole -rwxrwxrwx 1 0 0 2655 Jul 2 21:07 log.acliTelnet0 -rwxrwxrwx 1 0 0 195 Jul 2 15:59 log.acliTelnet1 -rwxrwxrwx 1 0 0 195 Jul 2 15:59 log.acliTelnet2 -rwxrwxrwx 1 0 0 195 Jul 2 15:59 log.acliTelnet3 -rwxrwxrwx 1 0 0 195 Jul 2 15:59 log.acliTelnet4 -rwxrwxrwx 1 0 0 1000005 Jul 4 18:01 acmelog.1
Viewing Logs
You can send the log off the Oracle Communications Session Border Controller through wancom0 or retrieve it using SFTP in order to view it.
Note:
The view-log command currently listed in the ACLI is not supported.Viewing a Specific Logfile
You can view a specific logfile saved on the Oracle Communications Session Border Controller using the show logfile <filename> command. For example:
ORACLE# show logfile appweb.log
Jun 6 17:45:10.666 appWeb: 2: Server Root "/www"
Jun 6 17:45:10.666 appWeb: 2: DocRoot (Main Server): "/www/war"
Jun 6 17:45:10.667 appWeb: 2: Activating module (Builtin) dirHandler
Jun 6 17:45:10.667 appWeb: 2: Add handler "dirHandler" for ""
Jun 6 17:45:10.667 appWeb: 2: Set connector "netConnector"
Jun 6 17:45:10.667 appWeb: 2: Activating module (Builtin) authFilter
Dynamically Changing Log Level
You can dynamically change the log level by using the ACLI’s log-level command, in the Superuser mode. The log-level command sets the log level for a specific task. The following table lists the three subcommands within the log-level command.
log-level subcommands | Description |
---|---|
task_name | Displays the log level according
to the task/process name. (You do not have to enter @<system_name>.) To
view all tasks, enter all.
To list available task/process names, enter the show processes command. |
log_level | Identifies the log level, either by name or by number. |
log_type_list | Lets you list log types by number or by name in parentheses (()). |
To change the log level:
- Access the ACLI in Superuser mode.
-
Type
log-level followed
by a Space and one of the log-level subcommands. You can change the log level
for the following:
-
system-wide
log-level system <log level>
For example:
log-level system DEBUG
-
log level at which a specific task/process sends to the acmelog file
log level <task name> <log level>
For example:
log-level sipd debug
-
- Press Enter.
Requesting Log Level Data
You are able to view the current log level of processes/tasks that are running on the Oracle Communications Session Border Controller. You can do this through both the ACLI and ACP:
- ACLI—The loglevel subcommand has been added to the ACLI show command
- ACP—A new ACP method called GET_LOG_LEVEL has been added
ACLI show loglevel Command
The ACLI show loglevel command allows you to request log level data from the ACLI console. It takes one mandatory and two optional parameters. The mandatory parameter specifies the name of the Oracle Communications Session Border Controller task for which you are requesting information; one of the optional parameters specifies the type of log level for which you want information and the other allows you to select whether you want to view a verbose display of the task.
You can enter all as the value for either of these parameters to view information for all system tasks or all log levels. If you do not enter a parameter, the system returns an error message and provides a list of valid parameters. You can also wildcard these parameters by entering an asterisk (*), but entering partial wildcards does not work.
To view log level information for a single system task:
- Type
show loglevel, a Space, and then the name of the system task for which you want to see log level information. Then press Enter.
ORACLE# show loglevel sipd Log Levels for process sipd: loglevel=DEBUG
To view log level information for a single system task with a specific log level:
- Type
show loglevel, a Space, the name of the system task for which you want to see log level information, and the name of the log. Then press Enter.
ORACLE# show loglevel sipd GENERAL Log Levels for process sipd: GENERAL=NOTICE ORACLE# show loglevel sipd MINOR Log Levels for process sipd: MINOR=NOTICE ORACLE# show loglevel sipd DNS Log Levels for process sipd: DNS=NOTICE
To view verbose log level information for a single system task:
- Type
show loglevel, a Space, the name of the system task for which you want to see log level information, and
verbose. Then press Enter.
ORACLE# show loglevel sipd verbose Log Levels for process sipd: GENERAL=DEBUG EMERGENCY=DEBUG CRITICAL=DEBUG MAJOR=DEBUG MINOR=DEBUG WARNING=DEBUG PROC=DEBUG IPC=DEBUG SERVICE=DEBUG EVENT=DEBUG MESSAGE=DEBUG TEST=DEBUG TRIP=DEBUG SIP=DEBUG MBCP=DEBUG FLOW=DEBUG MEDIA=DEBUG SESSION=DEBUG TRANS=DEBUG TIMER=DEBUG ALG=DEBUG NPSOFT=DEBUG ARP=DEBUG SNMP=DEBUG ANDD=DEBUG XNTP=DEBUG REDUNDANCY=DEBUG SIPNAT=DEBUG H323=DEBUG ERROR=DEBUG CONFIG=DEBUG DNS=DEBUG H248=DEBUG BAND=DEBUG ALI=DEBUG SS8GI=DEBUG COPS=DEBUG ATCP=DEBUG ATCPAPP=DEBUG CLF=DEBUG
ACP
The new ACP command GET_LOG_LEVEL provides log level information. This ACP request requires authentication, and it must be sent to port 3000.
Because ACP message length is limited, obtaining log level information for multiple system tasks is a multi-step procedure. For a known, single task, the procedure does not require as many steps.
To obtain log level information, an ACP message with the GET_LOG_LEVEL method is sent, and its message body contains information about the log levels being requested. This message body takes the following format: process:type.
An asterisk (*) can be used instead of the process name or log type to wildcard that value. If the process name is replaced with a *, then the first message response is a list of processes; this allows the querying management software to query the level of each process directly.
Wildcarding Task Name and Log Type
When you want to wildcard the process name and log type, the ACP requests looks like this:
GET_LOG_LEVEL sysmand@acmesystem ACME/1.0 Object-ID:0 Trans-ID: 0 From: user@10.0.0.1 To: sd@10.0.0.2 Content-Type: text/plain CSeq: 3 GET_LOG_LEVEL Authorization: Digest username="user", realm="intern1", nonce=6eccad8d8a4d7473d3725bc54bdf4a59, uri="sysmand@acmesystem", response=5a700cf8c15a0902cb8e75a02cc99f33, algorithm="md5-sess", cnonce=4c11d5, qop="auth", nc=00000002 Content-Length: 3 *:*
The response would return the actual list of tasks running on the system. Depending on what tasks are running, it would look like this:
ACME/1.0 200 Everything is OK Trans-ID: 0 From: user@10.0.0.1 To: sd@10.0.0.2 CSeq: 3 GET_LOG_LEVEL Content-Type: text/xml Content-Length: 253 <ProcessList> <process name='sysmand'/> <process name='acliSSH0'/> <process name='brokerd'/> <process name='tCliWorker'/> <process name='lemd'/> <process name='atcpd'/> <process name='atcpApp'/> <process name='mbcd'/> <process name='lid'/> <process name='radd'/> <process name='pusher'/> <process name='ebmd'/> <process name='sipd'/> <process name='snmpd'/> <process name='acliSSH1'/> <process name='acliSSH2'/> <process name='acliSSH3'/> <process name='acliSSH4'/> <process name='acliConsole'/> <process name='acliTelnet0'/> <process name='acliTelnet1'/> <process name='acliTelnet2'/> <process name='acliTelnet3'/> <process name='acliTelnet4'/> </ProcessList>
Specific Task with Wildcard Log Level
The NMS can use the list from the above example to query each task using additional GET_LOG_LEVEL messages by specifying the name of the tasks and the levels.
The message would look like this:
GET_LOG_LEVEL sysmand@acmesystem ACME/1.0 Object-ID: 0 Trans-ID: 0 From: user@10.0.0.1 To: sd@10.0.0.2 Content-Type: text/plain CSeq: 3 GET_LOG_LEVEL Authorization: Digest username="user", realm="intern1", nonce=5dd735490c78a0146ca06d50f47c0a50, uri="sysmand@acmesystem", response=129b882a3ee110db86565932819d017b, algorithm="md5-sess", cnonce=859dcc, qop="auth", nc=00000002 Content-Length: 9 sysmand:*
To which the response would look like this:
ACME/1.0 200 Everything is OK Object-ID: 0 Trans-ID: 0 From: user@10.0.0.1 To: sd@10.0.0.2 CSeq: 3 GET_LOG_LEVEL Content-Type: text/xml Content-Length: 544 <sysmand GENERAL=DEBUG EMERGENCY=DEBUG CRITICAL=DEBUG MAJOR=DEBUG MINOR=DEBUG WARNING=DEBUG PROC=DEBUG IPC=DEBUG SERVICE=DEBUG EVENT=DEBUG MESSAGE=DEBUG TEST=DEBUG TRIP=DEBUG SIP=DEBUG MBCP=DEBUG FLOW=DEBUG MEDIA=DEBUG SESSION=DEBUG TRANS=DEBUG TIMER=DEBUG ALG=DEBUG NPSOFT=DEBUG ARP=DEBUG SNMP=DEBUG ANDD=DEBUG XNTP=DEBUG REDUNDANCY=DEBUG SIPNAT=DEBUG H323=DEBUG ERROR=DEBUG CONFIG=DEBUG DNS=DEBUG H248=DEBUG BAND=DEBUG ALI=DEBUG SS8GI=DEBUG COPS=DEBUG ATCP=DEBUG ATCPAPP=DEBUG CLF=DEBUG />
Specific Task and Log Level Type
To request a specific type of log level for a specific process, specify the process name and type specified in the body of the request:
GET_LOG_LEVEL sysmand@acmesystem ACME/1.0 Object-ID: 0 Trans-ID: 0 From: user@10.0.0.1 To: sd@10.0.0.2 Content-Type: text/plain CSeq: 3 GET_LOG_LEVEL Authorization: Digest username="user", realm="intern1", nonce=d11774ac886bf2293217b1ed894444e3, uri="sysmand@acmesystem", response=b2eb7cae77e544685ce2883b90189e78, algorithm="md5-sess", cnonce=e0ad7, qop="auth", nc=00000002 Content-Length: 14 sysmand:CONFIG
The response to this request would look like this:
ACME/1.0 200 Everything is OK Object-ID: 0 Trans-ID: 0 From: user@10.0.0.1 To: sd@10.0.0.2 CSeq: 3 GET_LOG_LEVEL Content-Type: text/xml Content-Length: 26 <sysmand CONFIG=DEBUG />