Ever wish you could query a server for TPS?

Discussion in 'Spigot Discussion' started by jeff142, May 8, 2013.

  1. jeff142

    Benefactor

    Something I've been wanting to do for a long time is have a way to remotely see servers TPS, ram and entity counts anyone know of a plugin that can do this?
     
  2. CustomForms

    CustomForms Retired Moderator
    Retired Supporter

    Create a plugin to get TPS, send it to a database, then have a website script read that script and disay the TPS. If you really don't want to use a database, send the information to a text file and have the script read from the text file.
     
  3. Yea, that would be the intelligent way to do it... (but I don't know Java...)

    Instead, I chose the scenic route.

    I use RCON for controlling my server through a bash script (I didn't like stuffing into the screen session) so I run the gc command from Essentials, grep it for "TPS" and only take the last 4 characters or so XX.X. If the RCON fails the script exits with an error code (if the server is down or the command times out (eg. during a lag spike).

    Could do the same with entity counts.... So that is a 'bodge' way of doing it.