List session details – idle time

Forum / General Discussions / List session details – idle time

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #47702

    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  Node


    Can you check nxserver --history if it gives you the details you need.

    I extracted usage from the nxserver --help

      [ --file <file>]
      [--client-type] [--client-version] [--client-platform]

    It 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.


    The 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.


    I 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.


    This 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 (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


    Thank 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.


    Hi opoplawski,

    The upcoming version 9 will offer the possibility to display information such as when a user connected or disconnected.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.