Current File : //usr/lib/python2.7/site-packages/sos/plugins/ebpf.pyo |
�
u��ec @ sQ d d l m Z m Z m Z m Z d d l Z d e e e e f d � � YZ d S( i����( t Plugint RedHatPlugint DebianPlugint UbuntuPluginNt Ebpfc B s5 e Z d Z d Z d Z d � Z d � Z d � Z RS( s eBPF tool
t ebpft systemt kernelt networkc C s� g } y t j | � } Wn% t k
r@ } | j d | � | SXxB t t | � � D]. } d | | k rT | j | | d � qT qT W| S( Ns- Could not parse bpftool prog list as JSON: %st id( t jsont loadst Exceptiont _log_infot ranget lent append( t selft prog_jsont outt prog_datat et item( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/ebpf.pyt get_bpftool_prog_ids s c C s� g } y t j | � } Wn% t k
r@ } | j d | � | SXxB t t | � � D]. } d | | k rT | j | | d � qT qT W| S( Ns, Could not parse bpftool map list as JSON: %sR ( R
R R R
R R R ( R t map_jsonR t map_dataR R ( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/ebpf.pyt get_bpftool_map_ids s c C sz | j d � } xI | j | d � D]4 } x+ d d g D] } | j d | | f � q6 Wq# W| j d � } x, | j | d � D] } | j d | � q~ W| j d d d
d g � | j d � } d
} | d d k rvg } xc | d j � D]Q } | j d � s� | j � s� | d j � r%q� n | j | j d � d � q� Wx0 | D]% }
| |
d } | j | d � qJWn d S( Ns bpftool -j prog listt outputt xlatedt jiteds bpftool prog dump %s id %ss bpftool -j map lists bpftool map dump id %ss bpftool prog lists bpftool map lists bpftool cgroup trees bpftool net lists ip netnss ip netns exec t statusi s Object "netns" is unknowni t (
t collect_cmd_outputR t add_cmd_outputR t exec_cmdt
splitlinest
startswitht isspaceR t partition( R t progst prog_idt dumpcmdt mapst map_idt ip_netnst
cmd_prefixt out_nst linet namespacet
ns_cmd_prefix( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/ebpf.pyt setup+ s4
( s systemR R ( t __name__t
__module__t __doc__t plugin_namet profilesR R R2 ( ( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/ebpf.pyR
s ( t sos.pluginsR R R R R
R ( ( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/ebpf.pyt <module> s "