AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Crash Helper / Log A Lot v1.0.2a (Updated 9/9/13) (https://forums.alliedmods.net/showthread.php?t=225769)

thetwistedpanda 09-08-2013 22:33

[Any] Crash Helper / Log A Lot v1.0.2a (Updated 9/9/13)
 
2 Attachment(s)
Features:
  • A plugin request paid for by AdReNoChrOm who agreed to its public release.
  • Provides logging functionality for several elements to help assist debugging crashes.
    • Note: This plugin can only do so much; by the time a crash occurs, it's too late to log any information. The most you can hope for is that what's logged right before the crash is related to the actual crash. It's HIGHLY recommended that you run asherkin's Accelerator to further assist in crashes.
    • However, this isn't just for debugging crashes. With the amount of information being logged, it can be used to help track down exploits, griefers, map freakouts, general issues, etc if you spend enough time in the logs.
  • Capable of logging the following, each to its own logging file:
    • Connections (Upon Authorization: Name, Steam, IP)
    • Events (All Events, including their parameters)
    • Population (Every 60.0 seconds, Name/Steam/IP of everyone in-game)
    • Map Changes (Pre / Post change)
    • Entitys (OnCreation / OnDestroy + Total Entities / Max Entities)
    • Commands (Client / Server executed commands + arguments)
  • Parses ModEvents.res and ServerEvents.res, providing compatibility for any Source game.
    • I've provided files from 9/8/13 for: TF2, CS:S, CS:GO, HL2:MP, L4D2
Installation:
  • It's recommended to just use the .zip file, however, if you possess above normal intelligence:
    • You have to manually create the log directory you with to use within /logs/
    • You need to upload the appropriate .res files to the directory you wish to use within /configs/
    • You should know where the .smx goes, if not, uninstall now because you skipped the .zip opportunity.
ConVars:
  • sm_crashhelper_enabled: Allows you to enable/disable all aspects of the plugin.
  • sm_crashhelper_detect: Determines what elements will be logged.
  • sm_crashhelper_stamp: The optional date stamp to use for log files.
  • sm_crashhelper_ignore_events: Events to be ignored while logging.
  • sm_crashhelper_ignore_entities: Entity classnames to be ignored while logging.
  • sm_crashhelper_ignore_commands: Commands to be ignored while logging.
  • sm_crashhelper_path_modevents: Path to desired modevents.res.
  • sm_crashhelper_path_serverevents: Path to desired serverevents.res.
    • Note: You may use a separate file for each feature, or combine detections into multiple files.
    • sm_crashhelper_path_logging_connect: Path to log client connections.
    • sm_crashhelper_path_logging_events: Path to log events.
    • sm_crashhelper_path_logging_population: Path to log population updates.
    • sm_crashhelper_path_logging_map: Path to log map changes.
    • sm_crashhelper_path_logging_entity: Path to log entities.
    • sm_crashhelper_path_logging_commands: Path to log commands.
ModEvents.res
  • Typically located within <file>_dir.vpk if VPK structures exist, otherwise, within /resource/.
ServerEvents.res
  • Located in either <file>_dir.vpk if VPK structures exist, otherwise, within /resource/.
  • Some source games utilize the default HL2 .res file, in which case, try /hl2/ one directory prior to your game directory.
Log Examples:

XenTerSiO 09-09-2013 00:37

Re: [Any] Crash Helper
 
Awesome! Many thanks to you for your work!

XenTerSiO 09-09-2013 02:42

Re: [Any] Crash Helper
 
Hey! Man!
---------
[SM] Native "HookEvent" reported: Game event "server_pre_shutdown" does not exist
[SM] Displaying call stack trace for plugin "sm_crashhelper.smx":
[SM] [0] Line 263, sm_crashhelper.sp::DefineEvents()
[SM] [1] Line 170, sm_crashhelper.sp::OnPluginStart()

friagram 09-09-2013 03:47

Re: [Any] Crash Helper
 
Most common crashing i have seen is in tf from no free edicts... Wrote something simple to dump them to file once they reach threshold before triggering a mapchange, but cant seem to find any pattern... Seems some valve maps have just way too many entities to constantly support 32 players :(

If you have some ideas for this // want to add it in, may be very useful.

thetwistedpanda 09-09-2013 07:05

Re: [Any] Crash Helper
 
@ XenTerSiO - game?

@ friagram - I'll see about implementing an edict/entity count tracker. But beyond that, not sure.

XenTerSiO 09-09-2013 08:17

Re: [Any] Crash Helper
 
Counter-Strike: Source

Root_ 09-09-2013 08:21

Re: [Any] Crash Helper
 
This is just awesome! Thank you so much, Panduh! It may help many people to detect a crash reason. I'd suggest to track OnEntityCreated/Destroyed as a separate option (for detailed information).

thetwistedpanda 09-09-2013 08:22

Re: [Any] Crash Helper
 
I appear to have uploaded the wrong serverevents.res for CS:S/TF2, corrected in v1.0.1 which was just pushed.

@Root_, good idea. Will see about it for next version. Implemented!

eric0279 09-09-2013 10:56

Re: [Any] Crash Helper
 
Quote:

L 09/09/2013 - 16:54:27: [SM] Native "LogToFileEx" reported: Could not open file "/home/srv39540/game/l4d2/left4dead2/addons/sourcemod/logs/crashhelper/09_09.log"
L 09/09/2013 - 16:54:27: [SM] Displaying call stack trace for plugin "sm_crashhelper.smx":
L 09/09/2013 - 16:54:27: [SM] [0] Line 208, G:\L4D2\Backup_Myriapulse\Server\addons\sourc emod\scripting\sm_crashhelper.sp::OnClientDis connect()

thetwistedpanda 09-09-2013 11:53

Re: [Any] Crash Helper
 
@eric0279
Quote:

Any sub-directories must be created manually. /logs/crashhelper/ will not automatically be created.
Version 1.0.2
PHP Code:

Expanded sm_crashhelper_detectRequires server restart due to upper bounds being raised.
-- 
Using the flag 16 results in Entity Logging (hooks OnEntityCreated/OnEntityDestroyed)
--- 
Displays classnamecurrent entity indextotal entity countmaximum entities allowed
-- Using the flag 32 results in Command Logging (hooks AddCommandListener)
--- 
Displays client nameclient steam, and any command arguments.
Reduced block of text in v1.0.1 to 3 lines... (Booze wanted 7)
Cleaned up logging phrases.
Cvar Changes:
-- 
sm_crashhelper_ignore has been renamed to sm_crashhelper_ignore_events.
-- 
sm_crashhelper_path_logging has been depreciated and 6 sub-cvars have been created:
--- 
sm_crashhelper_path_logging_connect
--- sm_crashhelper_path_logging_events
--- sm_crashhelper_path_logging_population
--- sm_crashhelper_path_logging_map
--- sm_crashhelper_path_logging_entity
--- sm_crashhelper_path_logging_commands
-- Added sm_crashhelper_ignore_entitieswhich ignores entities for entity logging similar to sm_crashhelper_ignore_events.
-- 
Added sm_crashhelper_ignore_commandswhich ignores commands for command logging similar to sm_crashhelper_ignore_events.
-- 
sm_crashhelper_path_logging_cvars are no longer hooked for changesreload plugin if you modify



All times are GMT -4. The time now is 22:30.

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