Current File : //usr/lib/python2.7/site-packages/sos/plugins/networking.pyo
�
u��ec@s�ddlmZmZmZmZmZddlmZddlm	Z	defd��YZ
de
efd��YZde
eefd	��YZd
S(i����(tPlugintRedHatPlugintUbuntuPlugintDebianPlugintSoSPredicate(tlistdir(tmatcht
NetworkingcBs�eZdZdZdZdZddedefd	d
ddd
dfdddddfddddefdddefgZdZ	d�Z
d�Zd�Zd�Z
RS(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 namespacest
eepromdumps$collect 'ethtool -e' for all devicess-WcCs>d|}d|d}|j|dt|d|g��dS(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_siptables -t s -nvLtpredtkmodsN(tadd_cmd_outputR(tselft	tablenametmodnametcmd((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytcollect_iptable%s
cCs>d|}d|d}|j|dt|d|g��dS(s& Same as function above, but for ipv6 t	ip6table_s
ip6tables -t s -nvLRRN(RR(RRRR((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytcollect_ip6table0s
cCs&|jddt|ddg��dS(sS Collects nftables rulesets with 'nft' commands if the modules
        are present snft list rulesetRRt	nf_tablesN(RR(R((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pytcollect_nftables7scCsAtt|�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/d0d1g�d2}t|d3d4g�}|j|d5|d6t�d7}t|d3d8d9d:d;d<d=gd>id?d36�}|j|d5|d6t�|jd@d5t|d3dAg��|jdBd5t|d3dCg��x�tdD�D]�}|dEkr�q�n|jdF|dG|dH|dI|dJ|dK|dL|dM|dN|dO|dP|dQ|dR|dS|g�|jdT�r�dU|}|jdV|�|j|�q�q�W|jdWdXdYdZg�|jd[�r�|jd\|j�n|jd]�}	d^}
|	d_d`kr=g}|jda�r�dbdcj|jda�j��jddde�}nx|	dfj	�D]}
|
jdg�s|
j�s|
dh j�r>qn|jda�r�tt||
��r|j|
jdi�d`�qq|jdj�d`kr�|j|
jdi�d`�t|�|jdj�kr|jdkdl|jdj��Pqq|j|
jdi�d`�qWx~|D]v}|
|di}|j|dm|d%|dn|d!|j
|d#|d$|j
g�|d7}|j|d5|�qW|jdo�r=x�|D]�}|
|di}|j|dp�}xc|dfj	�D]Q}|dEkr�q�n|j|dF||dH||dI||dJ|g�q�Wq�Wq=ndS(qNs
/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 -agnsip 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 showRtmacsecRtchangessss -peaonmittcp_diagtudp_diagt	inet_diagt	unix_diagtnetlink_diagtaf_packet_diagtrequiredtallsiptables -vnxLtiptable_filtersip6tables -vnxLtip6table_filters/sys/class/net/tbonding_masterssethtool sethtool -d sethtool -i sethtool -k sethtool -S sethtool -T sethtool -a sethtool -c sethtool -g sethtool -P sethtool -l sethtool --phy-statistics sethtool --show-priv-flags sethtool --show-eee Rs
ethtool -e %ss�WARNING (about to collect '%s'): collecting an eeprom dump is known to cause certain NIC drivers (e.g. bnx2x/tg3) to interrupt device operationsbridge -s -s -d link showsbridge -s -s -d -t fdb showsbridge -s -s -d -t mdb showsbridge -d vlan showRs/bin/traceroute -n %ssip netnssip netns exec tstatusiRs(?:%s$)s$|t*s.*toutputsObject "netns" is unknownit RsLimiting namespace iteration sto first %s namespaces foundsip address shows
iptables-saveRsls -1 /sys/class/net/( tsuperRtsetupt
add_copy_spectadd_forbidden_pathRtopentreadtIOErrort
splitlinesRRR tns_wideRtTrueRt
get_optiont	_log_warnt
trace_hosttcollect_cmd_outputtjointsplittreplacet
startswithtisspacetboolRtappendt	partitiontlentexec_cmd(Rtip_tables_namesttabletip_macsec_show_cmdtmacsec_predtss_cmdtss_predtethRtip_netnst
cmd_prefixtout_nstpatterntlinet	namespacet
ns_cmd_prefixtnetns_netdev_list((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR8@s4









		
	
	 	



 (R	R
ssystem(t__name__t
__module__t__doc__tplugin_nametprofilesRCtFalseR@toption_listR?RRR R8(((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_pkgstintR?t	ExceptionR7ReR8(Rtnetstat_pkg((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR8%s
(R^R_RCR8(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyRe"stUbuntuNetworkingcBseZdZd�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 listRs/usr/sbin/traceroute -n %s(R7RmR8R9RRARC(R((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyR86s"

(R^R_RCR8(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyRm3sN(
tsos.pluginsRRRRRtosRtreRRReRm(((s:/usr/lib/python2.7/site-packages/sos/plugins/networking.pyt<module>	s(�