Raised This Month: $ Target: $400
 0% 

Map stats showing drops and full server


Post New Thread Reply   
 
Thread Tools Display Modes
MrXtramean
Senior Member
Join Date: Jun 2005
Old 05-30-2007 , 18:25   Re: Map stats showing drops and full server
Reply With Quote #31

Along with all that ^^^
Can this be made to calculate a weekly total average?

So that once a week (x amount of minutes) the plugin does a weekly total average player map.

So the plugin collects all this data:
Day/time/map/average player per map

Then after 10080 minutes, it finds all mapnames the same, adds up their map averages and divides the count.

So like on a Monday
dust--15 dust2--17 fy_ice_world--14 awp_india--19 dust--20 dust2--19
Tuesday
dust--12 dust2--13 fy_ice_world--19 awp_india--14 dust--17 dust2--14
Wed
dust--13 dust2--18 fy_ice_world--15 awp_india--20 dust--19 dust2--16
etc for 10080 minutes or 7 days.

Then at 10080 minutes it finds all mapnames the same and adds their totals up and divides it's count
dust 15+20+12+17+13+19....=16 for week average player per map dust.
dust2 17+19+12+14+18+16...=16
fy_iceword 14+19+15...=16
awp_india 19+14+20...=17.6 (or however it rounds or drops the decimal to 17)

Can this be done?

And again, how much cpu usage are we talking about? Can it be written so that it doesn't effect server cpu usage? Are we talking 1-3% or more?

Last edited by MrXtramean; 05-30-2007 at 18:34.
MrXtramean is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-31-2007 , 19:53   Re: Map stats showing drops and full server
Reply With Quote #32

I can add the date to the time stamp. But, weekly stats would need to use nVault, vault, or SQL to work. Cause the data is lost on mapchange. I can try making it with nVault if you want.

I haven't the slightest idea about the cpu usage. I would assume it is not much since it is just doing a simple calculation every 5 seconds.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
MrXtramean
Senior Member
Join Date: Jun 2005
Old 05-31-2007 , 22:28   Re: Map stats showing drops and full server
Reply With Quote #33

Yami, you said, "...As someone said, set_task is kind of CPU extensive. Maybe if I convert it to using next_think instead, I will release it. "

I just assumed it had higher than niormal CPU usage.
__________________
[NdN] 2021....We're Back!
MrXtramean is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-03-2007 , 13:49   Re: Map stats showing drops and full server
Reply With Quote #34

Well, I guess if you are using a lot of plugins that are using the set_task that it would be noticably higher. But, I think for this individual plugin, you shouldn't notice anything.


Just an update so you know that I am still working on it. I have decided not to use nVault for it, but use daily files. The files will be stored in addons/amxmodx/data/mapstats folder, you will need to create the folder though. I just reread you last post and relized that you would like weekly stats as well. While I can do that, I will see if you like how I am doing it now. It should be finished right now, but I have it on my server so that I can test it and make sure that it is working correctly. So, as soon as I verify that it is working correctly, I will post it here and see if you want me to attempt the weekly stats file
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-03-2007 , 23:33   Re: Map stats showing drops and full server
Reply With Quote #35

Okay, I had to remove the new line character because it was affecting the way the plugin worked, and it looked weird seeing a blank line in between each entry on my Notepad.

Anyways, there is a new cvar now.
mapstats_save 0/1 (One file / Daily files) (1 by default)


If you are using the Daily files option, you MUST create a folder called "mapstats" in your data folder. If you fail to do so, the plugin will not create the files.
Attached Files
File Type: sma Get Plugin or Get Source (mapstats.sma - 614 views - 2.0 KB)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
MrXtramean
Senior Member
Join Date: Jun 2005
Old 06-04-2007 , 18:35   Re: Map stats showing drops and full server
Reply With Quote #36

Thanks. I'll give it a try. I'm sure this will be fine. I can use excel by just entering the numbers, if needed.
__________________
[NdN] 2021....We're Back!
MrXtramean is offline
MrXtramean
Senior Member
Join Date: Jun 2005
Old 06-17-2007 , 02:36   Re: Map stats showing drops and full server
Reply With Quote #37

Ok...here's a problem.

The way it is now it adds the daily total average player per map and gives one total for each map for the day. Problem: Since this was changed from an each map count to a daily total, we can't track which maps are actually dropping players. Before we could at least look at each map totals and see if the map crashed, cause it would start back with dust, and we could see when players started to drop at the early morning hours and when they started to come back on.

Is it possible to have both recorded? Within the daily log to also included the counts from which it get it's daily totals?

I'd almost prefer seeing the hourly totals but have the logs start/stop every 24hours.

Do you follow what I'm saying from what I'm seeing?
__________________
[NdN] 2021....We're Back!
MrXtramean is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-18-2007 , 22:38   Re: Map stats showing drops and full server
Reply With Quote #38

Okay, I will get to work on it. I can't make any promises when it will be done, as I am not used to working 40 hours a week yet (I last worked 6 months ago)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-23-2007 , 14:26   Re: Map stats showing drops and full server
Reply With Quote #39

Sorry if it took to long to fix. I have edited it and added another cvar. If you have the cvar enabled at the start of each map.

New Cvar
mapstats_settings 0/1 (Default 0);

If set to 1, mapstats_save also needs to be 1. If they are both set to 1, you will get the normal behavior like you normally would, but it will also log the average player count for that map to the file addons/amxmodx/data/mapstats/mapstatsMMDD_detail.txt
Attached Files
File Type: sma Get Plugin or Get Source (mapstats.sma - 634 views - 2.7 KB)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
MrXtramean
Senior Member
Join Date: Jun 2005
Old 06-30-2007 , 12:49   Re: Map stats showing drops and full server
Reply With Quote #40

Thanks...I'll give it a whirl.
__________________
[NdN] 2021....We're Back!
MrXtramean is offline
Reply



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 00:12.


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