Forum / Remote Desktop Manager - Support

Old Session States

  • Create an Issue
  • Cancel

I constantly run into the issue where RDM stores phantom sessions that haven't been used in days (see attached screenshots). Typically this occurs when the application crashes with open session states, which is very common when using the IE browser control sync it runs on the main application thread and gets hung up every now and then, affecting the entire application. Or due to other such system screens, such as BSOD (happened yesterday, unrelated to RDM). Regardless, crashes like these happen, they are not all preventable, however I think RDM could do a better job of handling obviously old session states. I know that from this 'Opened Sessions' tab that I can manually specify that a session is closed, however this happens frequently enough that this is becoming frustrating. We never really know to trust the 'Session is Already Opened' dialog if we keep seeing these false positives.

Since we host on our own DB, is there a query I can run to check what sessions are still open? And also is there a data column that tracks something like "last action/click/event" time. Therefore I could just create a stored procedure that runs infrequently to check and then close any sessions that are obviously outdated? Or perhaps is there something already built into RDM to handle this?

HB

Annotation 2019-01-04 085111.jpg
Annotation 2019-01-04 085527.jpg
Clock10 mths

You can try something like this:

UPDATE dbo.ConnectionLog
SET
ManualEndDateTime = GETDATE()
WHERE SupportClose = 1
AND ManualEndDateTime IS NULL
AND EndDateTime IS NULL
AND EndDateTimeUTC IS NULL
AND DATEDIFF(hh, StartDateTime, GETDATE()) > 12;

This will manually close (the log) any opened session log that supports "close" 12 hours after the session was opened.

Note, sessions older than 7 days get ignored and are not displayed in "Open sessions"

Adjust as needed.

Best regards,

Stefane Lavergne

signaturesignature

Clock10 mths

Awesome. That works for the 'Opened Sessions' tab, however the little 'activity' play button on the connection name in the tree is still shown. How can I get rid of that?

HB

Annotation 2019-01-07 165404.jpg
Clock10 mths

NVM, figured it out, need to set the 'EndDateTime' field as well:


UPDATE dbo.ConnectionLog
SET
ManualEndDateTime = GETDATE(),
EndDateTime = GETDATE()
WHERE SupportClose = 1
AND ManualEndDateTime IS NULL
AND EndDateTime IS NULL
AND EndDateTimeUTC IS NULL
AND DATEDIFF(hh, StartDateTime, GETDATE()) > 8


HB

Clock10 mths

BTW, how is the 'ActiveTime' field calculated?

Clock10 mths

Via the UI, if the tab is the current top-most tab, then the ticks (milliseconds) count.

Stefane Lavergne

signaturesignature

Clock10 mths

So I'd imagine that the program tracks it in it's data structures and only post it to the DB once the connections close event has been called. Is that correct? Or is there any sort of real-time activity usage that is tracked in the DB?

HB

Clock10 mths

Correct only tracked in the application until saved on close.

Stefane Lavergne

signaturesignature

Clock10 mths

Ok cool. Thanks for answering my questions and providing those snippets of code.

Although I'd like to merge this post into a feature request (if it can be managed without too much overhead to the application) to track activity of a connection in a somewhat real-time manner. Maybe on every event of switching to another active tab, log to the DB the previously active tabs current amount of active time. Maybe add some de-bounce logic so that it only does it in certain amounts of intervals, in cases of rapidly switching between active tabs (I.E. enforce a max time between logs of every 30 seconds).

Just an idea. I could see that this would probably produce more accurate activity numbers especially since our connections seem to hang frequently as I described in this original post. Reporting could also benefit from this.

HB

Clock10 mths

I was thinking the exact same thing. We will add it to our todo list.

We could also set a 'last tick date/time' so that we can automatically detect "dead/hanging" sessions.

Best regards,

Stefane Lavergne

signaturesignature

Clock10 mths

Boom sounds like a good idea!

In relation to this post as well, I'd like to add another feature request to add to the Navigation window, on the Vault/entries page, a choose-able column to list the current activity info of an OPEN connection (and maybe LAST activity info too, however I wouldn't care about seeing it in the Vault). Info such as Opened Duration and connected user info (Database User, Connection User, and Username). I find my self constantly looking up the logs of that connection when I see that blue activity play button so that I can see which user is logged in and for how long.

And while I'm discussing the tabled logs of a connection that is displayed, add a feature to be able to re-organize those columns, or tell me how if it's already possible (i've tried)! Quite annoying to constantly have to scroll over to see the user information (on 1080p screen at least).

HB

Clock10 mths

Hmmm now that I think about it, I think I'd prefer to see the OPEN activity info as a tooltip when hoovering over that play button. Currently if you hoover of the connection name, you'll see the 'Description' field of that connection, which is perfectly fine. However I noticed that same tooltip is NOT shown when hoovering over the play button icon (aka connection/entry type icon). The would be a perfect opportunity to implement a tooltip when hoovering over that icon to list current activity info, either the current OPEN activity, LAST activity, or NONE if nothing exists for a new connection. And in cases of multiple RDM users logged into the same connection, show the top three activities (idk which way would be better to sort atm), and then a line indicating somewhere the number of currently OPEN active connections.

Personally, I use the navigation bar as a side bar so that I can always see it and interact with it. So it is necessary that I have as little, and yet meaningful, information there as possible (so connection name and status). Although I'd appreciate adding the additional activity status info columns (and other users might too) the tooltip seems like a more concise option for my use case.

But I'll take either or at this point, whatever will keep me from having to navigate away from my currently open connection just to view the logs of another connection.

HB

Clock10 mths

Posting a follow-up for those who come across this thread. Not sure if this is new or if I just hadn't noticed it before, BUT there is a little hover over 'play' button inside the connection dashboard that DOES show a quick tooltip of activity info (see screenshot). While this still involves clicking on the connection and navigating to the dashboard, I don't have to go the extra step of looking through the log table, so a slightly quicker approach. However since this data is already present, I'd image that it would be relatively easy for an RDM dev to dual bind that content to the picture entry icon shown in the navigation pane, as I described above.

Please add that last part as a feature request.

HB

Annotation 2019-03-25 135217.jpg
Clock7 mths

This should not be hard to add.

Regards

David Hervieux

signaturesignature

Clock7 mths

Thanks for chiming in David smile

Clock7 mths



So, is the 'ActiveTime' field stored in milliseconds?


Thanks.

Clock6 mths

Active time is in second

David Hervieux

signaturesignature

Clock6 mths

Hi All,

Noticed that with some of the recent updates some of the above request have been addressed, which is awesome and much appreciated! It is extremely useful to see at a glance which users are connected to a session when a play button is present. I also noticed that when hovering over the connection tabs (at the top) we are now seeing each connections current activity time (at least I don't remember seeing that before). This is beautiful, however I wanted to check to see if there has been any work on logging this field to the DB in a more frequent manner than on the "connection closed" event, such as "switching tabs". The idea here is to get a more realistic Activity Time that can then be used to report on other users. Ideally I'd want as near-real-time as we can get activity time appended to the previously mentioned tooltip.

Thanks for all the hard work that y'all do!

HB

Clock5 mths

Hello
I will check what we can do for that. My main concern is to make sure that we don't slow down the database or the server.
Perhaps, we could report the activity logs at a fix interval.

Regards

David Hervieux

signaturesignature

Clock6 mths

A configurable interval would be best. By default have it off OR very spaced out for companies who aren't needing it. Having it up-to-date within 1 to 5 minutes seems acceptable for starters.

HB

Clock6 mths

Any traction on this?

HB

Clock10 days

Hello,
This is more complicated then what it seems but it's still on our backlog. I can't give you a time frame. It's not the kind of task that we can do easily since it's had a huge impact on all our applications (Windows, Macos and mobile).

Regards

David Hervieux

signaturesignature

Clock9 days