Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/ebpf.cpython-312.pyc |
�
-�_gq � �8 � d dl Z d dlmZmZmZ G d� dee� Zy)� N)�Plugin�IndependentPlugin� PluginOptc �H � e Zd ZdZdZdZdZ edded�� gZ d � Z
d
� Zd� Zy)�Ebpfz eBPF tool�ebpf)�system�kernel�network)�bpftool�
namespacesNz0Number of namespaces to collect, 0 for unlimited)�default�val_type�descc �� � g } t j |� }t |� D ] \ }}d|v s�|j |d � � |S # t $ r }| j d|� �� |cY d}~S d}~ww xY w)z! Collect the list of program IDs z"Couldn't parse bpftool prog list: N�id��json�loads� Exception� _log_info� enumerate�append)�self� prog_json�out� prog_data�err�_�items �9/usr/lib/python3/dist-packages/sos/report/plugins/ebpf.py�get_bpftool_prog_idszEbpf.get_bpftool_prog_ids s} � ��� ��
�
�9�-�I� !��+� '�G�A�t��t�|��
�
�4��:�&� '� �
��
� ��N�N�?��u�E�F��J�� �� �A � A0�A+�%A0�+A0c �� � g } t j |� }t |� D ] \ }}d|v s�|j |d � � |S # t $ r }| j d|� �� |cY d}~S d}~ww xY w)z Collect the list of mapIDs z"Could not parse bpftool map list: Nr r )r �map_jsonr �map_datar r r s r! �get_bpftool_map_idszEbpf.get_bpftool_map_ids&