403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/landscape/monitor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyc
ó
}9Rc@sÔddlZddlZddlZddlmZddlmZdefd„ƒYZddd„ƒYZddd	„ƒYZ	d
dd„ƒYZ
ddd
„ƒYZde	fdefde
fdefgZdS(iÿÿÿÿN(tPluginConfigError(t
MonitorPlugint
ProcessorInfocBsqeZdZdZdZdddd„Zd„Zd„Zd„Z	e
d„Ze
d	„Zd
„Z
d„ZRS(
s¤Plugin captures information about the processor(s) in this machine.

    This plugin runs once per client session.  When processor
    information is retrieved it's compared against the last known
    processor information, which is saved in persistent storage.  A
    message is only put on the message queue if the latest processor
    information differs from the last known processor information.

    The information available from /proc/cpuinfo varies per platform.
    For example, an Apple PowerMac Dual G5 doesn't contain a vendor ID
    and provides the processor name in the 'cpu' field, as opposed to
    the 'model name' field used on x86-based hardware.  For reasons
    such as this, the schema of the data reported by this plugin is
    flexible.  Only 'processor-id' and 'model' are guaranteed to be
    present.

    In order to deal with the vagaries of parsing /proc/cpu
    information on the various platforms we support, message
    generation is deferred to per-platform message factories.

    @param delay: Set the starting delay.
    @param machine_name: The machine name to report.
    @param source_filename: The filesystem path to read information from.
    sprocessor-infois
/proc/cpuinfocCsJ||_||_|dkr1tjƒd}n|j||ƒ|_dS(Ni(t_delayt_source_filenametNonetostunamet_create_cpu_info_readert_cpu_info_reader(tselftdelaytmachine_nametsource_filename((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyt__init__'s			cCsUx>tD]6}tj|dƒ}|j|ƒr|d|ƒSqWtd|ƒ‚dS(sAReturn a message factory suitable for the specified machine name.iis2A processor info reader for '%s' is not available.N(tmessage_factoriestretcompiletmatchR(R
RR
tpairtregexp((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR2s
cCsLtt|ƒj|ƒ|jjj|j|jƒ|jd|j	t
ƒdS(s8Register this plugin with the specified plugin registry.sprocessor-infoN(tsuperRtregistertregistrytreactort
call_laterRtruntcall_on_acceptedtsend_messagetTrue(R
R((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR=scCsidd6|jjƒd6S(s6Retrieve processor information and generate a message.sprocessor-infottypet
processors(R	tcreate_message(R
((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR Cs
cCsØt}|jƒ}x|dD]„}dt|dƒf}|jj|ƒ}|dkrvi}|j||ƒt}q|j||ƒr|j||ƒt}qqW|rÔt	j
dƒ|jjj
|d|ƒndS(NRt	processorsprocessor-ids-Queueing message with updated processor info.turgent(tFalseR tstrt_persisttgetRt_updateRt_has_changedtloggingtinfoRtbrokerR(R
R"tdirtytmessageR!tkeytcached_processor((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRHs	

cCs |jjjd|j|ƒdS(s1Create a message and put it on the message queue.sprocessor-infoN(RR+tcall_if_acceptedR(R
R"((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR\scCs\|d|dkrtS|d|jddƒkr8tS|d|jddƒkrXtStS(s>Returns true if processor details changed since the last read.tmodeltvendortt
cache_sizes
cache-sizeiÿÿÿÿ(RR&R#(R
R!R-((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR(ascCso|d|d<|d|d<|jddƒ|d<|jddƒ|d<|jjd	t|dƒf|ƒd
S(s1Update the processor details with current values.sprocessor-idtidR1s
cache-sizeiÿÿÿÿR4R2R3R!N(R&R%tsetR$(R
R!R-((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR'nsN(t__name__t
__module__t__doc__tpersist_nameRtrun_intervalRRRR R#RRR(R'(((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR	s
				
tPowerPCMessageFactorycBs eZdZd„Zd„ZRS(s„Factory for ppc-based processors provides processor information.

    @param source_filename: The file name of the data source.
    cCs
||_dS(N(R(R
R
((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR~scCsÀg}t|jƒ}z™d}xŒ|D]„}|jddƒ}|djƒ}|dkr†it|djƒƒd6}|j|ƒq%|dkr%|djƒ|d<q%q%WWd|jƒX|S(	s;Returns a list containing information about each processor.t:iiR!sprocessor-idtcpuR1N(topenRRtsplittstriptinttappendtclose(R
RtfiletcurrenttlinetpartsR.((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR s
(R7R8R9RR (((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR<xs	tARMMessageFactorycBs eZdZd„Zd„ZRS(s„Factory for arm-based processors provides processor information.

    @param source_filename: The file name of the data source.
    cCs
||_dS(N(R(R
R
((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRžsc	Csåg}t|jƒ}z¾tjdƒ}i}xŒ|D]„}|j|jƒƒ}|r4|jdƒ}|jdƒ}|dkr–d|d<||d<q¸|dkr¸t|ƒ|d	<q¸q4q4W|rÒ|j|ƒnWd
|j	ƒX|S(s;Returns a list containing information about each processor.s (?P<key>.*?)\s*:\s*(?P<value>.*)R.tvaluet	Processorisprocessor-idR1s
Cache sizes
cache-sizeN(
R?RRRRRAtgroupRBRCRD(	R
RRERRFRGRR.RJ((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR ¡s&


(R7R8R9RR (((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRI˜s	tSparcMessageFactorycBs eZdZd„Zd„ZRS(s†Factory for sparc-based processors provides processor information.

    @param source_filename: The file name of the data source.
    cCs
||_dS(N(R(R
R
((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRÆscCsög}d	}t|jƒ}zÉtjdƒ}x³|D]«}|jddƒ}|djƒ}|dkr{|djƒ}q4|j|ƒr4tjdƒj|ƒj	ƒ\}}	it
|||	!ƒd6|d6}
|j|
ƒq4q4WWd	|jƒX|S(
s;Returns a list containing information about each processor.sCPU(\d{1})+R=iiR>s\d+sprocessor-idR1N(
RR?RRRR@RARtsearchtspanRBRCRD(R
RR1RERRGRHR.tstarttendR-((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR És"
$
(R7R8R9RR (((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRMÀs	tX86MessageFactorycBs eZdZd„Zd„ZRS(s„Factory for x86-based processors provides processor information.

    @param source_filename: The file name of the data source.
    cCs
||_dS(N(R(R
R
((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRéscCsg}t|jƒ}zõd}xè|D]à}|jddƒ}|djƒ}|dkr†it|djƒƒd6}|j|ƒq%|dkr©|djƒ|d<q%|dkrÌ|djƒ|d	<q%|d
kr%|djƒ}t|djƒƒ|d<q%q%WWd|jƒX|S(
s;Returns a list containing information about each processor.R=iiR!sprocessor-idt	vendor_idR2s
model nameR1s
cache sizes
cache-sizeN(R?RRR@RARBRCRD(R
RRERFRGRHR.tvalue_parts((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyR ìs&
%(R7R8R9RR (((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyRRãs	sarm*sppc(64)?s	sparc[64]si[3-7]86|x86_64(((((
R)RRtlandscape.pluginRtlandscape.monitor.pluginRRR<RIRMRRR(((sC/usr/lib/python2.7/dist-packages/landscape/monitor/processorinfo.pyt<module>so (#%			

Youez - 2016 - github.com/yon3zu
LinuXploit