HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/memcached.cpython-39.pyc
a

��?h]�@sHddlZddlZddlZddlZGdd�dej�ZedkrDe���dS)�Nc@seZdZdZdd�ZdS)�Plugin�	memcachedc
CsJ|��}z|�dd�}Wnd}Yn0zJ|dur^tjd|�dd�|�dd�fgdd�}ntjd	|gdd�}WnYd
S0d}d}i}i}z�|��}	t|	dd
�D]n\}
}|	dd
|}|����}
|
|vr�t|�||
<q�|
|vr�t|�}|�	|
t|�|�||
<t|�||
<q�q�WnYdS0t
�
�|d<|�|�|S)z�
        pip install python-memcached
        add to /etc/agent360.ini
        [memcached]
        enabled=yes
        host=127.0.0.1
        port=11211
        r�socketFz%s:%s�host�portr)�debugzunix:/%szCould not connect to memcached)Zaccepting_conns�bytesZuptimeZtotal_itemsZtotal_connectionsZtime_in_listen_disabled_us�threadsZrusage_userZ
rusage_systemZreserved_fdsZpointer_sizeZmalloc_failsZlrutail_reflockedZlisten_disabled_numZlimit_maxbytesZhash_power_levelZ
hash_bytesZ
curr_itemsZcurr_connectionsZconnection_structuresZconn_yieldsZ	reclaimed)Z	auth_cmdsZauth_errors�
bytes_readZ
bytes_writtenZtouch_missesZ
touch_hitsZincr_misses�	incr_hitsZ
cas_missesZ
cas_badvalrZ
get_missesZget_hitsZexpired_unfetchedZ	evictionsZevicted_unfetchedZ
delete_missesZdelete_hitsZdecr_missesZ	decr_hitsZcrawler_reclaimedZcrawler_items_checkedZ	cmd_touchZcmd_getZcmd_setZ	cmd_flushZ
cmd_missesZ
cmd_badvalZcmd_hits�zCould not fetch memcached stats�ts)Zget_agent_cache�get�memcacheZClientZ	get_stats�	enumerate�lower�strip�floatZabsolute_to_per_second�timeZset_agent_cache)
�self�configZ
prev_cacherZmcZ	non_deltaZ
delta_keys�results�data�result�key�	key_value�value�r�D/usr/local/lib/python3.9/site-packages/agent360/plugins/memcached.py�run	s@	
* 
z
Plugin.runN)�__name__�
__module__�__qualname__rrrrrrsr�__main__)Zplugins�structrrZ
BasePluginrr �executerrrr�<module>si