Raised This Month: $51 Target: $400
 12% 

Delay or disable server hibernate


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Plugin ID:
7559
Plugin Version:
13.3.2021
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Prevent server go to hibernate mode or delayed it
    Old 03-13-2021 , 13:14   Delay or disable server hibernate
    Reply With Quote #1

    Delay or disable server hibernate
    - Prevent server go to hibernate mode or delayed it.

    - When last human player disconnect from server, server goes immediately into hibernate mode,
    kicking all bots from server and map start over again.
    example


    This plugin will either delayed this action or disable it.

    sm_hibernate_when_empty -1 // This disable hibernate mode
    sm_hibernate_when_empty 60 // Server goes in hibernate mode in 60 seconds, Default value.
    // Value 0 and any another negative value than -1, plugin doesn't do anything.



    For Games:
    Counter-Strike:Source, Team Fortress 2, (Day Of Defeat: Source ?)

    Rant:
    Counter-Strike: Global Offensive have already cvars for hibernate mode
    sv_hibernate_postgame_delay 5
    sv_hibernate_when_empty 1



    If you experience server crash, please uninstall this plugin and try again, does crash stop.


    Gamedata file for L4D(2) games, use your own risk. #6
    Attached Files
    File Type: zip delayhibernate.zip (6.6 KB, 426 views)

    Last edited by Bacardi; 04-11-2022 at 15:04. Reason: Forgot @ from linux sig
    Bacardi is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 03-13-2021 , 16:31   Re: Delay or disable server hibernate
    Reply With Quote #2

    micro update.
    I forgot to add @ in linux signature.
    Bacardi is offline
    Xada
    Junior Member
    Join Date: May 2017
    Old 03-14-2021 , 14:34   Re: Delay or disable server hibernate
    Reply With Quote #3

    This plugin sounds like it'd be very useful for L4D2 what with the game's inherent forced Lobby functionality.
    Unfortunately as of current it errors on loading the plugin for some reason, thus it's functionality is not inherited.

    Code:
    L 03/14/2021 - 11:22:24: [SM] Exception reported: Failed to DHookCreateFromConf - 'DHook_SetHibernating' 
    L 03/14/2021 - 11:22:24: [SM] Blaming: delayhibernate.smx
    L 03/14/2021 - 11:22:24: [SM] Call stack trace:
    L 03/14/2021 - 11:22:24: [SM]   [0] SetFailState
    L 03/14/2021 - 11:22:24: [SM]   [1] Line 33, delayhibernate.sp::OnPluginStart
    L 03/14/2021 - 11:22:24: [SM] Unable to load plugin "delayhibernate.smx": Error detected in plugin startup (see error logs)
    Xada is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 03-14-2021 , 14:46   Re: Delay or disable server hibernate
    Reply With Quote #4

    L4D2
    There are hidden cvars. Use sm_cvar
    Code:
    "sv_hibernate_when_empty" = "1"
    FCVAR_DEVELOPMENTONLY 
    - Puts the server into extremely low CPU usage mode when no clients connected
    
    "sv_hibernate_postgame_delay" = "5"
    FCVAR_DEVELOPMENTONLY 
    - # of seconds to wait after final client leaves before hibernating.
    
    "sv_hibernate_ms" = "20"
    FCVAR_DEVELOPMENTONLY 
    - # of milliseconds to sleep per frame while hibernating
    __________________
    Do not Private Message @me
    Bacardi is offline
    3ipKa
    Member
    Join Date: Jul 2013
    Old 04-08-2022 , 10:52   Re: Delay or disable server hibernate
    Reply With Quote #5

    Quote:
    Originally Posted by Bacardi View Post
    L4D2
    There are hidden cvars. Use sm_cvar
    Code:
    "sv_hibernate_postgame_delay" = "5"
    FCVAR_DEVELOPMENTONLY 
    - # of seconds to wait after final client leaves before hibernating.
    It seems this cvar do nothing, at least in L4D2... Tried it in different ways. Or am I doing somthing wrong?
    3ipKa is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 04-11-2022 , 15:03   Re: Delay or disable server hibernate
    Reply With Quote #6

    L4D
    L4D2

    Gamedata signatures added in this file.
    - Windows
    - Linux


    I have quick test Windows versions only, Linux not tested.
    - You properly gonna get wierd bugs and glitch when server not hibernate after last player disconnect.
    - Both games restart map, when last human player disconnect.
    There maybe cvar for bots, to not leave from server and avoid this problem, if I remember right.
    - In L4D, gonna glitch player when join server, after last player disconnected and hibernate did not happened.
    Toggling player console on/off can help you get out glitch.
    - L4D2 works somehow better.
    Attached Files
    File Type: txt SetHibernating.games.txt (2.4 KB, 187 views)
    __________________
    Do not Private Message @me
    Bacardi is offline
    3ipKa
    Member
    Join Date: Jul 2013
    Old 04-13-2022 , 05:34   Re: Delay or disable server hibernate
    Reply With Quote #7

    In fact of the matter is that server hibernates after last player has left. Problem is that postgame_delay cvar doesn't delay it. Player has left server, server goes sleep, or return to first map and goes sleep- thats alright. Whatever value i set, there is no delay to hibirnation. I need to change map on empty server, have looked at some plugins, thay are all based on timers, but timers stop while hibirnation, ironic almost evrywhere people complain about "its not work with hibirnation..." and so on. I found this thread and this cvar. Have tried on clean server and no avail.
    I either have to do it with sv_hibernate_when_empty 0 and set it by plugin to 1 after it chanfge map, or use your plugin to dealy hibernation (not tested yet)

    Last edited by 3ipKa; 04-13-2022 at 05:37.
    3ipKa is offline
    SGCatlantis
    Member
    Join Date: Oct 2012
    Location: France
    Old 11-08-2022 , 16:35   Re: Delay or disable server hibernate
    Reply With Quote #8

    Hi
    I have tis error to l4d2 server windows

    PHP Code:
    22:24:20: [SMException reportedFailed to DHookCreateFromConf 'DHook_SetHibernating' 
    L 11/08/2022 22:24:20: [SMBlamingdelayhibernate.smx
    L 11
    /08/2022 22:24:20: [SMCall stack trace:
    L 11/08/2022 22:24:20: [SM]   [0SetFailState
    L 11
    /08/2022 22:24:20: [SM]   [1Line 33delayhibernate.sp::OnPluginStart
    L 11
    /08/2022 22:24:20: [SMUnable to load plugin "delayhibernate.smx"Error detected in plugin startup (see error logs
    SGCatlantis is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 11-08-2022 , 17:53   Re: Delay or disable server hibernate
    Reply With Quote #9

    ok, the one from post #6 ?
    __________________
    Do not Private Message @me
    Bacardi is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 11-09-2022 , 08:42   Re: Delay or disable server hibernate
    Reply With Quote #10

    Bacardi, cool nice work.

    Quote:
    Originally Posted by 3ipKa View Post
    I need to change map on empty server, have looked at some plugins, thay are all based on timers, but timers stop while hibirnation, ironic
    If only you didn't disable hibernation before starting the timer, which I tried to did in [ANY] Restart Empty Server (or Map). At least, it worked at the moment of writing/updates.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas 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 07:33.


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