Difference between revisions of "Tracing AlphaCom data communication"
From Zenitel Wiki
(→Modify the configuration file for logging) |
|||
(22 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | As from AMC version 11.5.3. | + | {{A}} |
+ | As from AMC version 11.5.3.1B it is possible to trace various data protocols. Both input and output data can be traced, including time stamp. This can be useful for troubleshooting. | ||
== Modify the configuration file for logging == | == Modify the configuration file for logging == | ||
Line 10: | Line 11: | ||
* '''Host name''': IP address of the AlphaCom | * '''Host name''': IP address of the AlphaCom | ||
* '''Port number''': 22 | * '''Port number''': 22 | ||
− | * '''User name''' | + | * '''User name''' and '''Password''': {root-password} |
− | |||
Note: Port 22 (SSH) must be enabled in the AlphaWeb in '''System Configuration''' > '''Filters'''. | Note: Port 22 (SSH) must be enabled in the AlphaWeb in '''System Configuration''' > '''Filters'''. | ||
Line 18: | Line 18: | ||
# Specify the port number to be used for the trace connection (Note that this is a different port than the external application is using for MPC data) | # Specify the port number to be used for the trace connection (Note that this is a different port than the external application is using for MPC data) | ||
− | # Remove the "#" in front of 74 to enable MPC data trace | + | # Remove the "#" in front of the protocol number to be traced. (e.g. remove the "#" in front of 74 to enable MPC data trace). |
# Save the file | # Save the file | ||
# Rename the file from '''amx_trace_.txt''' to '''amx_trace.txt''' (I.e. remove the last "underscore"). | # Rename the file from '''amx_trace_.txt''' to '''amx_trace.txt''' (I.e. remove the last "underscore"). | ||
− | [[File:MPC_WinSCP.PNG|left|thumb|500px|Define the TCP port number to be used (here port 12345), and enable MPC trace by removing the "#" in front of 74]] | + | [[File:MPC_WinSCP.PNG|left|thumb|500px|Define the TCP port number to be used (here port 12345), and enable MPC data trace by removing the "#" in front of 74]] |
<br style="clear:both;" /> | <br style="clear:both;" /> | ||
− | == Define TCP port for logging | + | == Define the TCP port used for logging == |
In AlphaWeb, '''System Configuration''' -> '''Filters''', select '''Add Filters''' and add the same TCP port as defined in the configuration file above. Remember to '''Enable''' the port, and to '''Apply''' the settings. | In AlphaWeb, '''System Configuration''' -> '''Filters''', select '''Add Filters''' and add the same TCP port as defined in the configuration file above. Remember to '''Enable''' the port, and to '''Apply''' the settings. | ||
Line 31: | Line 31: | ||
[[File:MPC_Filters.PNG|left|thumb|500px|Define in AlphaWeb the TCP port number to be used]] | [[File:MPC_Filters.PNG|left|thumb|500px|Define in AlphaWeb the TCP port number to be used]] | ||
<br style="clear:both;" /> | <br style="clear:both;" /> | ||
− | |||
== Collect log data == | == Collect log data == | ||
Line 51: | Line 50: | ||
<br style="clear:both;" /> | <br style="clear:both;" /> | ||
− | Now perform some activity in the AlphaCom which will generate | + | Now perform some activity in the AlphaCom which will generate the required data (e.g. set up a call). Open the log file, and verify that there is data in the file. |
+ | |||
+ | The log file for MPC data trace would look something like this: | ||
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.21 15:28:47 =~=~=~=~=~=~=~=~=~=~=~= | =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.21 15:28:47 =~=~=~=~=~=~=~=~=~=~=~= | ||
Line 73: | Line 74: | ||
74 2 1450708101 652 13 0201 F102 | 74 2 1450708101 652 13 0201 F102 | ||
74 2 1450708101 665 13 0206 F140 | 74 2 1450708101 665 13 0206 F140 | ||
− | 74 2 1450708101 666 13 0201 F140 | + | 74 2 1450708101 666 13 0201 F140 |
+ | === Data Format Description === | ||
− | + | Example log string: | |
− | + | 74 2 1450708091 458 28 0504 F102 F140 0000 0000 | |
− | Example: | ||
− | 74 2 | ||
{| border="1" | {| border="1" | ||
− | ! style="background:#ffdead;" width=" | + | ! style="background:#ffdead;" width="200" | Parameter |
! style="background:#ffdead;" width="350" | Description | ! style="background:#ffdead;" width="350" | Description | ||
|- | |- | ||
− | | align=left | 74 || align=left | Protocol number 74 = MPC | + | | align=left | 74 || align=left | Protocol number. 74 = MPC |
|- | |- | ||
| align=left | 2 || align=left | Data From AMC (1 = read, 2 = write) | | align=left | 2 || align=left | Data From AMC (1 = read, 2 = write) | ||
|- | |- | ||
− | | align=left | | + | | align=left | 1450708091 || align=left | Seconds since Epoch |
|- | |- | ||
− | | align=left | | + | | align=left | 458 || align=left | Milliseconds |
|- | |- | ||
− | | align=left | | + | | align=left | 28 || align=left | Number of bytes payload (one space after length not counted) |
|- | |- | ||
− | | align=left | | + | | align=left | 0504 F102 F140 0000 0000 || align=left | Payload |
|- | |- | ||
|} | |} | ||
<br/> | <br/> | ||
− | |||
[[Category: AlphaCom Troubleshooting]] | [[Category: AlphaCom Troubleshooting]] | ||
− | [[Category: | + | [[Category:Logging]] |
Latest revision as of 13:16, 8 October 2019
As from AMC version 11.5.3.1B it is possible to trace various data protocols. Both input and output data can be traced, including time stamp. This can be useful for troubleshooting.
Contents
Modify the configuration file for logging
A configuration file for logging of data communication is located on the AMC-IP board, in the location /opt/amc/config/amx_trace_.txt. The configuration file is checked every 2 seconds and changes applied.
The PC program WinSCP is used to connect to the AlphaCom, open the configuration file and modify it.
In WinSCP create a New Site using:
- File protocol: SFTP
- Host name: IP address of the AlphaCom
- Port number: 22
- User name and Password: {root-password}
Note: Port 22 (SSH) must be enabled in the AlphaWeb in System Configuration > Filters.
Log in, and navigate to /opt/amc/config/. Open the amx_trace_.txt file by doubleclicking it, and modify the file according to the information below:
- Specify the port number to be used for the trace connection (Note that this is a different port than the external application is using for MPC data)
- Remove the "#" in front of the protocol number to be traced. (e.g. remove the "#" in front of 74 to enable MPC data trace).
- Save the file
- Rename the file from amx_trace_.txt to amx_trace.txt (I.e. remove the last "underscore").
Define the TCP port used for logging
In AlphaWeb, System Configuration -> Filters, select Add Filters and add the same TCP port as defined in the configuration file above. Remember to Enable the port, and to Apply the settings.
Collect log data
Collect the trace data from AlphaCom by using the Telnet/SSH client program PuTTY.
Connection setup
- Host Name: The IP Address of the AlphaCom (e.g 10.5.101.30)
- Port: The port number defined in the configuration file (e.g. 12345)
- Connection type: Raw
Log to file
In PuTTY select Session > Logging. Enable All session output, and choose a file name:
Now perform some activity in the AlphaCom which will generate the required data (e.g. set up a call). Open the log file, and verify that there is data in the file.
The log file for MPC data trace would look something like this:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.21 15:28:47 =~=~=~=~=~=~=~=~=~=~=~= 74 2 1450708072 439 13 0200 F141 74 2 1450708072 440 13 02D1 F141 74 2 1450708072 730 13 02D0 F141 74 2 1450708074 341 13 02D2 F141 74 2 1450708074 482 13 0200 F102 74 2 1450708074 483 28 0503 F141 F102 0000 0000 74 2 1450708080 65 28 0504 F141 F102 0000 0000 74 2 1450708082 854 13 0206 F102 74 2 1450708082 856 13 0201 F102 74 2 1450708082 866 13 0206 F141 74 2 1450708082 867 13 0201 F141 74 2 1450708091 368 13 0200 F102 74 2 1450708091 369 13 0200 F140 74 1 1450708091 369 13 I F102 F140 74 2 1450708091 458 28 0504 F102 F140 0000 0000 74 1 1450708101 355 8 Q F140 74 2 1450708101 651 13 0206 F102 74 2 1450708101 652 13 0201 F102 74 2 1450708101 665 13 0206 F140 74 2 1450708101 666 13 0201 F140
Data Format Description
Example log string:
74 2 1450708091 458 28 0504 F102 F140 0000 0000
Parameter | Description |
---|---|
74 | Protocol number. 74 = MPC |
2 | Data From AMC (1 = read, 2 = write) |
1450708091 | Seconds since Epoch |
458 | Milliseconds |
28 | Number of bytes payload (one space after length not counted) |
0504 F102 F140 0000 0000 | Payload |