Summary:ASTERISK-30143: manager: Read and Write output from "manager show connected" is not well documented/useful
Reporter:N A (InterLinked)Labels:
Date Opened:2022-07-18 19:00:33Date Closed:2022-07-21 13:37:52
Versions:18.9.0 18.12.0 Frequency of
Environment:Debian 10, Debian 11Attachments:
Description:Something weird that I've been noticing for a while,  that I just looked a little bit more closely at.

If you run manager show connected, you get something like this:

pbxdev*CLI> manager show connected
 Username         IP Address                                               Start       Elapsed     FileDes   HttpCnt   Read   Write
 test                                                   1658188400  128         59        0         2147483647  2147483647

The Read and Write values are always 2147483647. (This is -1, but this is the unsigned version of that.) These are initialized to -1 in the code I believe, but can be set to other things.

I'm not 100% sure what's supposed to be printed out in these columns, but I don't think it's that. I could've sworn it was packets sent and received at some point, I seem to recall, but I seem to always get these values, before and after a reload.
Comments:By: Asterisk Team (asteriskteam) 2022-07-18 19:00:34.346-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2022-07-19 04:17:25.553-0500

It's read and write permissions.

By: George Joseph (gjoseph) 2022-07-19 05:46:01.245-0500

Just to be clear,  read/write is a bitmask of the user's permissions.  In this case, it's all ones (all permissions) which is -1 or 2147483647.
I too thought it was packets or bytes.

By: N A (InterLinked) 2022-07-19 06:07:10.135-0500

Shouldn't we be showing the individual permissions then, in that case? I don't see how printing out a bit mask could be interpreted by anyone.
perhaps a separate line for each permission, maybe:

CDR: Read
System: No
CEL: Read and Write

or something like that?

I don't think a single column can possibly display anything meaningful.

By: Joshua C. Colp (jcolp) 2022-07-19 06:10:58.700-0500

Could it be improved? Yes. It's more of a developer CLI command as currently written.