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

Monitor server performance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
switz213
Junior Member
Join Date: Jun 2015
Old 04-14-2016 , 01:15   Monitor server performance
Reply With Quote #1

Is there any way to check a server's sv values and other things that appear on net_graph?
switz213 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 04-14-2016 , 02:19   Re: Monitor server performance
Reply With Quote #2

Does status in the server console have this info?
__________________
Neuro Toxin is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-14-2016 , 02:41   Re: Monitor server performance
Reply With Quote #3

stats
__________________
Do not Private Message @me
Bacardi is offline
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 04-14-2016 , 05:23   Re: Monitor server performance
Reply With Quote #4

Logging would be pretty easy using something like this: https://github.com/koraktor/steam-condenser-ruby and the mentioned stats command. Creating a graph is trivial if you have that know how.
CookieB is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-14-2016 , 17:45   Re: Monitor server performance
Reply With Quote #5

PHP Code:
#include <regex>

new Handle:myarray[2];

public 
OnPluginStart()
{
    
myarray[0] = CreateArray(ByteCountToCells(30));
    
myarray[1] = CreateArray(ByteCountToCells(30));

    
RegConsoleCmd("sm_test"test);
}

public 
Action:test(clientargs)
{
    
RequestFrame(frame);
    return 
Plugin_Handled;
}

public 
frame(any:data)
{
    
ClearArray(myarray[0]);
    
ClearArray(myarray[1]);

    new 
String:buffer[600];
    
ServerCommandEx(buffersizeof(buffer), "stats");

    new 
String:tmp[250];
    new 
index 0;
    new 
RegexError:regexerror;
    new 
Regex:regex CompileRegex("\\S+"PCRE_CASELESStmpsizeof(tmp), regexerror);

    while( 
MatchRegex(regexbuffer[index], regexerror) != -)
    {
        if(!
GetRegexSubString(regex0tmpsizeof(tmp)) || StrContains(buffer[index], tmpfalse) == -1) break;

        !
IsCharNumeric(tmp[0]) ? PushArrayString(myarray[0], tmp):PushArrayCell(myarray[1], StringToFloat(tmp));

        
index += StrContains(buffer[index], tmpfalse) + strlen(tmp);

        if(
index >= sizeof(buffer)) break;
    }


    new 
String:buffer1[30];
    new 
Float:value;

    for(new 
0GetArraySize(myarray[0]); i++)
    {
        
GetArrayString(myarray[0], ibuffer1sizeof(buffer1));
    
        
value GetArrayCell(myarray[1], i);
        
PrintToServer("%s = %.2f\n"buffer1value);
    }

__________________
Do not Private Message @me

Last edited by Bacardi; 04-14-2016 at 18:43.
Bacardi 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 11:34.


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