????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/sos/plugins/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/sos/plugins/networking.pyo

�
Dr^c@s�ddlmZmZmZmZddlmZddlmZdefd��YZ	de	efd��YZ
de	eefd	��YZd
S(i����(tPlugintRedHatPlugintUbuntuPlugintDebianPlugin(tlistdir(tmatcht
NetworkingcBs�eZdZdZdZdZddedefd	d
ddd
dfdddddfddddefgZdZ	d�Z
d�Zd�Zd�Z
d�ZRS(s%network and device configuration
    t
networkingtnetworkthardwaretsystemswww.example.comt
traceroutescollect a traceroute to %stslowtnamespace_patterns"Specific namespaces pattern to be s@collected, namespaces pattern should be separated by whitespace sas for example "eth* ens2"tfasttt
namespacess2Number of namespaces to collect, 0 for unlimited. s5Incompatible with the namespace_pattern plugin optionitethtool_namespacess%Define if ethtool commands should be scollected for namespacess-WcCs�g}yt|�j�}Wntk
r0|SXx]|j�D]O}|jd�so|j�so|d j�rs|S|j|jd�d�q>W|S(suReturns a list for which items are namespaces in the output of
        ip netns stored in the ip_netns_file.
        sObject "netns" is unknownit i(topentreadtIOErrort
splitlinest
startswithtisspacetappendt	partition(tselft
ip_netns_filetouttip_netns_outtline((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytget_ip_netns#s
cCs?d|}|jd|�r;d|d}|j|�ndS(sB When running the iptables command, it unfortunately auto-loads
        the modules before trying to get output.  Some people explicitly
        don't want this, so check if the modules are loaded before running
        the command.  If they aren't loaded, there can't possibly be any
        relevant rules in that table tiptable_sgrep -q %s /proc/modulessiptables -t s -nvLN(tcheck_ext_progtadd_cmd_output(Rt	tablenametmodnametcmd((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytcollect_iptable5s
cCs?d|}|jd|�r;d|d}|j|�ndS(s& Same as function above, but for ipv6 t	ip6table_sgrep -q %s /proc/moduless
ip6tables -t s -nvLN(R"R#(RR$R%R&((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytcollect_ip6tableAs
cCs#|jd�r|jd�ndS(sS Collects nftables rulesets with 'nft' commands if the modules
        are present sgrep -q nf_tables /proc/modulessnft list rulesetN(R"R#(R((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytcollect_nftablesIscCs�tt|�j�|jddddddddd	d
ddd
ddddg�|jddddddg�|jddd�|jddd�|jd�ytd�j�}Wntk
r�d}nXx!|j	�D]}|j
|�q�Wytd �j�}Wntk
r(d}nXx!|j	�D]}|j|�q6W|j�|jd!|j
dd"�|jd#d$|j
d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3g�|jd4�r�|jd5�n|jd6�r�|jd7�nx�td8�D]�}|d9krqn|jd:|d;|d<|d=|d>|d?|d@|dA|dB|dC|dD|dE|dF|dG|dH|g�qW|jdIdJdKdLg�|jdM�r�|jdN|j�n|jdO�}dP}|r�|jdQ�r/dRdSj|jdQ�j��jdTdU�}ng}t|dV��}|j�}	WdQXx|	j	�D]}
|
jdW�sf|
j�sf|
dX j�r�qfn|jdQ�r�tt||
��rj|j|
jdY�dZ�qjqf|jd[�dZkrP|j|
jdY�dZ�t|�|jd[�krj|jd\d]|jd[��Pqjqf|j|
jdY�dZ�qfWxh|D]`}||dY}|j|d^|d&|d_|d%|d!|j
|d#|d$|j
g�quW|jd`�r�x�|D]�}||dY}|j|da�}
xc|
dbj	�D]Q}|d9kr?q'n|j|d:||d<||d=||d>|g�q'Wq�Wq�ndS(cNs
/proc/net/s/etc/nsswitch.confs/etc/yp.confs/etc/inetd.confs/etc/xinetd.confs
/etc/xinetd.ds
/etc/host*s/etc/resolv.confs
/etc/network*s
/etc/nftabless/etc/sysconfig/nftables.confs/etc/nftables.confs
/etc/dnsmasq*s!/sys/class/net/*/device/numa_nodes/sys/class/net/*/flagss/sys/class/net/*/statistics/s
/etc/iproute2s/proc/net/rpc/use-gss-proxys/proc/net/rpc/*/channels/proc/net/rpc/*/flushs
/proc/net/cdps/sys/net/cdps/proc/net/eicons
ip -o addrtroot_symlinktip_addrsroute -ntroutet
plotnetcfgs/proc/net/ip_tables_namessnat
mangle
filter
s/proc/net/ip6_tables_namessnetstat %s -neopatnetstats
netstat -ssnetstat %s -agnsss -peaonmisip route show table allsip -6 route show table alls
ip -4 rules
ip -6 rules
ip -s -d links
ip -d addresssifenslave -asip mroute shows
ip maddr showsip -s -s neigh showsip neigh show nud noarpsbiosdevname -dstc -s qdisc showsip -s macsec shows$grep -q iptable_filter /proc/modulessiptables -vnxLs%grep -q ip6table_filter /proc/modulessip6tables -vnxLs/sys/class/net/tbonding_masterssethtool sethtool -d sethtool -i sethtool -k sethtool -S sethtool -T sethtool -a sethtool -c sethtool -g sethtool -e sethtool -P sethtool -l sethtool --phy-statistics sethtool --show-priv-flags sethtool --show-eee sbridge -s -s -d link showsbridge -s -s -d -t fdb showsbridge -s -s -d -t mdb showsbridge -d vlan showRs/bin/traceroute -n %ssip netnssip netns exec R
s(?:%s$)s$|t*s.*trsObject "netns" is unknowniRiRsLimiting namespace iteration sto first %s namespaces foundsip address shows
iptables-saveRsls -1 /sys/class/net/toutput(tsuperRtsetupt
add_copy_spectadd_forbidden_pathR#RRRRR'R)R*tns_wideR"Rt
get_optiont
trace_hosttget_cmd_output_nowtjointsplittreplaceRRtboolRRRtlent	_log_warnt
call_ext_prog(Rtip_tables_namesttabletethRt
cmd_prefixtpatterntout_nstfiletip_netnsRt	namespacet
ns_cmd_prefixtnetns_netdev_list((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR5Ps










	 	

	
 (RR	ssystem(t__name__t
__module__t__doc__tplugin_nametprofilesR:tFalsetTruetoption_listR8R R'R)R*R5(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyRs&


				tRedHatNetworkingcBseZdZd�ZRS(srhn.redhat.comcCsky@|jjj�d}t|dd�dkr?d|_nWntk
rSnXtt|�j�dS(Ns	net-toolstversioniis-T(	tpolicytpackage_managertall_pkgstintR8t	ExceptionR4RVR5(Rtnetstat_pkg((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR5s
(RNROR:R5(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyRVstUbuntuNetworkingcBseZdZd�ZRS(sarchive.ubuntu.comcCs{tt|�j�|jddddddddd	d
g
�|jddg�|jd
�rw|jd|j�ndS(Ns/etc/resolvconfs/etc/network/interfacess/etc/network/interfaces.ds/etc/ufws/var/log/ufw.Logs/etc/resolv.confs/run/netplan/*.yamls/etc/netplan/*.yamls/lib/netplan/*.yamls/run/systemd/networks/usr/sbin/ufw statuss/usr/sbin/ufw app listRs/usr/sbin/traceroute -n %s(R4R^R5R6R#R9R:(R((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR5(s"

(RNROR:R5(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR^%sN(tsos.pluginsRRRRtosRtreRRRVR^(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyt<module>	s"�