Forum / General Discussions / List session details – idle time
- This topic has 7 replies, 4 voices, and was last updated 6 months, 1 week ago by Bilbotine.
-
AuthorPosts
-
April 11, 2024 at 19:44 #47702opoplawskiParticipant
Is it possible to list the idle time for a disconnected session?
nxserver --list
doesn’t give much details:
Display Username Remote IP Session ID NodeApril 19, 2024 at 09:33 #47861fishermanModeratorCan you check nxserver
--history
if it gives you the details you need.I extracted usage from the
nxserver --help
--history [--verbose] [ --file <file>] [<sessionid>|<username>|clear] [--client-type] [--client-version] [--client-platform] [--stats]
April 22, 2024 at 17:34 #47908opoplawskiParticipantIt doesn’t seem to:
/usr/NX/bin/nxserver --history E59DF9025B6873A04F627F5845A4E155 --verbose
Display Type Session ID Services Depth Screensize Status Session name Username Platform Users Date
The date seems to just be the date started, but it doesn’t seem to show the date/time of the last disconnect or an idle counter.
April 23, 2024 at 08:53 #47920BritgirlKeymasterThe history command shows the following statuses – connected, disconnected, finished, failed. The time that appears next to the status is when that session was started. Please define “idle time”. You can easily write a script to get the time running for disconnected sessions.
April 23, 2024 at 17:17 #47925opoplawskiParticipantI define idle time as the time since the user last disconnected from the session. For comparison (removed)
contains a field that is the time of the last disconnect (really I think the time of the last status changed – e.g. connected -> disconnected, disconnected -> connected). This allows us to terminate sessions that have been disconnected for a period of time. I’m not interested in the time from the start of the session.April 23, 2024 at 17:48 #47934BritgirlKeymasterThis allows us to terminate sessions that have been disconnected for a period of time.
You can do this with the key DisplayServerExtraOptions “-timeout s” in the node.cfg. (s = seconds)
I don’t know what product you are using but check the following resources:
Section 12 of the Workstation Install and Configuration Guide https://kb.nomachine.com/DT07T00262 (you will find the timeout key explained in all of the Terminal Server guides).
Check also here:
How to terminate NoMachine virtual desktops sessions automatically
https://kb.nomachine.com/AR08M00854April 26, 2024 at 19:18 #47973opoplawskiParticipantThank you for the links, we will likely use the DisconnectedSessionExpiry option for now. However, the nice thing about being able to query the idle time with [removed] is that it allows us to send an email to the user some time in advance (currently 24 hours I think) to warn them that the session will be terminated soon.
April 29, 2024 at 13:09 #47983BilbotineParticipantHi opoplawski,
the possibility to display more information in
--list
like when the user connected or disconnected will be available in the incoming new version 9. -
AuthorPosts
This topic was marked as solved, you can't post.