Raised This Month: $51 Target: $400
 12% 

[Any?] Handle Dumps Filter


Post New Thread Reply   
 
Thread Tools Display Modes
Author
butare
Senior Member
Join Date: Nov 2016
Plugin ID:
6404
Plugin Version:
1.0.2
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Filters handle dumps created by sm_dump_handles
    Old 01-17-2019 , 17:08   [Any?] Handle Dumps Filter
    Reply With Quote #1

    Handle Dumps Filter (HDF):

    HDF provides a lot of ways how you can filter your handle dump, and by using sm_checkhandles -h you can see whole list of available arguments.

    To filter handle dump use sm_checkhandles command. That command is not meant to be executed by multiple clients at the same time!

    Feel free to submit an issue if you found one, or if you want to suggest something.


    NOTE: Output of that command may not fit in the console/chat in game, so I suggest to use that command through server console, that way output should be shown correcty.

    Known issues: You may get Script execution timed out error if you are trying to filter or compare big handle dump(s), to fix that, you need to set "SlowScriptTimeout" in addons/sourcemod/configs/core.cfg to something higher then default values is, 60 may be a good one.

    Available cvars:
    • hdf_handledumps_folder - Folder where all handle dumps will be stored, path relative to game folder;
    • hdf_handledumps_savefolder - Folder where all handle dumps will be stored if -sd param was used;
    • hdf_handledumps_amount - Amount of handle dumps stored in the specified folder;
    • hdf_handledumps_fileprefix - Prefix that will be used for created dumps;
    • hdf_handledumps_timeout - Time to wait for handle dump to be created;
    • hdf_logerrors - Set to 1 if you want to log every occurred error;

    All available arguments:
    • -h - print help list;
    • -sh - print sort help list;
    • -th - print all available memory output types;
    • -sd - save handle dump under the directory specified in hdf_handledumps_savefolder cvar;
    • -so <path to file> - save output to a specific file;
    • -c <path to file> - compare currect handle dump to another dump; (You can also use words "lastsaved" and "lastcreated" to get the appropriate files);
    • -d <path to file> - set different path for raw handle dump;
    • -st <sort type> - set custom sort type;
    • -mt <memory type> - set custom memory output type (eg. KB, MB, GB);

    You can use any amount of arguments at a time, there's no limit for that. If you use same argument twice or more then last one will be used.

    Examples:
    • sm_checkhandles - basic usage of a command, that will create handle dump in temp directory specified in hdf_handledumps_folder cvar, and will filter that dump. Here's how output will look like:

    • sm_checkhandles -st -m - that will create handle dump in temp directory specified in hdf_handledumps_folder cvar, and will filter that dump using custom sorting type -m (sort descending by memory). Here's how output will look like:

    • sm_checkhandles -sd -st pln -mt kb - that will create handle dump in save directory specified in hdf_handledumps_savefolder cvar, and will filter that dump using custom sorting type pln (sort ascending by plugin name) and will use KiloBytes as memory type. Here's how output will look like:

    • sm_checkhandles -c lastsaved -d handles/dump.txt -st -h -so dumpoutput.txt - that will create handle dump in specified directory handles/dump.txt (Note: it will not auto create directory), and will filter that dump using custom sorting type -h (sort descending by handle count), also it will compare newly created dump relative to specified one lastsaved (In that case lastsaved means that it will use dump that was last saved using -sd argument during plugin lifetime) and finally it will create file dumpoutput.txt with output. Here's how output will look like:


      and the dumpoutput.txt file:


    Download

    Source code

    Last edited by butare; 03-21-2021 at 17:46.
    butare is offline
    pan0s
    Senior Member
    Join Date: Nov 2017
    Old 03-16-2022 , 11:56   Re: [Any?] Handle Dumps Filter
    Reply With Quote #2

    Good plugin. Thanks you sharing.

    Last edited by pan0s; 03-16-2022 at 12:38.
    pan0s 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 15:12.


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