| 1 | [[PageOutline(2-4)]] |
| 2 | == Monitoring extension == |
| 3 | |
| 4 | The {{{dbg_monitor.fdx}}} extension provides a mean to access internal information of the {{{freeDiameter}}} daemon, until SNMP support is implemented (see #2). |
| 5 | |
| 6 | The information is provided in two ways: |
| 7 | * A periodical report is displayed in the daemon's log. This report contains: |
| 8 | * Internal queues status (number of incoming, outgoing, and local messages in buffers) |
| 9 | * Local servers status (open listening sockets) |
| 10 | * Peers information (status of the connections, remote identities, ...) |
| 11 | |
| 12 | * An additional report can be generated on-demand, by sending a signal to the application. This additional report contains: |
| 13 | * Dictionary dump: all objects of the dictionary are displayed. |
| 14 | * Configuration dump: the running configuration of the daemon. |
| 15 | * Extensions dump: the list of loaded extensions. |
| 16 | |
| 17 | The signal that trigs this detailed report is MONITOR_SIGNAL, by default {{{SIGUSR2}}}. It can be changed at compilation time. See [source:freeDiameter/extensions/dbg_monitor/dbg_monitor.c] for more information. |
| 18 | |
| 19 | === Configuration === |
| 20 | |
| 21 | The {{{dbg_monitor.fdx}}} extension does not take any configuration. |
| 22 | |
| 23 | === Usage === |
| 24 | |
| 25 | The extension's behavior is influenced by the {{{CMAKE_BUILD_TYPE}}} parameter. When this parameter is set to "Debug", the {{{dbg_monitor.fdx}}} extension displays its periodical status every '''30 seconds'''. In addition, it displays a timer value every seconds. This is helpful to follow log activity for periods of activity and periods of calm. |
| 26 | |
| 27 | If the {{{CMAKE_BUILD_TYPE}}} is not "Debug", the extension displays its status information '''once every hour''', and no intermediary counter is shown. |
| 28 | |
| 29 | === Output === |
| 30 | |
| 31 | {{{ |
| 32 | [dbg_monitor] 0h 0m28s |
| 33 | }}} |
| 34 | In DEBUG mode (see previous paragraph), the extension displays a timer like this every seconds. This is useful to have visual feedback on the periods of activity in the logs. |
| 35 | |
| 36 | {{{ |
| 37 | [dbg_monitor] Dumping current information |
| 38 | }}} |
| 39 | This line indicates the beginning of the periodical report. |
| 40 | |
| 41 | {{{ |
| 42 | Dumping queue 'Incoming messages' (0x919e450): |
| 43 | 0 elements in queue / 1 threads waiting |
| 44 | thresholds: 0 / 0 (h:0), cb: (nil),(nil) ((nil)), highest: 0 |
| 45 | Dumping queue 'Outgoing messages' (0x919e4d0): |
| 46 | 0 elements in queue / 1 threads waiting |
| 47 | thresholds: 0 / 0 (h:0), cb: (nil),(nil) ((nil)), highest: 0 |
| 48 | Dumping queue 'Local messages' (0x919e550): |
| 49 | 0 elements in queue / 4 threads waiting |
| 50 | thresholds: 0 / 0 (h:0), cb: (nil),(nil) ((nil)), highest: 0 |
| 51 | }}} |
| 52 | |
| 53 | This is the status of the queues in the daemon. The most useful information is the number of elements in each queue. If this number grows regularly, it shows that the daemon is not able to consume the messages quickly enough -- in such case, solutions might be easy to implement, such as increasing the number of consumer threads. |
| 54 | |
| 55 | {{{ |
| 56 | Dumping servers list : |
| 57 | Serv 0x91a38a8 'SCTP srv :3868 (4)': SCTP, NotSecur, Thread running |
| 58 | Serv 0x91a3a40 'SCTP srv :3869 (6)': SCTP, Secur, Thread running |
| 59 | Serv 0x91a3bd8 'TCP srv [0.0.0.0]:3868 (8)': TCP, NotSecur, Thread running |
| 60 | Serv 0x91a3d90 'TCP srv [0.0.0.0]:3869 (10)': TCP, Secur, Thread running |
| 61 | Serv 0x91a3f48 'TCP srv [::]:3868 (12)': TCP, NotSecur, Thread running |
| 62 | Serv 0x91a4100 'TCP srv [::]:3869 (14)': TCP, Secur, Thread running |
| 63 | }}} |
| 64 | This is the list of server threads accepting new connections. The most important information here is the "Thread running" status which should be checked. |
| 65 | |
| 66 | {{{ |
| 67 | Dumping list of peers : |
| 68 | > STATE_OPEN cli.testbed.aaa (rlm:testbed.aaa) ['freeDiameter' 10000] |
| 69 | }}} |
| 70 | This shows the list of connected peers, with their identities, realms, and software name and versions. |