Jump to content
Maci79

How to see Headless client FPS?

Recommended Posts

I have 3 HC connected to my server. Is there a #monitor command to see the FPS of the connected HCs? Or from the console?

Share this post


Link to post
Share on other sites

This is what I used for a while, could probably be written better:

Spoiler

serverPerfHint = {
        params ["_type"];

        private _firstPart = format ["PERFORMANCE (%1): %2 players, %3 AI units,", _type, count allPlayers, count allUnits - count allPlayers];

        private _code = {
            params ["_unit", "_firstPart"];
            private _secondPart = format [' Server FPS: (%1/%2 Min/Avg)', diag_fpsMin, diag_fps];
            private _hintText = _firstPart + _secondPart;
            [_hintText] remoteExec ["hint", _unit];
        };

        if (_type == "server") then {
            [[player, _firstPart], _code] remoteExec ["spawn", 2];
        };
        if (_type == "headless cleint") then {
            if (isNil "HC1") then {
                hint "Headless client is not connected";
            } else {
                [[player, _firstPart], _code] remoteExec ["spawn", HC1];
            };
        };
    };
    
    //Call via:
    ['headless cleint'] spawn serverPerfHint;
    //Or
    ['server'] spawn serverPerfHint;

 

 

Share this post


Link to post
Share on other sites
1 hour ago, stanhope said:

This is what I used for a while, could probably be written better:

  Hide contents


serverPerfHint = {
        params ["_type"];

        private _firstPart = format ["PERFORMANCE (%1): %2 players, %3 AI units,", _type, count allPlayers, count allUnits - count allPlayers];

        private _code = {
            params ["_unit", "_firstPart"];
            private _secondPart = format [' Server FPS: (%1/%2 Min/Avg)', diag_fpsMin, diag_fps];
            private _hintText = _firstPart + _secondPart;
            [_hintText] remoteExec ["hint", _unit];
        };

        if (_type == "server") then {
            [[player, _firstPart], _code] remoteExec ["spawn", 2];
        };
        if (_type == "headless cleint") then {
            if (isNil "HC1") then {
                hint "Headless client is not connected";
            } else {
                [[player, _firstPart], _code] remoteExec ["spawn", HC1];
            };
        };
    };
    
    //Call via:
    ['headless cleint'] spawn serverPerfHint;
    //Or
    ['server'] spawn serverPerfHint;

 

 

Omg. Won't there be an easier way? Anyway thanks, as soon as I have time I'll try

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×