Raised This Month: $32 Target: $400
 8% 

[DEV] Entity Limits Logger


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
7417
Plugin Version:
2.1
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    32 
    Plugin Description:
    Logs entity types when the total number of entities on the map exceeds a pre-prefined maximum
    Old 12-13-2020 , 15:51   [DEV] Entity Limits Logger
    Reply With Quote #1

    Description:
    When the total number of networked entities become > 2048* (depends on your game),
    server receive crash
    Quote:
    ED_Alloc: no free edicts
    This plugin can help you with manual searching for a reason of entities leaking by logging all entities once per map whenever the total number of networked entities become > MAX, defined by you.
    List of info that is to be logged:
    - Time
    - Map name
    - Delta report since the latest snapshot (it is a difference between entities, spawned when map started and entities at the moment of a leak detection )
    - Weapon names per each slot per each player
    - Player names and their teams
    - total entities
    - total networked entities
    - per each entity:
    > class name
    > target name
    > model name
    > origin (position)
    > is within Saferoom (L4D only)
    > HammerId
    Log location: /addons/sourcemod/logs/entity_limit_<date-time>.log

    ConVars (Settings):
    Located at cfg/sourcemod/sm_entity_limit.cfg

    - sm_entity_limit_unsafe_left - def.: 150 - Plugin creates report when the number of free entities is less than this ConVar
    - sm_entity_limit_delay - def.: 10.0 - Delay to be used after map start to create entities snapshot for calculating the entities delta when a leak happens
    Commands:
    - sm_entlog - instantly creates the entities report
    - sm_entsnap - creates entities snapshot which is to be used for calculating the entities delta (when leak happens or sm_entlog used)

    - sm_entcrash - (available if only you enable DEBUG 1) - creates new 300 dummy entities to imitate the crash
    Installation:
    - copy .smx to addons/sourcemod/plugins
    Example of a log:
    Spoiler


    Related plugins:
    - [ANY] Security entity limit
    - [Any] Crash Helper / Log A Lot
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Files
    File Type: sp Get Plugin or Get Source (entity_limit_logger.sp - 787 views - 12.6 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 05-12-2021 at 19:29.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-07-2021 , 19:32   Re: [DEV] Entity Limits Logger
    Reply With Quote #2

    Updated to v2.0.

    Original version report contained too many entities of each class making the manual analysis of a leak to be quite a non-trivial task.

    In v2.0, I decided to provide a delta.
    So, when the map is started, logger creates snapshot of all entities.
    Next time, when the leak heppens, Entity Logger creates a report for you with a delta:

    1) Difference in total number of entities per each class between current moment and a snapshot.
    2) Detailed list of all entities MINUS those entities from a snapshot.

    Thus, you can quite easily detect which identical entities are leaking. See the sample log in 1st post.

    ChangeLog:

    Quote:
    - Added Delta report
    - Beautified
    - New ConVar "sm_entity_limit_unsafe_left"
    - New ConVar "sm_entity_limit_delay"
    - New command "sm_entsnap"
    - Logs are separated by file per date/time.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 03-07-2021 at 19:37.
    Dragokas is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 03-08-2021 , 01:10   Re: [DEV] Entity Limits Logger
    Reply With Quote #3

    Thanks for this. I'll give it a try.

    I'm assuming there is no problem with running this concurrently with the wonderful '[ANY] Security entity limit' written by the talented Benoist3012'?
    PC Gamer is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-08-2021 , 07:55   Re: [DEV] Entity Limits Logger
    Reply With Quote #4

    They do not conflict, if priorities met. My plugin should be first in detection order. By default - everything OK.

    "Security entity limit" has a detection point == 1950 entities.
    "Entity Limits Logger" has sm_entity_limit_unsafe_left ConVar == 150, means MAX (e.g. 2048 ) - 150 = 1898 entities,
    which will be detected earlier.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 03-08-2021 at 07:56.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-08-2021 , 08:51   Re: [DEV] Entity Limits Logger
    Reply With Quote #5

    Updated.

    Quote:
    v2.1
    - Added HammerId
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Wizards
    Junior Member
    Join Date: Oct 2021
    Old 11-18-2021 , 09:03   Re: [DEV] Entity Limits Logger
    Reply With Quote #6

    This is my Entity Log file. Can somebody explain it to me? i really dont understand this error because it's too much line.
    Attached Files
    File Type: log entity_limit_2021-11-18_20-43-04.log (299.8 KB, 192 views)
    Wizards is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 11-18-2021 , 09:56   Re: [DEV] Entity Limits Logger
    Reply With Quote #7

    Automatic parser is already provides analysis for you at the very begin of the file:

    Quote:
    DELTA - {Class Count}
    *
    This section describes the number of entity classes, which increased since the latest snapshot
    *

    +5 prop_physics_override
    +1 commentary_dummy
    +8 predicted_viewmodel
    +1237 info_particle_system
    +3 point_hurt
    +1 weapon_hunting_rifle
    +4 weapon_grenade_launcher
    +4 player
    +1 weapon_tank_claw
    +19 weapon_molotov
    +1 ability_throw
    You have info_particle_system leaking. Some plugin creates particles, but don't delete.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 02-12-2022 , 08:32   Re: [DEV] Entity Limits Logger
    Reply With Quote #8

    may we log entity name as GetEntityNetClass? GetEntityClassname is so hard to identify
    __________________
    NoroHime is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 05-01-2023 , 06:55   Re: [DEV] Entity Limits Logger
    Reply With Quote #9

    @NoroHime, can you provide an example, which class?
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 05-01-2023 , 09:47   Re: [DEV] Entity Limits Logger
    Reply With Quote #10

    Quote:
    Originally Posted by Dragokas View Post
    @NoroHime, can you provide an example, which class?
    sometime counts many prop_physics_override, but they has different net class, just another suggestion, maybe generate more info to debug
    __________________
    NoroHime 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 22:35.


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