[Home]

Summary:ASTERISK-25405: [patch] CLI: core show fd: add timestamp
Reporter:Alexander Traud (traud)Labels:
Date Opened:2015-09-19 12:53:19Date Closed:2015-09-21 08:46:03
Priority:MinorRegression?
Status:Closed/CompleteComponents:Features
Versions:Feature Tracker Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast_file_descriptor_time.patch
( 1) ast_file_descriptor_time.patch
Description:Thanks to "core show fd" on the command-line interface (CLI) of Asterisk, you are able to track open file descriptors:

{noformat}
./configure
make menuselect.makeopts
./menuselect/menuselect --enable DEBUG_FD_LEAKS
make --jobs
sudo make install
{noformat}

This helped me to find leaked UDP/TCP ports. However, when you debug a long-lived server with Wireshark in parallel, you need the time when the port (file descriptor) was opened. Therefore, I propose this as a feature request. The attached patch adds this feature.

Additionally, it fixes a formatting issue when very long source-code file-names are involved (15->22) because "channel_internal_api.c" was the longest seen. Finally, it changes "getrlimit" to return not the maximum size of a single file ({{RLIMIT_FSIZE}}) but the maximum amount of files which can be created by Asterisk ({{RLIMIT_NOFILE}}). For example in Debian/Ubuntu, I got "unlimited" with the previous code, although I expect the default "1024" file handles.
Comments: