Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/saphana.cpython-312.pyc |
�
-�_g
� �, � d dl mZmZ G d� dee� Zy)� )�Plugin�RedHatPluginc �( � e Zd ZdZdZdZdZd� Zd� Zy)�SaphanazSAP HANA�saphana)�sap)z/hanac �| � g }| j d� �r(| j d� }|D ]2 }t |� dk( s�|j � }|j |� �4 |D ]� }|j � � d�}d|� d�}| j
|� d�|� d��� | j
|� d �|� d
��� | j
|� d�|� d��� | j
|� d
�|� d��� | j d|� d�� s��| j d|� d�� D ]- }d|v s�|j � dd }| j |||� �/ �� y y )Nz/hana/shared� �admzsu - z -cz "HDB info"� _HDB_info��suggest_filenamez "hdbsrvutil -v"�_versionz 'hdbcons "mm l -s -S -p"'� _memusagezS 'hdbcons -e hdbindexserver "replication info"'�_replicainfoz
/hana/shared/�/�HDB���)�
path_isdir�listdir�len�strip�append�lower�add_cmd_output�
get_inst_info)�self�sids�shared�sid�sidadm�prefix�insts �</usr/lib/python3/dist-packages/sos/report/plugins/saphana.py�setupz
Saphana.setup s� � ����?�?�>�*��\�\�.�1�F��
%���s�8�q�=��)�)�+�C��K�K��$�
%�
�
B���I�I�K�=��,�� ����,���#�#�v�h�k�$:�8;�u�I�5F� $� H� �#�#�v�h�.>�$?�8;�u�H�5E� $� G� �#�#�v�h�.J�$K�8;�u�I�5F� $� H� �#�#�v�h� /9� %:�8;�u�L�5I� $� K� �?�?�]�3�%�q�#9�:� $���}�S�E��-C� D� B�� �D�=�#'�:�:�<���#4�D� �.�.�s�F�D�A�B�%
B� +� c �� � d}|� d|� d�}| j |||fz |�� d|� d|� d�}| j |� r#d}|� d|� d �}| j |||fz |�� y
y
)z! Collect the given instance info z7su - %s -c "sapcontrol -nr %s -function GetProcessList"�_�_statusr
z /usr/sap/z/HDBz/exe/python_supportz4su - %s -c "python %s/landscapeHostConfiguration.py"�_landscapeConfigN)r r ) r r r! r# �proc_cmd�status_fname�path�py_cmd�py_fnames r$ r zSaphana.get_inst_info5 s� � �L����a��v�W�-��������~�%�)� �
�
�3�%�t�D�6�)<�=���?�?�4� �K�F���a��v�%5�6�H�����&�$��'�!)�
�
� !r&