/usr/lib/python3.9/site-packages/dnf/cli/__pycache__
NameSizeModeActions
aliases.cpython-39.opt-1.pyc54920644editdlrm
aliases.cpython-39.pyc54920644editdlrm
cli.cpython-39.opt-1.pyc331390644editdlrm
cli.cpython-39.pyc332010644editdlrm
completion_helper.cpython-39.opt-1.pyc84320644editdlrm
completion_helper.cpython-39.pyc84320644editdlrm
demand.cpython-39.opt-1.pyc15970644editdlrm
demand.cpython-39.pyc15970644editdlrm
format.cpython-39.opt-1.pyc23610644editdlrm
format.cpython-39.pyc23610644editdlrm
main.cpython-39.opt-1.pyc54430644editdlrm
main.cpython-39.pyc54430644editdlrm
option_parser.cpython-39.opt-1.pyc175290644editdlrm
option_parser.cpython-39.pyc175290644editdlrm
output.cpython-39.opt-1.pyc572830644editdlrm
output.cpython-39.pyc573530644editdlrm
progress.cpython-39.opt-1.pyc46690644editdlrm
progress.cpython-39.pyc46690644editdlrm
term.cpython-39.opt-1.pyc118010644editdlrm
term.cpython-39.pyc118220644editdlrm
utils.cpython-39.opt-1.pyc32500644editdlrm
utils.cpython-39.pyc32500644editdlrm
__init__.cpython-39.opt-1.pyc5270644editdlrm
__init__.cpython-39.pyc5270644editdlrm
Edit: /usr/lib/python3.9/site-packages/dnf/cli/__pycache__/utils.cpython-39.pyc (3250B)
a ©!c¨ã@s’dZddlmZddlmZddlmZddlmZddlZ ddl Z ddl Z ddl Z e   e jd¡Ze  d¡Zd d „Zd d „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ÚpsZ status_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 Ús      0