uawdijnntqw1x1x1
IP : 3.145.184.248
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
..
/
lib
/
python2.7
/
site-packages
/
rhn
/
..
/
iotop
/
ui.pyo
/
/
� B��Qc@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z mZmZmZddlmZddlmZddlmZddlmZdd d ddd dgZd�Zd�Zd�Zd�Zd�Ze�Zdefd��YZ defd��YZ!defd��YZ"defd��YZ#defd��YZ$de%fd��YZ&d �Z'd!�Z(d"�Z)d#e j*d$Z+d%�Z,dS(&i����(tprint_functionN(t find_uidstTaskStatsNetlinktProcessListtStats(t ThreadInfo(tVERSION(tioprio(tIoprioSetErrortBtKtMtGtTtPtEcCs||dkrd}n |dkr1d}|}ndSttj|dd�d�}d|t|�dd|>t|fS( Nitt-s0.00 Bii s %s%.2f %si(tinttmathtlogtfloattUNITS(tsizetsigntexpo((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt human_size-s cCs|jrd|dSt|�S(Ns%.2f Kg�@(t kilobytesR(toptionstbytes((s,/usr/lib/python2.7/site-packages/iotop/ui.pytformat_size9s cCs!t||ot|�|�dS(Ns/s(RR(RRtduration((s,/usr/lib/python2.7/site-packages/iotop/ui.pytformat_bandwidth>scs��fd�}�jrF|j}�fd�}tj�|j�n|j}�fd�}||j�}||j�}||j��}|j|j } t d| �} || ��} |||| fS(Ncsdtd|�d�S(Ns%.2f %%g��(\�X@g�cA(tmin(tdelay(R(s,/usr/lib/python2.7/site-packages/iotop/ui.pyt delay2percentDscs t�|�S(N(R(RR(R(s,/usr/lib/python2.7/site-packages/iotop/ui.pyt<lambda>Hscst�||�S(N(R (RR(R(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$Lsi(taccumulatedtstats_accumttimetstats_accum_timestamptstats_deltatblkio_delay_totaltswapin_delay_totalt read_bytestwrite_bytestcancelled_write_bytestmax(RtprocessRR#tstatstdisplay_formattio_delaytswapin_delayR,t written_bytesR-((RRs,/usr/lib/python2.7/site-packages/iotop/ui.pytformat_statsAs cCsEy ttd�j�j��SWntk r@}t|�dSXdS(Ns/proc/sys/kernel/pid_maxi(tlentopentreadtstript Exceptiontprint(te((s,/usr/lib/python2.7/site-packages/iotop/ui.pytget_max_pid_widthVs tCancelInputcBseZRS((t__name__t __module__(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR?dst InvalidIntcBseZRS((R@RA(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyRBest InvalidPidcBseZRS((R@RA(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyRCfst InvalidTidcBseZRS((R@RA(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyRDgstInvalidIoprioDatacBseZRS((R@RA(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyREhstIOTopUIc BseZd�efd�efd�efd�efd�efd�efd�efd�efgZd�Zd �Zd �Zd�Zd�Z ded �Zded�Zd�Z d�Zd�Zd�Zdd�Zdd�Zd�Zd�Zd�Zd�ZRS(cCs|jS(N(tpid(tpts((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$qscCs |j�S(N(tioprio_sort_key(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$rscCs |j�S(N(tget_user(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$sscCs|jS(N(R,(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$tscCs|j|jS(N(R-R.(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$uscCs|jS(N(R+(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$vscCs!|jp t|jp|j�S(N(R*RR,R-(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$ys cCs |j�S(N(tget_cmdline(RHRI((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR${scCs�||_||_d|_tj|jd|_|jjs�||_|j�y%t j �t j�t jd�Wq�t j k r�q�XndS(Niii(tprocess_listRtsorting_keyRFtsorting_keystsorting_reversetbatchtwintresizetcursestuse_default_colorststart_colortcurs_setterror(tselfRRRMR((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt__init__~s cCs|jj�\|_|_dS(N(RRtgetmaxyxtheighttwidth(RY((s,/usr/lib/python2.7/site-packages/iotop/ui.pyRS�sc Cs�d}tj�}|jjsD|jtjj�tjtj B�nx�|jj dksk||jj kr�|jj �\}}|j|dk|||jj�|jj dk r�|d7}||jj kr�Pq�n|dkr�d}ny|j|jjd�}WnAtjk rL}|jrF|jdtjkrFg}qM�nXx8|D]0\}}|tjtjB@rTtjd�qTqTW|jjs�|j�n|rG|jj�} |j| �qGqGWdS(Niig@�@(tselecttpollRRQtregistertsyststdintfilenotPOLLINtPOLLPRIt iterationstNoneRMtrefresh_processestrefresh_displayRt delay_secondsRXtargsterrnotEINTRtPOLLERRtPOLLHUPtexitRSRRtgetcht handle_key( RYRfR_ttotaltactualteventsR=tfdteventtkey((s,/usr/lib/python2.7/site-packages/iotop/ui.pytrun�s:& cCs|j|_dS(N(RP(RY((s,/usr/lib/python2.7/site-packages/iotop/ui.pytreverse_sorting�scCs||j}|j|7_td|j�|_tttj�d|j�|_||jkrxtj|jd|_ndS(Nii(RNR/R!R7RFRORP(RYtdeltatorig_sorting_key((s,/usr/lib/python2.7/site-packages/iotop/ui.pytadjust_sorting_key�s "cCs�|jjddtd�tjB|j�|jjdd|tj�|jj�tj �tj d�|jjdt|��}tj d�tj �|dkr�|S|r�t��n|S(Niit R(NR(RRthlinetordRTtA_NORMALR]taddstrtA_BOLDtrefreshtechoRWtgetstrR7tnoechoRgR?(RYtprompttdefaulttempty_is_canceltinp((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt prompt_str�s) cCsD|j|||�}yt|�SWntk r?t��nXdS(N(R�Rt ValueErrorRB(RYR�R�R�R�((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt prompt_int�s cCsEy|jd�SWn-tk r-t��ntk r@�nXdS(NsPID to ionice: (R�RBRCR?(RY((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt prompt_pid�s cCsEy|jd�SWn-tk r-t��ntk r@�nXdS(NsTID to ionice: (R�RBRDR?(RY((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt prompt_tid�s cCs�yA|dk r+|jd||t�}n|jddt�}Wntk r]t��nX|dksv|dkr�t��n|S(Ns'I/O priority data (0-7, currently %s): sI/O priority data (0-7): ii(RgR�tFalseRBRE(RYtioprio_dataR�((s,/usr/lib/python2.7/site-packages/iotop/ui.pytprompt_data�s c Csy|j|�}Wntk r,d}nXt|�d}x�tr�|jjddtd�tjB|j �|jj dd|tj�t|�}xnt|�D]`\}}d|} ||kr�tj } n tj} |jj d|| | �|t| �7}q�Wx�tr�|jj�}|tjtd�fkrU|dkrU|d8}Pq|tjtd�fkr�||kr�|d7}Pq|tjtd�td �fkr�||S|d tjtjtjtd�td�fkrt��qqWq@WdS( Ni����iiR~s %s tltrs s itqtQ(tindexR�R7tTrueRRRR�RTR�R]tinsstrR�t enumeratet A_REVERSERqtKEY_LEFTt KEY_RIGHTt KEY_ENTERt KEY_CANCELt KEY_CLOSEtKEY_EXITR?(RYR�tdisplay_listtret_listtselectedtset_lentoffsettititemtdisplaytattrRx((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt prompt_set�s: ) ' ' $!cCsUd}dddg}dddg}|dkr9d}n|j||||�}|S( NsI/O priority class: s Real-timesBest-efforttIdletrttbetidlei(RgR�(RYtioprio_classR�tclasses_prompttclasses_retR�((s,/usr/lib/python2.7/site-packages/iotop/ui.pytprompt_classs sError!cCsg|jjddtd�tjB|j�|jjddd|tj�|jj�t j d�dS(NiiR~s %s (RRRR�RTR�R]R�R�R�R'tsleep(RYRX((s,/usr/lib/python2.7/site-packages/iotop/ui.pytprompt_errors) cCs:|jjddtd�tjB|j�|jj�dS(NiiR~(RRRR�RTR�R]R�(RY((s,/usr/lib/python2.7/site-packages/iotop/ui.pytprompt_clear"s)csb�fd�}�fd�}�fd�}�fd�}id�td�6d�td�6�fd �td �6�fd�td�6|td �6|td�6|td�6|td�6|td�6|td�6|td�6|td�6�fd�tj6�fd�tj6�fd�tj6�fd�tj6}|j|d��}|�dS(Ncs�jjtN_dS(N(RR%R�((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyttoggle_accumulated'scs�jjtN_dS(N(RtonlyR�((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyttoggle_only_io)scs0�jjtN_�jj��jj�dS(N(Rt processesR�RMtclearRh((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyttoggle_processes+s cs�y��jjr0�j�}�jj|�}n!�j�}t|�jj�}|j�}t j |�\}}�j|�}|dkr�d}n�j|�}|j ||��jj��jj�Wn�tk r�}�jd|j�n�tk r�jd�n|tk r3�jd�n_tk rP�jd�nBtk rm�jd�n%tk r��j�nX�j�dS(NR�isError setting I/O priority: %ssInvalid process id!sInvalid thread id!sInvalid I/O priority data!sInvalid integer!(RR�R�RMtget_processR�Rttaskstats_connectiont get_ioprioRtto_class_and_dataR�R�t set_ioprioR�RhRR�terrRCRDRERBR?R�(RGt exec_unitttidtioprio_valueR�R�R=(RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pytionice/s: cSs tjd�S(Ni(RaRp(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$TsR�cSs tjd�S(Ni(RaRp(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$VsR�cs �j�S(N(Rz((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$XsR�cs �j�S(N(Rz((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$ZstRtatAtotORHRR�tIcs �jd�S(Ni����(R}((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$lscs �jd�S(Ni(R}((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$nscs�jttj��S(N(R}R7RFRO((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$pscs�jttj��S(N(R}R7RFRO((RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$rscSsdS(N(Rg(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$us(R�RTR�R�tKEY_HOMEtKEY_ENDtget(RYRxR�R�R�R�tkey_bindingstaction((RYs,/usr/lib/python2.7/site-packages/iotop/ui.pyRr&s.# cs��fd�}�fd�}tt|�jjj���}tj�jd��jj rkd��n d��|j d��fd�d�j��jjs�|�j d 3ntt||��S( Nc s<t�j|�jj�}|\}}}}tjrId||f}nd}dt}|d|j|j�|j �d |||f}|j �} �jjs�jt |�} d| ko�t | �knr| dd}| |d}| | d| |} qn|| 7}�jjs8|�j }n|S( Ns%7s %7s s ?unavailable? s%%%dds %4s %-8s %11s %11s %siiit~(R6RRMRRthas_blkio_delay_totalt MAX_PID_WIDTHRGR�RKRLRQR]R7( RHR1R3R4R,R-tdelay_statst pid_formattlinetcmdlinetremaining_lengthtlen1toffset2(RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pytformatys( " cs �jjp|j�jj�S(N(RR�tdid_some_ioR%(RH(RY(s,/usr/lib/python2.7/site-packages/iotop/ui.pyt should_format�s icSs|jS(N(R&(RH((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$�scSs|jS(N(R)(RH((s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$�sRxcs�|�|��S(N((RH(Rxtstats_lambda(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$�streversei(tlisttfilterRMR�tvaluesRFRORNRR%tsortRPRQR\tmap(RYR�R�R�((RxRYR�s,/usr/lib/python2.7/site-packages/iotop/ui.pytget_dataxs cs)dt�j|d|�jd�t�j|d|�jd�fdt�j|d|�jd�t�j|d|�jd�fg�tdtd�d}�jjr�|d7}n |d 7}|d ddd dddg}�j�}�jjrYdg|}tjd�}g|D]} || ^q#}g�D]} || ^q@�n�jj r��jj dkr�x�D]} t| �q~W�jj t|�kr�tdj |��q�nx|D]} t| �q�Wtjj�n7�jj�x7t��D])\�} �jj�d| �j �qW�jjt��dtd�tjB�j��j}x�tt|��D]��tj}|�} ��jkr�| d} n��jkr�|tjO}| �jr�dp�d7} n| | } |t| �8}�jj| |�q�Wtj r0d}nd}t"t|��j#dtt$|���}x�t|�D]s�yV���fd�}y||��Wn(t%k r�||�j&d��nXWqotj'k r�qoXqoW|r�jj(�j#t��d|tj�n�jj)�dS(Ns,Total DISK READ : %s | Total DISK WRITE : %siiis,Actual DISK READ: %s | Actual DISK WRITE: %siR~tPIDtTIDs PRIOs USERs DISK READs DISK WRITEs SWAPINs IOs COMMANDs TIMEs %H:%M:%S iRt>t<sNCONFIG_TASK_DELAY_ACCT not enabled in kernel, cannot determine SWAPIN and IO %cs(�jj�t��dd|�dS(Nii(RRR�R7(R�(R�RYtsummary(s,/usr/lib/python2.7/site-packages/iotop/ui.pyt print_line�ssutf-8(*R RtrjustR/R�R�R�R'tstrftimeRQtquietR<RtjoinRatstdouttflushRRteraseR�R�R]RR7R�RTR�trangeRNR�RPRR�RgR!R\tbooltUnicodeEncodeErrortencodeRXR�R�(RYt first_timeRsRtRRGttitlestlinestcurrent_timeR�RItremaining_colsR�ttitlet status_msgt num_linesR�((R�RYR�s,/usr/lib/python2.7/site-packages/iotop/ui.pyRi�sz#) !% , N(R@RAR�R�RORZRSRyRzR}RgR�R�R�R�R�R�R�R�R�RrR�Ri(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyRFns4 ! R )cCs�|jr"tjtjtj�n/d�}tjtj|�tjtj|�t|�}t||�}t|||�}|j �dS(Nc_stjd�dS(Ni(RaRp(Rktkwargs((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt clean_exit�s( RQtsignaltSIGPIPEtSIG_DFLtSIGINTtSIGTERMRRRFRy(RRRRR�RMtui((s,/usr/lib/python2.7/site-packages/iotop/ui.pytrun_iotop_window�s cCs�y*|jrtd|�Stjt|�SWn^tk r�}|jtjkr�t|dt j �tddt j �t jd�q��nXdS(Ntfiles� The Linux kernel interfaces that iotop relies on now require root priviliges or the NET_ADMIN capability. This change occured because a security issue (CVE-2011-2494) was found that allows leakage of sensitive data across user boundaries. If you require the ability to run iotop as a non-root user, please configure sudo to allow you to run iotop as root. Please do not file bugs on iotop about this.i(RQR RgRTtwrappertOSErrorRltEPERMR<RatstderrRp(RR=((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt run_iotop�s cCsd}yQddl}ddl}td�|jdt�t�|�|j|�}Wnqtk r�ddl}ddl }|j |dd�}td�|j|�|j�|j j|�}nX|j�|jdd �|jd �|jd �tj|�dS(Ns iotop.profi����sProfiling using cProfilescontinuation()t lineeventsisProfiling using hotshotR'tcallsi2(tcProfiletpstatsR<trunctxtglobalstlocalsRtImportErrorthotshott hotshot.statstProfiletruncalltcloseR1tloadt strip_dirst sort_statstprint_statst print_calleestostremove(tcontinuationt prof_fileRRR1Rtprof((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt_profiles( sF%s [OPTIONS] DISK READ and DISK WRITE are the block I/O bandwidth used during the sampling period. SWAPIN and IO are the percentages of time the thread spent respectively while swapping in and waiting on I/O more generally. PRIO is the I/O priority at which the thread is running (set using the ionice command). Controls: left and right arrows to change the sorting column, r to invert the sorting order, o to toggle the --only option, p to toggle the --processes option, a to toggle the --accumulated option, i to change I/O priority, q to quit, any other key to force a refresh.ic s�ytjtjd�Wntjk r7td�nXtjdtddt�}|j dddd d ddt d d�|j dddd d dd d�|j ddddd dddd d�|j ddddd dd ddd dd!�|j d"d#ddd d$dd%d d&dd'�|j d(d)dd*d d+dd%d d,dd-�|j d.d/dd d d0dt d d1�|j d2d3dd d d4dt d d5�|j d6d7dd d d8dt d d9�|j d:d;dd d d<d d=�|j d>d?dd@d dAddBd dC�|j dDdd d dEdt d tj�|j�\�}|ro|j dFdGj|��nt���jp�g�_�jp��jp��j�_�fdH���jr��fdI�}t|�n��dS(JNRs8unable to set locale, falling back to the default localetusagetversionsiotop s-os--onlyR�t store_truetdestR�R�thelps1only show processes or threads actually doing I/Os-bs--batchRQsnon-interactive modes-ns--iterttypeRRftmetavartNUMs-number of iterations before ending [infinite]s-ds--delayRRjs#delay between iterations [1 second]tSECis-ps--pidtpidstappends"processes/threads to monitor [all]R�s-us--usertstrtuserssusers to monitor [all]tUSERs-Ps--processesR�s$only show processes, not all threadss-as --accumulatedR%s)show accumulated I/O instead of bandwidths-ks--kilobytesRs.use kilobytes instead of a human friendly units-ts--timeR's.add a timestamp on each line (implies --batch)s-qs--quiettcountR�is/suppress some lines of header (implies --batch)s --profiletprofilesUnexpected arguments: R~cs t��S(N(R((R(s,/usr/lib/python2.7/site-packages/iotop/ui.pyR$bscsy��WnnXdS(N(((t main_loop(s,/usr/lib/python2.7/site-packages/iotop/ui.pytsafe_main_loopes(tlocalet setlocaletLC_ALLtErrorR<toptparsetOptionParsertUSAGERt add_optionR�t SUPPRESS_HELPt parse_argsRXR�RR1RQR'R�R7R'(tparserRkR9((R8Rs,/usr/lib/python2.7/site-packages/iotop/ui.pytmain6s\ ! ! ! (-t __future__RRTRlR:RR>R"R^RRaR't iotop.dataRRRRRt iotop.versionRtiotopRtiotop.ioprioRRRRR R6R>R�R;R?RBRCRDREtobjectRFR RR'targvR@RE(((s,/usr/lib/python2.7/site-packages/iotop/ui.pyt<module>sD" �} $
/home/../lib/python2.7/site-packages/rhn/../iotop/ui.pyo