View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 06-22-2021 , 15:13   Re: [CRASH] SM 1.11.0.6634 Linux Profiler VPROF segfaults
#10

canadianjeff, well, you have lags randomly, but you still unsure who or what caused it?

If that's a hardware issue:

1) you must have some control panel to be able to check:
- CPU loading
- memory loading
- network channel (not always)
If on VPS, you have much more options, at least try ping some public service

2) enter net_graph 4 in console, you can estimate CPU / network loading per entity types.

3) try to change the map to exclude entities overflow issue.

4) Check handles leaking. Instruction is in Section 11.

5) Try command sm plugins unload_all - (may crash your server) - it will forcibly unload all your plugins.

6) Check addons/sourcemod/logs for error*.log

If that's human-related:

1) There is a function:

Quote:
float GetGameFrameTime()
Returns the time the Game took processing the last frame.
You could check it by some repeatable timer against some pre-defined constant and catch the moment, when the server begins to lag to start logging who is on the server at the moment for giving a ban.

2) As asherkin said, that could be commands spamming.

I'm sure somewhere should be a solution for this. But, if not, I think you could intercept messages and force a minimum delay between commands, something like:
PHP Code:
#include <sourcemod>

float g_fPressTime[MAXPLAYERS+1];

public 
Action OnClientCommand(int clientint args)
{
    if( 
GetEngineTime() - g_fPressTime[client] > 0.5 )
    {
        
g_fPressTime[client] = GetEngineTime();
        return 
Plugin_Continue;
    }
    return 
Plugin_Handled;

This may cause some problems, so better to prepare the whitelist of commands, and block only those unrecognized.

Also, check console.log for some unusual (too repeatable) commands from players.

3) Change rcon password if that's too short/simple.

4) Install all know fixes against bad performance / exploits known which published in this topic: [TUT] SourcePawn Scripting - Tips, Basics to Advanced (Section 6. Server Fixes).

Good luck!
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 06-22-2021 at 15:23.
Dragokas is offline