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

SM Data Rates


Post New Thread Reply   
 
Thread Tools Display Modes
Lolwutman
Member
Join Date: Jul 2012
Old 10-10-2016 , 16:14   Re: SM Data Rates
Reply With Quote #11

Thanks for making this.

I did not exactly tried it out yet, but I already got some suggestions;
It's possible to make a shortened version of all these sm_ commands? Perhaps "!dr" and "sm_dr", like "!drhelp".
Lolwutman is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 10-10-2016 , 16:27   Re: SM Data Rates
Reply With Quote #12

Quote:
Originally Posted by Lolwutman View Post
Thanks for making this.

I did not exactly tried it out yet, but I already got some suggestions;
It's possible to make a shortened version of all these sm_ commands? Perhaps "!dr" and "sm_dr", like "!drhelp".
Replaced all sm_datarate* with sm_dr

untested
Attached Files
File Type: sp Get Plugin or Get Source (smdatarates.sp - 263 views - 7.4 KB)
__________________

Last edited by sneaK; 10-10-2016 at 16:31.
sneaK is offline
coolzie
Member
Join Date: Jul 2012
Old 03-10-2018 , 01:19   Re: SM Data Rates
Reply With Quote #13

If any developer is willing to update this plugin, I'll happily pay you for your time and work.

Request:
  1. Add Loss and Choke information for all players.
  2. Give option to constantly refresh information from all players or a specific player.
  3. Remove character limitation from !serverdatarates, see: https://imgur.com/a/ucqwu
  4. Give option to restrict use to admins.



(I was told putting my request here would be better than in the separate thread I had made.)
coolzie is offline
coolzie
Member
Join Date: Jul 2012
Old 03-15-2018 , 14:18   Re: SM Data Rates
Reply With Quote #14

Alright no one took on my request, so I figured it out myself without coding knowledge. Added Choke and Loss information.

PHP Code:
public Action sm_datarates(int clientint args)
{
    if(
client == 0) return Plugin_Handled;

    
PrintToConsole(client"\n\n");

    
char buffer[1024];
    
Format(buffersizeof(buffer), "%20s %10s %6s %6s %10s %10s %13s %13s %6s %6s""  name""  rate""update""cmd""in: KB/s""out: KB/s""in: ping ms""out: ping ms""choke""loss");
    
PrintToConsole(clientbuffer);

    for(
int i 1<= MaxClientsi++)
    {
        if(!
IsClientInGame(i) || IsFakeClient(i)) continue;

        
Format(buffer20"%N"i);

        
Format(buffersizeof(buffer), "%20s %-10i %-6.0f %-6.0f %-10.2f %-10.2f %-13.0f %-13.0f %-6.0f %-6.0f"bufferGetClientDataRate(i), GetClientAvgPackets(iNetFlow_Outgoing), GetClientAvgPackets(iNetFlow_Incoming), GetClientAvgData(iNetFlow_Outgoing)/1000.0GetClientAvgData(iNetFlow_Incoming)/1000.0GetClientAvgLatency(iNetFlow_Outgoing)*1000.0GetClientAvgLatency(iNetFlow_Incoming)*1000.0GetClientAvgChoke(iNetFlow_Outgoing)*100.0GetClientAvgLoss(iNetFlow_Both)*100.0);
        
PrintToConsole(clientbuffer);
    }

    return 
Plugin_Handled;

It appears to be working, if I did it incorrectly, let me know. :p

Last edited by coolzie; 03-15-2018 at 14:19.
coolzie is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-15-2018 , 17:48   Re: SM Data Rates
Reply With Quote #15

Nice! (I didn't check)
__________________
Do not Private Message @me
Bacardi is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 10-31-2022 , 07:00   Re: SM Data Rates
Reply With Quote #16

Can it help to detect a dos attack ?
JLmelenchon is offline
Reply


Thread Tools
Display Modes

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 08:47.


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