Jump to content

Recommended Posts

20 hours ago, whitepanda said:

How can someone retrieve the number of online players in their server and put it on a website?

I normally monitor number of connections on specific port to plot online players.

image.png

You can simply use netstat -an and grep/count number of connected on DCS PORT

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

ED track the data on their backend services, since you cans see them for example in your account page at this link: https://www.digitalcombatsimulator.com/it/personal/server/#myservers

when logged with the account that host the servers.

image.png

 

But there is NOT an official public endpoint or API that expose this data, so you can't retrieve it from your webserver from ED services ( at least at this time: September 2022 )
Best option, and is what all we did, is create your preferred communication system between your webserver and DCS server, so you can retrieve all the stats that you want 😉

Also the graph that I've posted is not done locally on the same machine that is running my servers, is hosted elsewhere 😉
 

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

12 hours ago, whitepanda said:

I hope ED will release an API for this.

I'm pretty sure is NOT part of the ED scope at the moment since it can be done really "quick" from DCS server side in many different way!
I personally prefer to monitor real connections with netstat, but you can also add mission scripting ( .lua ) directly in your .miz file to count players, track their stats etc.... and dump to file or either a database, discord bot, etc.

12 hours ago, whitepanda said:

So, if I understood correctly, you got service/s running to monitor port activities remotely? If it does not use a lot of resources, that is a good work around.

Wound you mind sharing the service or program you use?

Yes, I'm running Nagios that is a monitoring software on another machine ( a VPS hosted by an EU provider ) that retrieve all the data from DCS server using NSCclient. Not just connections, but also CPU, RAM, Bandwidth, Temperature etc...

image.png

it's not the easiest way, but since I've managed a large IT infrastructure monitoring with that tool, I found it a good options for me and my needing 😉

Resource used by monitoring system it's irrelevant in most of the case, the same system it's used to retrieve stats and info from router/switch/printers on the network that normally doesn't have powerful CPU 😉

If you can run a DCS server on your machine, you definitely have the power to send monitoring data elsewhere 😉


Edited by Maverick87Shaka

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

16 minutes ago, whitepanda said:

Thanks @Maverick87Shaka.

I might have to explore adding script inside miz or running script on actual server to monitor the port then dump it on a file or db. Ill see which one is less likely to use resources.

Thank you for all the help!

Based on my experience, if your goal is monitor online users, you'll have less impact on player experience doing the check by an external script that runs netstat at OS level and check connection on port, rather than add a code inside your miz file. It's still a valid option but in terms of player experiences, is better to leave everything possible outside the lua core environment of server to prevent issues on player flying experience.


Edited by Maverick87Shaka

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

  • 1 year later...
On 8/28/2022 at 3:08 PM, Maverick87Shaka said:

I normally monitor number of connections on specific port to plot online players.

image.png

You can simply use netstat -an and grep/count number of connected on DCS PORT

Very elegant solution.

Can you share more details how to build those graphs? 

Link to comment
Share on other sites

15 hours ago, Nox K. said:

Very elegant solution.

Can you share more details how to build those graphs? 

Graphs are generated automatically by a monitoring system. I'm using Checkmk (that is also available in the RAW edition that is free )
Let me say that I've managed large infrastructure so I'm usual with that systems (I was the lead of the monitoring systems for the whole IT infrastructure) but to monitor single server, I would not recommend this way.

For the purpose of managing a DCS server, even several istances on the same machine, I would probably recommend to create a scheduled task that execute netstat command and write down a text file, csv formatted for example, and than use any online tools to graphs the results when needed, or create a self hosted html files that use chart.js or similar library to have a interactive live graphs.

A full monitoring system is amazing, but definitively overkill for the purpose. Main downside is that requires a dedicated server or "BOX" like a raspberry pi. It's not a simple pieces of software that you can run in the same environment of DCS server 😉

  • Like 1

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

On 11/9/2023 at 12:00 AM, Maverick87Shaka said:
Graphs are generated automatically by a monitoring system. I'm using Checkmk (that is also available in the RAW edition that is free )
Let me say that I've managed large infrastructure so I'm usual with that systems (I was the lead of the monitoring systems for the whole IT infrastructure) but to monitor single server, I would not recommend this way.

For the purpose of managing a DCS server, even several istances on the same machine, I would probably recommend to create a scheduled task that execute netstat command and write down a text file, csv formatted for example, and than use any online tools to graphs the results when needed, or create a self hosted html files that use chart.js or similar library to have a interactive live graphs.

A full monitoring system is amazing, but definitively overkill for the purpose. Main downside is that requires a dedicated server or "BOX" like a raspberry pi. It's not a simple pieces of software that you can run in the same environment of DCS server


Thanks🫡

Sent from my iPhone using Tapatalk

IMG_2287.jpeg


Edited by Nox K.
Link to comment
Share on other sites

1 hour ago, Nox K. said:


Thanks🫡

https://campaign.kestrelsnest.co.ua/analytics


Sent from my iPhone using Tapatalk

Really great and clean graph! Well done 👍
Did you use https://apexcharts.com/ ? just for reference as future use 😉

  • Like 1

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...