/usr/lib64/python2.6/site-packages/psutil
NameSizeModeActions
error.py6110644editdlrm
error.pyc6200644editdlrm
error.pyo6200644editdlrm
_common.py59630644editdlrm
_common.pyc72880644editdlrm
_common.pyo72880644editdlrm
_compat.py96050644editdlrm
_compat.pyc99380644editdlrm
_compat.pyo99380644editdlrm
_error.py20310644editdlrm
_error.pyc30730644editdlrm
_error.pyo30730644editdlrm
_psbsd.py119490644editdlrm
_psbsd.pyc139600644editdlrm
_psbsd.pyo139600644editdlrm
_pslinux.py387900644editdlrm
_pslinux.pyc327710644editdlrm
_pslinux.pyo327270644editdlrm
_psmswindows.py161250644editdlrm
_psmswindows.pyc175780644editdlrm
_psmswindows.pyo175780644editdlrm
_psosx.py101000644editdlrm
_psosx.pyc126700644editdlrm
_psosx.pyo126700644editdlrm
_psposix.py38540644editdlrm
_psposix.pyc37830644editdlrm
_psposix.pyo37420644editdlrm
__init__.py493080644editdlrm
__init__.pyc469940644editdlrm
__init__.pyo469940644editdlrm
Edit: /usr/lib64/python2.6/site-packages/psutil/__init__.pyc (46994B)
Rc&@ s;dZddklZdZegZeidD]Zeeeq3[Z ddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'g#Z dd(k Z dd(k Z dd(k Z dd(kZdd(kZdd(kZdd(kZydd(kZWnej o eZnXdd)klZlZlZlZdd*klZdd+klZlZlZl Z l!Z"l#Z$dd,kl%Z&l'Z(l)Z*l+Z,l-Z.dd-kl/Z/l0Z0l1Z1l2Z2l3Z3l4Z4l5Z5l6Z6l7Z7l8Z8e i9i:d.oSdd(k;i<Z=dd/k;l>Z>l?Z?l@Z@lAZAlBZBlCZCe=i>Z>e=i?Z?ne i9i:d0oAdd(kDiEZ=dd1kDlFZFlGZGlHZHlIZIlJZJlKZKn`e i9i:d2odd(kLiMZ=n:e i9i:d3odd(kNiOZ=nePd4e i9e iQe=iRe=iSZSe=iTZTe=iUZUd5ZVdeWfd6YZXdeXfd7YZYe=iZZZe=i[Z[hZ\d8Z]e^d9Z_e_a`e_d:eaabd;e^d<Zct`adtbaeeafd;e^d=Zgd>Zhd?Zid@Zje^dAZke^dBZle^dCZmdDZndEZoe&dFZpe&dGZqe&dHdIZre&dJdKZse&dLdMZte&dNdOZue&dPdQZve&dRdSZwdTZxeydUjo exn[[[e i dVdWfjo[nd(S(Xspsutil is a module providing convenience functions for managing processes and gather system information in a portable way by using Python. i(tdivisions0.7.0t.tErrort NoSuchProcesst AccessDeniedtTimeoutExpiredtNUM_CPUSt TOTAL_PHYMEMt BOOT_TIMEt version_infot __version__tSTATUS_RUNNINGt STATUS_IDLEtSTATUS_SLEEPINGtSTATUS_DISK_SLEEPtSTATUS_STOPPEDtSTATUS_TRACING_STOPt STATUS_ZOMBIEt STATUS_DEADt STATUS_WAKINGt STATUS_LOCKEDtProcesstPopent pid_existst get_pid_listt process_itertvirtual_memoryt swap_memoryt cpu_timest cpu_percenttcpu_times_percenttnetwork_io_counterstdisk_io_counterstdisk_partitionst disk_usaget get_userst get_boot_timeN(RRRR(tcached_property(tpropertytcallablet defaultdictt namedtupletwrapstPY3(t deprecatedtnt_disk_iostatt nt_net_iostatt nt_sysmeminfot isfile_strict( R R R RRRRRRRtlinux(tphymem_bufferst cached_phymemtIOPRIO_CLASS_NONEtIOPRIO_CLASS_RTtIOPRIO_CLASS_BEtIOPRIO_CLASS_IDLEtwin32(tABOVE_NORMAL_PRIORITY_CLASStBELOW_NORMAL_PRIORITY_CLASStHIGH_PRIORITY_CLASStIDLE_PRIORITY_CLASStNORMAL_PRIORITY_CLASStREALTIME_PRIORITY_CLASStdarwintfreebsdsplatform %s is not supportedc stfd}|S(spDecorator which raises NoSuchProcess in case a process is no longer running or its PID has been reused. c s9|ipt|i|iin|||S(N(t is_runningRtpidt_platform_implt _process_name(tselftargstkwargs(tfun(s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytwrapperhs (t_wraps(RHRI((RHs5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt_assert_pid_not_reuseddscB seZdZdZdZdZgd7dZee dZ edZ edZ e dZe d Zed Zed Zeid jo1ed ZedZedZnedZe dZdZeeido dZndZe dZeeidodZd7dZ neeidodZ!dZ"neidjo dZ#neid jo dZ$nd Z%d!Z&d"Z'e e(d#Z)d$d%Z*d&Z+d'Z,d(Z-d)Z.e/d*Z0d+Z1d,d-Z2d.Z3e d/Z4e d0Z5e d1Z6d2Z7e d3Z8d7d4Z9ed5Z:e:i;d6Z:RS(8sRepresents an OS process.cC stp*t|ttfptdq1n|djotdn||_t|_d|_ t i ||_ d|_d|_y |iWn;tj on*tj ot|dd|nXdS(sCreate a new Process object for the given pid. Raises NoSuchProcess if pid does not exist. Note that most of the methods of this class do not make sure the PID of the process being queried has been reused. That means you might end up retrieving an information referring to another process in case the original one this instance refers to is gone in the meantime. The only exceptions for which process identity is pre-emptively checked are: - parent - get_children() - set_nice() - suspend() - resume() - send_signal() - terminate() - kill() To prevent this problem for all other methods you can: - use is_running() before querying the process - if you're continuously iterating over a set of Process instances use process_iter() which pre-emptively checks process identity for every yielded instance spid must be an integerispid must be a positive integersno process found with pid %sN(t_PY3t isinstancetinttlongt TypeErrort ValueErrort_pidtFalset_gonetNonet_ppidt _psplatformRRCt_last_sys_cpu_timest_last_proc_cpu_timest create_timeRR(RERB((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt__init__ss"       cC sy|i}t|i}Wn?tj od|i}n1tj od|i}nXd||f}d|ii|ii|fS(Ns(pid=%s (terminated))s(pid=%s)s(pid=%s, name=%s)s%s.%s%s(RBtreprtnameRRt __class__t __module__t__name__(RERBR]tdetails((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt__str__s  cC sd|it|fS(Ns <%s at %s>(Rbtid(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt__repr__sc C stddddddddd d d g }t}xIt|p t|D].}|id oqPn|id oqPn||joqPnySt||}t|o-|djo|dd}q|}n|}Wn<tj o |}n%tj o|oqPqPnX|ido:|dd jo|d}qt|djo d}qtn||| Vista only. (RCR(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt get_ionices cC s|ii||S(sSet process I/O niceness (priority). On Linux 'ioclass' is one of the IOPRIO_CLASS_* constants. 'value' is a number which goes from 0 to 7. The higher the value, the lower the I/O priority of the process. On Windows only 'ioclass' is used and it can be set to 2 (normal), 1 (low) or 0 (very low). Available on Linux and Windows > Vista only. (RCtset_process_ionice(REtioclassR((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt set_ionices tget_process_cpu_affinitycC s |iiS(s!Get process current CPU affinity.(RCR(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytget_cpu_affinityscC s|ii|S(sSet process current CPU affinity. 'cpus' is a list of CPUs for which you want to set the affinity (e.g. [0, 1]). (RCtset_process_cpu_affinity(REtcpus((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytset_cpu_affinitystntcC s |iiS(s\Return the number of handles opened by this process (Windows only). (RCtget_num_handles(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRscC s |iiS(scReturn the number of file descriptors opened by this process (POSIX only). (RCt get_num_fds(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRscC s |iiS(shReturn the number voluntary and involuntary context switches performed by this process. (RCtget_num_ctx_switches(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRscC s |iiS(s2Return the number of threads used by this process.(RCtget_process_num_threads(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytget_num_threadsscC s |iiS(sReturn threads opened by process as a list of namedtuples including thread id and thread CPU times (user/system). (RCtget_process_threads(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt get_threadssc C sfg}|pmxRtD][}y?|i|ijo(|i|ijo|i|q[nWqtj oqXqWntt}x?tD]4}y||ii|Wqtj oqXqW|ig}x|D]}xz||D]n}y|i|ij}Wntj oqX|o5|i||i|jo|i|iqZqqWqW|S(sReturn the children of this process as a list of Process objects pre-emptively checking whether PID has been reused. If recursive is True return all the parent descendants. Example (A == this process): A ─┐ │ ├─ B (child) ─┐ │ └─ X (grandchild) ─┐ │ └─ Y (great grandchild) ├─ C (child) └─ D (child) >>> p.get_children() B, C, D >>> p.get_children(recursive=True) B, X, Y, C, D Note that in the example above if process X disappears process Y won't be returned either as the reference to process A is lost. (RRRBRZtappendRR(tlist( REt recursiveRtpttablet checkpidsRBtchildtintime((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRms>         g?c C sn|dj o |dj}|oMtt}|ii}ti|tt}|ii}nb|i}|i}tt}|ii}|djp |djo||_||_dS|i |i |i |i }||}||_||_y||d} Wnt j odSX| t } t idjo| djodSnt| dS(sReturn a float representing the current process CPU utilization as a percentage. When interval is > 0.0 compares process times to system CPU times elapsed before and after the interval (blocking). When interval is 0.0 or None compares process times to system CPU times elapsed since last call, returning immediately (non-blocking). In this case is recommended for accuracy that this function be called with at least 0.1 seconds between calls. Examples: >>> p = psutil.Process(os.getpid()) >>> # blocking >>> p.get_cpu_percent(interval=1) 2.0 >>> # non-blocking (percentage since last call) >>> p.get_cpu_percent(interval=0) 2.9 >>> gidRgY@iN(RUtsumRRCt get_cpu_timesttimetsleepRXRYtusertsystemtZeroDivisionErrorRRR]tround( RERrtblockingtst1tpt1tst2tpt2t delta_proct delta_timetoverall_percenttsingle_cpu_percent((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRq s8           cC s |iiS(s{Return a tuple whose values are process CPU user and system times. The same as os.times() but per-process. (RCR(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR`scC s |iiS(s Return a tuple representing RSS (Resident Set Size) and VMS (Virtual Memory Size) in bytes. On UNIX RSS and VMS are the same values shown by ps. On Windows RSS and VMS refer to "Mem Usage" and "VM Size" columns of taskmgr.exe. (RCtget_memory_info(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRfs cC s |iiS(sReturn a namedtuple with variable fields depending on the platform representing extended memory information about the process. All numbers are expressed in bytes. (RCtget_ext_memory_info(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRqscC sD|iid}y|ttdSWntj odSXdS(sCompare physical system memory to process resident memory (RSS) and calculate process memory utilization as a percentage. iidgN(RCRtfloatRR(REtrss((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytget_memory_percentxs c C s|ii}|oh}xc|D][}|d}|d}y!td|||||sN(RCtget_memory_mapstmaptKeyErrortnt_mmap_groupedt nt_mmap_ext( REtgroupedtittdttuplRtnumsRt_[1]t_[2]R((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRs   ! - cC s |iiS(sReturn files opened by process as a list of namedtuples including absolute file name and file descriptor number. (RCtget_open_files(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRstinetcC s|ii|S(sReturn connections opened by process as a list of namedtuples. The kind parameter filters for connections that fit the following criteria: Kind Value Connections using inet IPv4 and IPv6 inet4 IPv4 inet6 IPv6 tcp TCP tcp4 TCP over IPv4 tcp6 TCP over IPv6 udp UDP udp4 UDP over IPv4 udp6 UDP over IPv6 unix UNIX socket (both UDP and TCP protocols) all the sum of all the possible families and protocols (RCtget_connections(REtkind((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRscC sM|iotSy|i|iijSWntj ot|_tSXdS(sReturn whether this process is running. It also checks if PID has been reused by another process in which case returns False. N(RTRSRZRCRRtTrue(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRAs  cC stidjoyti|i|Wqtj otid}|ii}|i t i jot |_ t |i|n|i t ijot|i|nqXn.|tijo|iin tddS(sSend a signal to process pre-emptively checking whether PID has been reused (see signal module constants) . On Windows only SIGTERM is valid and is treated as an alias for kill(). Ris$only SIGTERM is supported on WindowsN(RR]RiRBtOSErrorRRRCRDterrnotESRCHRRTRtEPERMRtsignaltSIGTERMt kill_processRQ(REtsigRR]((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRes   cC s8t|ido|iin|itidS(sSuspend process execution with SIGSTOP pre-emptively checking whether PID has been reused. On Windows it suspends all process threads. tsuspend_processN(RRCRReRtSIGSTOP(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRfscC s8t|ido|iin|itidS(sResume process execution with SIGCONT pre-emptively checking whether PID has been reused. On Windows it resumes all process threads. tresume_processN(RRCRReRtSIGCONT(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRgscC s|itidS(sTerminate the process with SIGTERM pre-emptively checking whether PID has been reused. On Windows this is an alias for kill(). N(ReRR(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRhscC s5tidjo|itin|iidS(saKill the current process with SIGKILL pre-emptively checking whether PID has been reused.RN(RR]ReRtSIGKILLRCR(RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRiscC s;|dj o|dj otdn|ii|S(sWait for process to terminate and, if process is a children of the current one also return its exit code, else None. is"timeout must be a positive integerN(RURQRCt process_wait(REttimeout((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRj scC s)d}ti|dtdd|iS(s\Get or set process niceness (priority). Deprecated, use get_nice() instead. sBthis property is deprecated; use Process.get_nice() method insteadtcategoryt stackleveli(twarningstwarntDeprecationWarningR(REtmsg((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRnscC s,d}ti|dtdd|i|S(NsBthis property is deprecated; use Process.set_nice() method insteadRRi(RRR R(RERR ((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRnsN(<R`R_t__doc__R[RbRdRURkR&RKRlRBRR%R]RRRRRRRRRZRtRRWRRRRRRRRRRRRRRSRmRqRRRRRRRRRAReRfRgRhRiRjRntsetter(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRpsp 0 1!            @ @          cB s)eZdZdZdZdZRS(sA more convenient interface to stdlib subprocess module. It starts a sub process and deals with it exactly as when using subprocess.Popen class but in addition also provides all the property and methods of psutil.Process class in a single interface: >>> import psutil >>> from subprocess import PIPE >>> p = psutil.Popen(["/usr/bin/python", "-c", "print 'hi'"], stdout=PIPE) >>> p.name 'python' >>> p.uids user(real=1000, effective=1000, saved=1000) >>> p.username 'giampaolo' >>> p.communicate() ('hi ', None) >>> p.terminate() >>> p.wait(timeout=2) 0 >>> For method names common to both classes such as kill(), terminate() and wait(), psutil.Process implementation takes precedence. For a complete documentation refers to: http://docs.python.org/library/subprocess.html cO sti|||_|ii|_t|_d|_t i |i|_ d|_ d|_ y |iWnAtj on0tj o#t|idd|inXdS(Nsno process found with pid %s(t subprocessRt_Popen__subprocRBRRRSRTRURVRWRRCRXRYRZRR(RERFRG((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR[Es      cC s#ttttttiS(N(RRvRxRR (RE((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt__dir__UscC swyti||SWn\tj oPyti|i|SWqstj o#td|ii|fqsXnXdS(Ns!%s instance has no attribute '%s'(tobjectt__getattribute__tAttributeErrorRR^R`(RER]((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRXs(R`R_R R[RR(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR(s  cc s d}d}tt}tti}||}||}x|D]}||qNWxtttitti|iD]\}}yA|djo||Vn"|i o |Vn ||VWqt j o||qt j o |VqXqWdS(sReturn a generator yielding a Process class instance for all running processes on the local machine. Every new Process instance is only created once and then cached into an internal table which is updated every time this is used. Cached Process instances are checked for identity so that you're safe in case a PID has been reused by another process, in which case the cached instance is updated. The sorting order in which processes are yielded is based on their PIDs. cS st|}|t|i<|S(N(Rt_pmapRB(RBtproc((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytaddzs  cS sti|ddS(N(RtpopRU(RB((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytremovesN( RvRRtkeystsortedRtitemsRwtfromkeysRURARR(RRtatbtnew_pidst gone_pidsRBR((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRls,        cC s |p tiStiSdS(sReturn system-wide CPU times as a namedtuple object. Every CPU time represents the time CPU has spent in the given mode. The attributes availability varies depending on the platform. Here follows a list of all available attributes: - user - system - idle - nice (UNIX) - iowait (Linux) - irq (Linux, FreeBSD) - softirq (Linux) - steal (Linux >= 2.6.11) - guest (Linux >= 2.6.24) - guest_nice (Linux >= 3.2.0) When percpu is True return a list of nameduples for each CPU. First element of the list refers to first CPU, second element to second CPU and so on. The order of the list is consistent across calls. N(RWtget_system_cpu_timestget_system_per_cpu_times(tpercpu((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRs R"g?cC s|dj o |dj}d}|p>|ot}ti|nt}ta||tSg}|o tdt}ti|nt}tdtax3t|tD]"\}}|i|||qW|SdS(sReturn a float representing the current system-wide CPU utilization as a percentage. When interval is > 0.0 compares system CPU times elapsed before and after the interval (blocking). When interval is 0.0 or None compares system CPU times elapsed since last call or module import, returning immediately. In this case is recommended for accuracy that this function be called with at least 0.1 seconds between calls. When percpu is True returns a list of floats representing the utilization as a percentage for each CPU. First element of the list refers to first CPU, second element to second CPU and so on. The order of the list is consistent across calls. Examples: >>> # blocking, system-wide >>> psutil.cpu_percent(interval=1) 2.0 >>> >>> # blocking, per-cpu >>> psutil.cpu_percent(interval=1, percpu=True) [2.0, 1.0] >>> >>> # non-blocking (percentage since last call) >>> psutil.cpu_percent(interval=0) 2.9 >>> gc S sst|}||i}t|}||i}||jodS||}||}||d}t|dS(Ngidi(RtidleR( tt1tt2tt1_alltt1_busytt2_alltt2_busyt busy_deltat all_deltat busy_perc((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt calculates       R"N( RURRRt_last_cpu_timesRt_last_per_cpu_timestzipR(RrR"RR-R$Rttot1R%((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRs&#    cC s|dj o |dj}d}|p>|ot}ti|nt}ta||tSg}|o tdt}ti|nt}tdtax3t|tD]"\}}|i|||qW|SdS(sSame as cpu_percent() but provides utilization percentages for each specific CPU time as is returned by cpu_times(). For instance, on Linux we'll get: >>> cpu_times_percent() cpupercent(user=4.8, nice=0.0, system=4.8, idle=90.5, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0) >>> interval and percpu arguments have the same meaning as in cpu_percent(). gcS sg}t|t|}xq|iD]f}t||t||}yd||}Wntj o d}nX|it|dq&Wtdjotddi |iant|S(Nidgit cpupercentt ( Rt_fieldsRzRRRt_ptime_cpu_perc_ntRUR)tjoin(R$R%RR+tfieldt field_deltat field_perc((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR-#s   R"N( RURRRt_last_cpu_times_2Rt_last_per_cpu_times_2R0R(RrR"RR-R$RR1R%((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRs&    cC s tiS(sReturn statistics about system memory usage as a namedtuple including the following fields, expressed in bytes: - total: total physical memory available. - available: the actual amount of available memory that can be given instantly to processes that request more memory in bytes; this is calculated by summing different memory values depending on the platform (e.g. free + buffers + cached on Linux) and it is supposed to be used to monitor actual memory usage in a cross platform fashion. - percent: the percentage usage calculated as (total - available) / total * 100 - used: memory used, calculated differently depending on the platform and designed for informational purposes only: OSX: active + inactive + wired BSD: active + wired + cached LINUX: total - free - free: memory not being used at all (zeroed) that is readily available; note that this doesn't reflect the actual memory available (use 'available' instead) Platform-specific fields: - active (UNIX): memory currently in use or very recently used, and so it is in RAM. - inactive (UNIX): memory that is marked as not used. - buffers (BSD, Linux): cache for things like file system metadata. - cached (BSD, OSX): cache for various things. - wired (OSX, BSD): memory that is marked to always stay in RAM. It is never moved to disk. - shared (BSD): memory that may be simultaneously accessed by multiple processes. The sum of 'used' and 'available' does not necessarily equal total. On Windows 'available' and 'free' are the same. (RWR(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRLs5cC s tiS(sReturn system swap memory statistics as a namedtuple including the following attributes: - total: total swap memory in bytes - used: used swap memory in bytes - free: free swap memory in bytes - percent: the percentage usage - sin: no. of bytes the system has swapped in from disk (cumulative) - sout: no. of bytes the system has swapped out from disk (cumulative) 'sin' and 'sout' on Windows are meaningless and always set to 0. (RWR(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRs cC s ti|S(sReturn disk usage statistics about the given path as a namedtuple including total, used and free space expressed in bytes plus the percentage usage. (RWtget_disk_usage(R((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR"scC s ti|S(s&Return mounted partitions as a list of namedtuples including device, mount point, filesystem type and mount options (a raw string separated by commas which may vary depending on the platform). If "all" parameter is False return physical devices only and ignore all others. (RWR!(tall((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR!scC sti}|ptdn|o2x*|iD]\}}t|||Rt_nt_net_iostatR0R@R(tpernicRBtnicRDRR((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyRs  cC s tiS(svReturn the system boot time expressed in seconds since the epoch. This is also available as psutil.BOOT_TIME. (RWtget_system_boot_time(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR$scC s tiS(sReturn users currently connected on the system as a list of namedtuples including the following attributes. - user: the name of the user - terminal: the tty or pseudo-tty associated with the user, if any. - host: the host name associated with the entry, if any. - started: the creation time as a floating point number expressed in seconds since the epoch. (RWtget_system_users(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR#s cC s ttS(snReturn a list of Process class instances for all running processes on the local machine (deprecated). (RR(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pytget_process_listscC s(t}t|i|i|i|iS(sReturn the amount of total, used and free physical memory on the system in bytes plus the percentage usage. Deprecated by psutil.virtual_memory(). (Rt_nt_sysmeminfottotaltusedtfreetpercent(tmem((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt phymem_usages spsutil.swap_memory()cC stS(N(R(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt virtmem_usagesspsutil.phymem_usage().freecC s tiS(N(RQRN(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt avail_phymemsspsutil.phymem_usage().usedcC s tiS(N(RQRM(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt used_phymemsspsutil.virtmem_usage().totalcC s tiS(N(RRRL(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt total_virtmemsspsutil.virtmem_usage().usedcC s tiS(N(RRRM(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt used_virtmemsspsutil.virtmem_usage().freecC s tiS(N(RRRN(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt avail_virtmem#sc C sjddk}ddkl}|ii}d}ddddd d d d g}tid jo|idn||d*xtt ddD]}y|i |dd}Wnt j oqX|d oO|ii |d }|i|jo|i d}q,|i d}nd}ti dtit|d }|d} tid!jo$d"| jo| id"d#} n|d$ot|d$id%pd&} |d$ot|d$id%pd&} |d'ot|d'd#pd&} ||| d( |d|d)| | | |iddpd&|||d ipd&f qWdS(+sNList info of all currently running processes emulating ps aux output. iN(tprint_s+%-10s %5s %4s %4s %7s %7s %-13s %5s %7s %sRBRRqRR]RRZRRRtUSERtPIDs%CPUs%MEMtVSZtRSStTTYtSTARTtTIMEtCOMMANDtkeycS s|iS((RB(R((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyR6sR}ts%H:%Ms%b%ds%M:%SRRs\it memory_infoit?tmemory_percenti R( RYRZs%CPUs%MEMR[R\R]R^R_R`(tdatetimetpsutil._compatRXtdatettodayRR]RRRRkRt fromtimestamptstrftimeRt localtimeRtsplitRNtvmsRRRststrip( RfRXt today_dayttemplR|RtpinfotctimetcputimeRRnRtmemp((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyttest'sT  %     t__main__ii(zR t __future__RR ttupleRRmtnumRNR t__all__RRRRRRR RRRUt psutil._errorRRRRtpsutil._commonR%RgR&R'R(R)R*RJR+RLR,t _deprecatedR-R?R.RER/RKR0t_isfile_strictR R R RRRRRRRtplatformRytpsutil._pslinuxt_pslinuxRWR2R3R4R5R6R7tpsutil._psmswindowst _psmswindowsR9R:R;R<R=R>t psutil._psosxt_psosxt psutil._psbsdt_psbsdR{textendt__extra__all__RRRRKRRRRRRRRSRR.RR/RR:R;R5RRRR"R!R RR$R#RJRQRRRSRTRURVRWRvR`(((s5/usr/lib64/python2.6/site-packages/psutil/__init__.pyt s6                ".(F.  2    ?   5  O: 7   ! !    2