Jump to content

[BF4] Stats webpage for XpKiller's Stats Logger Plugin


tyger07

Recommended Posts

  • Replies 1.7k
  • Created
  • Last Reply

Originally Posted by TMiland*:

 

Yeah, I can do what you want. I am just doing some errands.

Okay dude! :smile:

 

Maybe do some checks to see if it is "NULL" or "on" and display if either of them is set, and not display on off?

 

Not sure if all have that column? :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

So you cannot do it as default that way?

I synced an update to GitHub just now to allow it to work with adkats webadmin panel connection state changes.

 

The new update still won't filter out the "combined stats" for servers which aren't alive, but please let me know if this causes the dead servers to no longer be displayed.

 

Thank you!

 

Maybe do some checks to see if it is "NULL" or "on" and display if either of them is set, and not display on off?

Exactly.

"AND (`ConnectionState` IS NULL OR `ConnectionState` = 'on')"

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

I synced an update to GitHub just now to allow it to work with adkats webadmin panel connection state changes.

 

The new update still won't filter out the "combined stats" for servers which aren't alive, but please let me know if this causes the dead servers to no longer be displayed.

 

Thank you!

 

 

 

Exactly.

"AND (`ConnectionState` IS NULL OR `ConnectionState` = 'on')"

There we go! Nice! Thank you! :-)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

There we go! Nice! Thank you! :-)

When I get all the combined stats queries updated to filter out the inactive server ids, hopefully that will create a decent performance increase by dropping from 300,000 soldiers down to 200,000 soldiers.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

When I get all the combined stats queries updated to filter out the inactive server ids, hopefully that will create a decent performance increase by dropping from 300,000 soldiers down to 200,000 soldiers.

I don't mind the combined stats being displayed, that shows how many players we have had in the past, and i think thats nice.

 

BUT a performance increase is always welcome, so if we could compromise, display the total combined stats, but cache the disabled servers or something, idk. :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Yea they weren't bots, the user I use for the stats pages is strictly set to select only. Those page view stats are completely wrong and from when I first setup the stats logging page.

 

Literally when I watched top on my VDS I could tell when someone was browsing the stats page because the MySQL process would pop to the top with 100% CPU usage and then fall back down when the page was done being generated.

Perhaps unfortunate in some ways, this stats code has slowly transformed from being lightweight, quick, and ugly into being full-featured, not lightweight, and slower. I am not sure what else I can do other than remove features.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

Just 2 days ago I was trying to locate a method to hide disabled servers and then y'all go and make it happen! Thank you ty and TM. Just made the stats page a little bit cleaner.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Perhaps unfortunate in some ways, this stats code has slowly transformed from being lightweight, quick, and ugly into being full-featured, not lightweight, and slower. I am not sure what else I can do other than remove features.

I say cache what you can of static content, i have no idea how/what you cache now, but i am sure you can analyze the speed and see what brings the speed and performance down. :smile: I have to say that i am impressed by how it looks now! Big improvements! :biggrin:

 

Just 2 days ago I was trying to locate a method to hide disabled servers and then y'all go and make it happen! Thank you ty and TM. Just made the stats page a little bit cleaner.

Yeah, it helped alot! Thank ty_ger07 :ohmy:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Oh, I am not sure. Even though it is "safe", I am a little scared of cacheing the data to the server's memory or hard drive. It seems like a pretty big vulnerability if my code was hacked since it could theoretically cross over. (hack -> stats page -> disk -> mysite.com/cache/badfile -> delete all files on hard drive)

Even though my code is secure as far as I know, I would rather any security flaw be limited to the page or database and not extend to a file on the server's hard drive.

 

I was thinking of just saving common data to a table so the result could be fetched without recomputation as long as the result wasn't older than a certain time.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Hmm hmm hmm.

 

The vehicle stats are driving me nuts. Perhaps I should just drop the 'none' damage type completely and start over with the vehicle stats. It's such a pain that the new vehicle stats have the damage class and name/friendlyname SO screwed up.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Oh, I am not sure. Even though it is "safe", I am a little scared of cacheing the data to the server's memory or hard drive. It seems like a pretty big vulnerability if my code was hacked since it could theoretically cross over. (hack -> stats page -> disk -> mysite.com/cache/badfile -> delete all files on hard drive)

Even though my code is secure as far as I know, I would rather any security flaw be limited to the page or database and not extend to a file on the server's hard drive.

 

I was thinking of just saving common data to a table so the result could be fetched without recomputation as long as the result wasn't older than a certain time.

You are being paranoid! :ohmy:

 

I have full daily backups, so that's not an issue, and shouldn't be for anyone else either. Chances for getting hacked are small, and that script i linked are compatible with most of the caching software out there, and i see no risk of using them. :smile:

 

If you could make it compatible, people can decide what cache they want to use u know, all at their own risk. :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Prophet731*:

 

Only thing I see with the caching is that it probably wouldn't be very effective as the data from the database is always changing. There are very few spots where caching would help, even in my app.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Only thing I see with the caching is that it probably wouldn't be very effective as the data from the database is always changing. There are very few spots where caching would help, even in my app.

There seems to be only a tiny performance increase so far, but I am in the process of caching the total "combined servers" player count, the total chat rows, and player ranks in servers and in "combined servers".

 

Like you say, the database is very dynamic so caching will cause the accuracy of the data presented to be slightly decreased. And also, there are only certain things I can cache for only so long before I will totally screw up the accuracy of the information provided.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

The Serbia flag is missing

 

RS noFlag.png

 

How can i add this ?

 

THX

 

-----

 

@edit

 

i found it ^^

 

Add in the common\constants.php

 

 

this -> 'Serbia'=>'RS'

Thank you for the feedback. I will fix this in the next update.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Prophet731*:

 

I love your commit message lol

 

Also, you should look into angularjs. You could probably clear out all the cluttered html in the PHP scripts and return json for single page app. Wouldn't be a bad improvement. I got lost trying to see if I can setup a angualrjs version of your app. I gave up after an hour.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Did some fiddling in the chat, consider adding Code:

AND `logMessage` NOT LIKE '!%'
		AND `logMessage` NOT LIKE '/%'
to the sql query, to filter out all the map votes /number and !commands :cool:

 

Feels a lot snappier after the last update! :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Did some fiddling in the chat, consider adding Code:

AND `logMessage` NOT LIKE '!%'
		AND `logMessage` NOT LIKE '/%'
to the sql query, to filter out all the map votes /number and !commands :cool:
For some reason, in my testing, adding more constraints makes it get slightly slower.

 

In my testing,

 

This is faster:

Code:

$Messages_q = @mysqli_query($BF4stats,"
			SELECT `logDate`, `logSoldierName`, TRIM(`logMessage`) AS Message, `logSubset`
			FROM `tbl_chatlog`
			WHERE `ServerID` IN ({$valid_ids})
			ORDER BY {$rank} {$order}, `logDate` ASC
			LIMIT {$offset}, {$rowsperpage}
		");
Than this:

Code:

$Messages_q = @mysqli_query($BF4stats,"
			SELECT `logDate`, `logSoldierName`, TRIM(`logMessage`) AS Message, `logSubset`
			FROM `tbl_chatlog`
			WHERE `ServerID` IN ({$valid_ids})
			AND `logMessage` != ''
			AND `logMessage` NOT LIKE '%ID_CHAT_%'
			AND `logSoldierName` != 'Server'
			ORDER BY {$rank} {$order}, `logDate` ASC
			LIMIT {$offset}, {$rowsperpage}
		");
I am now confused which way to go. :huh: It seems like some of the filtering I already did is bad.

 

It seems like removing `logSubset` as an unnecessary additional column is a much more beneficial thing. The same holds true for the column `Rounds` in the leaderboard.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Prophet731*:

 

For some reason, in my testing, adding more constraints makes it get slightly slower.

 

In my testing,

 

This is faster:

Code:

$Messages_q = @mysqli_query($BF4stats,"
            SELECT `logDate`, `logSoldierName`, TRIM(`logMessage`) AS Message, `logSubset`
            FROM `tbl_chatlog`
            WHERE `ServerID` IN ({$valid_ids})
            ORDER BY {$rank} {$order}, `logDate` ASC
            LIMIT {$offset}, {$rowsperpage}
        ");
Than this:

Code:

$Messages_q = @mysqli_query($BF4stats,"
            SELECT `logDate`, `logSoldierName`, TRIM(`logMessage`) AS Message, `logSubset`
            FROM `tbl_chatlog`
            WHERE `ServerID` IN ({$valid_ids})
            AND `logMessage` != ''
            AND `logMessage` NOT LIKE '%ID_CHAT_%'
            AND `logSoldierName` != 'Server'
            ORDER BY {$rank} {$order}, `logDate` ASC
            LIMIT {$offset}, {$rowsperpage}
        ");
I am now confused which way to go. :huh: It seems like some of the filtering I already did is bad.

 

It seems like removing `logSubset` as an unnecessary additional column is a much more beneficial thing. The same holds true for the column `Rounds` in the leaderboard.

The reason why the first query is faster than the second is all because of the `logMessage` column. Take out the `logMessage` and boom, faster query.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

The reason why the first query is faster than the second is all because of the `logMessage` column. Take out the `logMessage` and boom, faster query.

Umm...

 

The purpose of the chat log is to be able to see the chat messages. So, that isn't a very viable option, is it?

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.