Forum


Notice to all users

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

Results 1 to 6 of 6
  1. #1
    Join Date
    November 2013
    Posts
    9

    Querying for virtual server properties

    I understand how to use telnet and server query in general, but I can't find a method or class to query for a certain virtual server property. For example, I want to query for "VIRTUALSERVER_CLIENTSONLINE" specifically, is that possible?

  2. #2
    Join Date
    June 2011
    Location
    Baghdad, Iraq
    Posts
    367

  3. #3
    Join Date
    November 2013
    Posts
    9
    I have. I cannot see a single place to query for a specific non-editable property. If you have, it would be nice if you could share it.

  4. #4
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    There is no way to control output volume. You get all or nothing.

  5. #5
    Join Date
    June 2011
    Location
    Baghdad, Iraq
    Posts
    367
    afaik it is possible in the client query but not server query

    from client query docs:
    Code:
    Usage: servervariable properties
    
    Retrieves server variables from the client (no network usage). You can specify
    multiple properties that should be queried.
    
    Available properties are:
    virtualserver_name
    virtualserver_platform
    virtualserver_version
    virtualserver_created
    virtualserver_codec_encryption_mode
    virtualserver_default_server_group
    virtualserver_default_channel_group
    virtualserver_hostbanner_url
    virtualserver_hostbanner_gfx_url
    virtualserver_hostbanner_gfx_interval
    virtualserver_priority_speaker_dimm_modificator
    virtualserver_id
    virtualserver_hostbutton_tooltip
    virtualserver_hostbutton_url
    virtualserver_hostbutton_gfx_url
    virtualserver_name_phonetic
    virtualserver_icon_id
    virtualserver_ip
    virtualserver_ask_for_privilegekey
    virtualserver_hostbanner_mode
    
    These properties are available, but need to be requested. Currently
    you cannot request these variables via clientquery:
    virtualserver_clientsonline
    virtualserver_channelsonline
    virtualserver_uptime
    virtualserver_flag_password
    virtualserver_default_channel_admin_group
    virtualserver_max_download_total_bandwidth
    virtualserver_max_upload_total_bandwidth
    virtualserver_complain_autoban_count
    virtualserver_complain_autoban_time
    virtualserver_complain_remove_time
    virtualserver_min_clients_in_channel_before_forced_silence
    virtualserver_antiflood_points_tick_reduce
    virtualserver_antiflood_points_needed_warning
    virtualserver_antiflood_points_needed_kick
    virtualserver_antiflood_points_needed_ban
    virtualserver_antiflood_ban_time
    virtualserver_client_connections
    virtualserver_query_client_connections
    virtualserver_queryclientsonline
    virtualserver_download_quota
    virtualserver_upload_quota
    virtualserver_month_bytes_downloaded
    virtualserver_month_bytes_uploaded
    virtualserver_total_bytes_downloaded
    virtualserver_total_bytes_uploaded
    virtualserver_port
    virtualserver_autostart
    virtualserver_machine_id
    virtualserver_needed_identity_security_level
    virtualserver_log_client
    virtualserver_log_query
    virtualserver_log_channel
    virtualserver_log_permissions
    virtualserver_log_server
    virtualserver_log_filetransfer
    virtualserver_min_client_version
    virtualserver_reserved_slots
    virtualserver_total_packetloss_speech
    virtualserver_total_packetloss_keepalive
    virtualserver_total_packetloss_control
    virtualserver_total_packetloss_total
    virtualserver_total_ping
    virtualserver_weblist_enabled
    
    
    Example:
       servervariable virtualserver_name virtualserver_platform
       virtualserver_name=TS\s\s\s\s\s3.0. virtualserver_platform=Linux
       error id=0 msg=ok

  6. #6
    Join Date
    November 2013
    Posts
    9
    I have written a python script for any of those curious about querying for the number of current clients online.
    Code:
    import getpass
    import getpass
    import sys
    import telnetlib
    
    HOST = "192.168.1.51"
    PORT = "10011"
    user = "serveradmin"
    password = "PUT PASSWORD HERE"
    
    tn = telnetlib.Telnet(HOST, PORT)
    
    tn.read_until("command.")
    tn.write("login " + user + " " + password + "\n")
    
    tn.write("use sid=1\n")
    tn.write("serverinfo\n")
    tn.write("quit\n")
    
    telnetRaw = tn.read_until("virtualserver_channelsonline")
    tn.close()
    
    stringToFind="virtualserver_clientsonline="
    stringIndex = telnetRaw.rfind(stringToFind)
    numClientsIndex = stringIndex+len(stringToFind)
    
    toReturn = telnetRaw[numClientsIndex:numClientsIndex+1]
    print toReturn

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Rejected] Hide Server properties message
    By Toine in forum Suggestions and Feedback
    Replies: 6
    Last Post: May 19th, 2014, 10:16 AM
  2. Querying my server remotely....
    By Skillz in forum Linux / FreeBSD
    Replies: 1
    Last Post: October 2nd, 2012, 09:02 PM
  3. [Resolved] Server properties file? (how to properly make one?)
    By TylerTsero in forum Windows
    Replies: 8
    Last Post: August 22nd, 2012, 11:24 PM
  4. Server Querying from a web browser.
    By Wullbuy in forum Permission System
    Replies: 2
    Last Post: February 8th, 2012, 05:53 PM
  5. MySQL Loses Virtual Server Properties
    By gmt2001 in forum Bug Reports [EN/DE]
    Replies: 1
    Last Post: October 18th, 2011, 08:27 AM

Posting Permissions

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