[Plugin Request] Simple RTSS plugin for pinging a network address

Discussion in 'MSI AfterBurner Application Development Forum' started by bishi, Oct 20, 2017.

  1. bishi

    bishi Master Guru

    Messages:
    575
    Likes Received:
    17
    GPU:
    GTX 1080 SLI
    Target IP address and ping interval should be customizable.

    Anyone fancy taking up the challenge? :)
     
    Sadmin3D and GSDragoon like this.
  2. CaptaPraelium

    CaptaPraelium Guest

    Messages:
    229
    Likes Received:
    63
    GPU:
    1070
    I have a way to do this. Using the PerfCounter.dll plugin, we can access Windows Performance Counters. I can create custom counters and fill them with the results of ping tests using PowerShell.

    This could be quite powerful because really we can take anything from a shell script and monitor it.

    I'm a powershell rookie (this is literally the first time I've used it) and some of this has to be done as admin, so I'm just tidying up the code before I release it. Perhaps someone who has some powershell skill could fix it up afterwards?
     
  3. bishi

    bishi Master Guru

    Messages:
    575
    Likes Received:
    17
    GPU:
    GTX 1080 SLI
    This sounds great!
     
  4. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,193
    Likes Received:
    6,847
    I guess I'll talk to MSI to organize plugin development contest after releasing official 4.4.0. To motivate creating more useful things like that and to let creative developers to get some nice prizes.
     

  5. Djordje Lukic

    Djordje Lukic Guest

    Messages:
    5
    Likes Received:
    15
    GPU:
    Nvidia 820m 2gb
    Anyone interested in Beta testing PM me.
    Administrative privileges required on first launch to be able to "Add Counter" to Perfmon
    Manual edit of config file MSI Afterburner\Plugins\Monitoring\PerfCounter.cfg is needed.

    [​IMG]
    [​IMG]
     
  6. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,193
    Likes Received:
    6,847
    Excellent, good job.
     
    yasamoka and Djordje Lukic like this.
  7. bishi

    bishi Master Guru

    Messages:
    575
    Likes Received:
    17
    GPU:
    GTX 1080 SLI
    Just what I was after, you legend!
     
  8. Djordje Lukic

    Djordje Lukic Guest

    Messages:
    5
    Likes Received:
    15
    GPU:
    Nvidia 820m 2gb
    Sent you beta version, if all goes well i will be releasing this to the Public soon.
     
  9. Haldi

    Haldi Master Guru

    Messages:
    319
    Likes Received:
    41
    GPU:
    R9-290 CF
    so the plan is to enter your game server there and have a graph that shows latency?
     
  10. bishi

    bishi Master Guru

    Messages:
    575
    Likes Received:
    17
    GPU:
    GTX 1080 SLI
    You could do if you wished, I like to just have my general internet connection quality visible my pinging my ISP's closest server constantly. That way if im gaming I can tell immediately if I get a latency issue if it is my connection or usage on my end (downloads etc) that is causing the problem or something else on the game server end (that is out of my control).
     

  11. Djordje Lukic

    Djordje Lukic Guest

    Messages:
    5
    Likes Received:
    15
    GPU:
    Nvidia 820m 2gb
    Yes, if you know IP of the server you are playing on, and server is accepting ICMP traffic you can enter it in this app and get a in game latency graph.
     
  12. Sadmin3D

    Sadmin3D Guest

    Messages:
    2
    Likes Received:
    0
    GPU:
    RX 580 / 8GB
    I joined up after searching for something similar and not finding too much that would allow direct 3d overlay.

    Would appreciate being a beta tester Djorde!
     
  13. Djordje Lukic

    Djordje Lukic Guest

    Messages:
    5
    Likes Received:
    15
    GPU:
    Nvidia 820m 2gb
    Sent you beta version in DM, if all goes well i will be releasing this to the Public soon, there are still small bugs and thing i would like to fix before releasing it to the wild, it is just im a little tight with time this days...
     
    Sadmin3D likes this.
  14. Sadmin3D

    Sadmin3D Guest

    Messages:
    2
    Likes Received:
    0
    GPU:
    RX 580 / 8GB
    Thanks Djordje,will let you know if any problems!

    -EDIT-
    Working great Djordje thanks again!
     
    Last edited: Jan 2, 2018
  15. CaptaPraelium

    CaptaPraelium Guest

    Messages:
    229
    Likes Received:
    63
    GPU:
    1070
    @Djordje Lukic any chance we could get a hold of that plugin? My powershell script thing is kinda a hack ;)
     

  16. CaptaPraelium

    CaptaPraelium Guest

    Messages:
    229
    Likes Received:
    63
    GPU:
    1070
    Guys it seems djordje has disappeared :( Anyone who got the beta care to share it with us? @Sadmin3D @bishi I think you have the only copies around :(
     
  17. CaptaPraelium

    CaptaPraelium Guest

    Messages:
    229
    Likes Received:
    63
    GPU:
    1070
    Well, RIP that plugin :(
    I deleted my scripts since there was a better option, but since that's disappeared, I'll drop these links here for future reference. Using the information here, you can write a PS script, which will create a perfmon category and counters, and then you can use standard Afterburner perfmon plugin to grab that data and put it in your OSD or whatever.

    The most important one:
    https://blogs.technet.microsoft.com...ll-to-create-and-update-performance-counters/

    Note that in this script, he just fills the counters with hardcoded values. You would want to replace those values with your data. In our case (ping test) we can use the test-connection powershell cmdlet. Here's an example of the above code being used in a loop which updates the values:

    https://blogs.msdn.microsoft.com/te...on-counters-and-update-them-using-powershell/
    And here's code to use test-connection to get the ping times:
    https://stackoverflow.com/questions/9649143/returning-statuscode-from-test-connection#9649212

    You will need to run as admin to create the counters (but not to update them, the script can run as user after the first time) So you'll need to test to see if you have admin rights:

    https://superuser.com/questions/749243/detect-if-powershell-is-running-as-administrator

    And if the category doesn't exist (you need to create it) and you're not admin, you'll need to launch it as admin:

    https://serverfault.com/questions/11879/gaining-administrator-privileges-in-powershell/12306#12306


    Those are definitely all the pieces of the puzzle. I put it together, but then I threw it away. DOH.
     
    Djordje Lukic and Andy_K like this.
  18. Djordje Lukic

    Djordje Lukic Guest

    Messages:
    5
    Likes Received:
    15
    GPU:
    Nvidia 820m 2gb
    Sorry i was just very busy, i really hope i will be able to continue working on this soon.
    Here is the version that i shared with some members of the forum but please note that there are bugs and that app can sometimes crash or not respond.

    Here is the link to the zip file containing the application and Instructions.
    https://goo.gl/JUWFNr

    Source Code is a mess, but if there is enough interest in the app i will be willing to tidy it up and release full source code. If anyone experienced in Visual Studio is willing to help maybe we can open source this and start a GitHub page?

    Please do let me know if it works for you and if you encounter any Bugs.

    My testing was done using Afterburner 4.4.0 Beta 19 and RTSS v7.0.0 beta 29

    I recommend editing config file manually first , and in case of not working trying to replace it with the one i supplied.
     
    Last edited: Apr 10, 2018
  19. KaMiKaZeE

    KaMiKaZeE Guest

    Still working in 2019
    Afterburner version - 4.6.1
    RTSS version - 7.2.2
    Windows 10 version - 1903
     
    Last edited by a moderator: Jul 7, 2019
  20. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,193
    Likes Received:
    6,847
    There will be native ping plugin (with opensource code in SDK) in the next beta
     

Share This Page