Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 4 of 4
  1. #1
    Join Date
    April 2016

    How to view connection time in log-files.

    I host a ts3-server on a Ubuntu 14.04 server. (I am the admin)

    Now i want to display the total amount of time that the users on the server have spent on it.

    Has anyone an idea how i could do that?

  2. #2
    Join Date
    June 2008
    The server does not log how long a user was connected.
    It only knows the current time for one session and this will not be stored anywhere.

    But the server can log, when a user connects and disconnects.
    You just need to calculate the time between connect and disconnect.

    Put a bot on your server which does the job the same job.

    Do not spy how long users are online :/
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  3. #3
    Join Date
    April 2016

    Thanks for the quick answer. I know that i just have to calculate the time between the connects and disconnects. But my actual question is how to do this in a big log-file (not manually). Sorry if i haven't express myself correctly in the main post.

    Maybe it is possible with the grep command? I am using Linux since one year, but i haven't done anything with grep so i am new to it.

  4. #4
    Join Date
    February 2012
    With grep alone you cannot do this. You have to implement some more sophisticated with some kind of scripting language that is capable of storing intermediate data in arrays.
    Your script will scan the log file for 2 different kinds of entries: the line that designates the start of the session, and the line that designates its end. Whenever you encounter a session start, you store the start time and the user id in an array. Whenever you encounter a session end, you look up the user id in your array and compute the difference between the start time and the end time. This is the amount of time this user id was online. You can store this information in a second array to sum up all sessions from this id, or even sum up all sessions from all users.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Master File Browser/View All Channel's Files?
    By Roachy in forum General Questions
    Replies: 3
    Last Post: May 14th, 2012, 10:06 AM
  2. Replies: 3
    Last Post: July 28th, 2010, 02:35 PM
  3. View the last joined time of a channel
    By Slater in forum General Questions
    Replies: 1
    Last Post: February 21st, 2010, 04:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts