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/computerinfo.pyc
ó
}9Rc@sŽddlZddlZddlmZddlmZmZddlmZddl	m
Z
defd„ƒYZde
fd	„ƒYZ
dS(
i’’’’N(t	read_file(tLSB_RELEASE_FILENAMEtparse_lsb_release(tget_fqdn(t
MonitorPlugintDistributionInfoErrorcBseZRS((t__name__t
__module__(((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR
stComputerInfocBsƒeZdZdZededd„Zd„Zed„Z	ed„Z
ed„Zd	„Zd
„Z
d„Zd„Zd
„ZRS(s7Plugin captures and reports basic computer information.s
computer-infos
/proc/meminfot/cCs(||_||_||_||_dS(N(t	_get_fqdnt
_meminfo_filet_lsb_release_filenamet
_root_path(tselfRtmeminfo_filetlsb_release_filenamet	root_path((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyt__init__s			cCsUtt|ƒj|ƒ|jj|_|jd|jtƒ|jd|j	tƒdS(Ns
computer-infosdistribution-info(
tsuperRtregistertconfigtannotations_patht_annotations_pathtcall_on_acceptedtsend_computer_messagetTruetsend_distribution_message(Rtregistry((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyRs	
	cCsI|jƒ}|rEd|d<tjdƒ|jjj|d|ƒndS(Ns
computer-infottypes,Queueing message with updated computer info.turgent(t_create_computer_info_messagetloggingtinfoRtbrokertsend_message(RRtmessage((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR$s


cCsI|jƒ}|rEd|d<tjdƒ|jjj|d|ƒndS(Nsdistribution-infoRs0Queueing message with updated distribution info.R(t!_create_distribution_info_messageR R!RR"R#(RRR$((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR+s


cCs<|jj}|jd|j|ƒ|jd|j|ƒdS(Ns
computer-infosdistribution-info(RR"tcall_if_acceptedRR(RRR"((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pytexchange2s
	
	cCsŌi}|j|d|jƒƒ|jƒ\}}|j|d|ƒ|j|d|ƒi}tjj|jƒr“x?tj|jƒD](}ttjj	|j|ƒƒ||<q…Wn|rŠ|j|d|ƒn|S(Nthostnamestotal-memorys
total-swaptannotations(
t_add_if_newR
t_get_memory_infotostpathtexistsRtlistdirRtjoin(RR$ttotal_memoryt
total_swapR)tkey((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR9s
&cCs<||jj|ƒkr8|jj||ƒ|||<ndS(N(t_persisttgettset(RR$R3tvalue((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR*KscCs?|jƒ}||jjdƒkr;|jjd|ƒ|SdS(Nsdistribution-info(t_get_distribution_infoR4R5R6tNone(RR$((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR%Ps
cCs®i}t|jƒ}xr|D]j}|dkr|jdƒ}|d}|d	kr†t|djƒjdƒdƒ}|||<q†qqW|jƒ|dd|ddfS(
s>Get details in megabytes and return a C{(memory, swap)} tuple.s
t:itMemTotalt	SwapTotalit i(R;R<(topenRtsplittinttstriptclose(RR$tfiletlinetpartsR3R7((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR+Ws

#
cCs i}|jt|jƒƒ|S(s#Get details about the distribution.(tupdateRR(RR$((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyR8es(RRt__doc__tpersist_nameRRRRtFalseRRR'RR*R%R+R8(((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyRs					(R,R tlandscape.lib.fsRtlandscape.lib.lsb_releaseRRtlandscape.lib.networkRtlandscape.monitor.pluginRt	ExceptionRR(((sB/usr/lib/python2.7/dist-packages/landscape/monitor/computerinfo.pyt<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit