Edit File: server_status.cpython-311.pyc
� L( eV � �H � d dl mZ d dlZd dlZdZd ZdZdZededediZd � Z dS ) � )�absolute_importNz/var/run/lvestats.pid� � zServer is runningzGServer is not running, Use 'service lvestats start' command to start itzalvestats server is dead but pid file exists. Use 'service lvestats restart' command to restart itc � � t t � � 5 } | � � � � � � }ddd� � n# 1 swxY w Y t j t |� � d� � n8# t $ r+}|j t j k rt cY d}~S Y d}~nd}~ww xY wt S # t t f$ r t cY S w xY w)a� Read pid from file. If file is not exists, then server is stopped Send kill signal 0 to check if process exists. Return status. From http://linux.die.net/man/2/kill : "If sig is 0, then no signal is sent, but error checking is still performed; this can be used to check for the existence of a process ID or process group ID." errno.ESRCH == "No such process" :return: Nr )�open�PID_FILE�readline�strip�os�kill�int�OSError�errno�ESRCH�DEAD�RUNNING�IOError�STOPPED)�pid_file�pid�es ��/builddir/build/BUILDROOT/lve-stats-4.2.1-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/commons/server_status.py�check_server_statusr s" � �� �(�^�^� .�x��#�#�%�%�+�+�-�-�C� .� .� .� .� .� .� .� .� .� .� .���� .� .� .� .� ��G�C��H�H�a� � � � ��� � � ��w�%�+�%�%�������� &�%�%�%�%����� ���� ��� �W�� � � ��������sQ �B7 �'A �B7 � A � B7 �A �B7 �"A8 �8 B-�B(�B-�(B-�7C�C) � __future__r r r r r r r �status_descriptionr � � r �<module>r st �� '� &� &� &� &� &� � � � � ����"�� �� ���� � �� V�� m�� �� � � � r