This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Autoquit


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NovaDenizen
Junior Member
Join Date: Jan 2010
Plugin ID:
2077
Plugin Version:
2010-11-14b
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Force-quits a server at an appropriate time to mitigate memory leak issues
    Unapprover:
    Reason for Unapproving:
    replicated existing plugins
    Old 11-14-2010 , 21:57   Autoquit
    Reply With Quote #1

    Description:
    We've been having problems with memory leaks in servers, so I created this plugin that automatically forces a server quit at an appropriate time. By default, the plugin will force a quit when it has been 2 hours since the last forced quit and the server is empty of players.

    Configuration:
    There are 4 configuration cvars and a public version cvar.

    sm_autoquit_restartinterval - This is the minimum amount of time that must elapse before the plugin will restart a server again. Default is 7200 seconds (2 hours)
    sm_autoquit_checkinterval - This determines how often the plugin should check if it should restart the server. Default is 600 seconds (10 minutes).
    sm_autoquit_maxplayers - The plugin will force a quit if there are this many or fewer players in the server. Setting to 3 means the server will restart if 3 or fewer players are present. Setting to 0 means the server must be empty. Default is 0.
    sm_autoquit_debug - Enables debug output to the sourcemod logs. Default is 0.
    sm_autoquit_version - public cvar

    Requirements
    I don't know the minimum version of Sourcemod required but there is nothing sophisticated in this plugin. So I'll just guess at:
    Sourcemod 1.2.1

    Installation
    Just put the .smx in the plugins directory.

    Two files are automatically created when the plugin first runs.

    The plugin uses AutoExecConfig() to create a "plugin.autoquit.cfg" file. On my tf server it is at tf/cfg/sourcemod/plugin.autoquit.cfg.

    The plugin keeps track of the last time it forced a restart with a key/value file stored at a path created by BuildPath at "data/autoquit.kv". On my tf2 server it is stored in tf/addons/sourcemod/data/autoquit.kv.


    Attached Files
    File Type: sp Get Plugin or Get Source (autoquit.sp - 452 views - 5.5 KB)

    Last edited by NovaDenizen; 11-14-2010 at 22:21. Reason: typo
    NovaDenizen is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:52.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode