To make sure that we're on the same page I did the following :
I watched the time on my watch and as the second hand cross the zero mark I connected to a remote node.
I left my node connected for an extended time and periodically compared the "Conn Time" reported by Allmon3 (and AllScan) against the elapsed time on my watch.
I observed that the "Conn Time" was behind the actual elapsed time.
If the "Conn Time" is supposed to represent the time that your node has been been connected to another then I agree that the reported value is not correct. In my test, I started a connection at 09:03. Now, @ 11:17 (2 hours and 14 minutes later) the "Conn Time" is showing as "01:48:24". What happened to the other 28 minutes?
Hi there. I've been working with Matt somewhat on this issue with asterisk losing time on the connecttime statistics. Note that I am a programmer, but I am not very familiar with the allstar source code. That said, I was poking around and I came up with a theory. I thought I would share it here in case it might help. I realize that I may be off base, but figured I'd throw it out there.
In app_rpt.c, around line 5236, I see some code that appears to do the following...
The code computes a value for elap
Then, the code obtains the rpt mutex
After obtaining the report lock, there is a call to periodic_process_links(), which eventually adds elap to connecttime
If some other task/thread has the rpt mutex locked, then this thread will sleep until the mutex is available
If some other task/thread is hogging the mutex for a significant time, that time will elapse and will not be measured
Perhaps some recent code change in an area that also accesses the report lock is hogging the mutex?