python/psutil/PKG-INFO

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/python/psutil/PKG-INFO	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,263 @@
     1.4 +Metadata-Version: 1.1
     1.5 +Name: psutil
     1.6 +Version: 1.0.1
     1.7 +Summary: A process and system utilities module for Python
     1.8 +Home-page: http://code.google.com/p/psutil/
     1.9 +Author: Giampaolo Rodola
    1.10 +Author-email: g.rodola <at> gmail <dot> com
    1.11 +License: License :: OSI Approved :: BSD License
    1.12 +Download-URL: http://psutil.googlecode.com/files/psutil-1.0.1.tar.gz
    1.13 +Description: ===========
    1.14 +        Quick links
    1.15 +        ===========
    1.16 +        
    1.17 +        * `Home page <http://code.google.com/p/psutil>`_
    1.18 +        * `Download <http://code.google.com/p/psutil/downloads/list>`_
    1.19 +        * `Documentation <http://code.google.com/p/psutil/wiki/Documentation>`_
    1.20 +        
    1.21 +        =======
    1.22 +        Summary
    1.23 +        =======
    1.24 +        
    1.25 +        psutil is a module providing an interface for retrieving information on all
    1.26 +        running processes and system utilization (CPU, memory, disks, network, users) in
    1.27 +        a portable way by using Python, implementing many functionalities offered by
    1.28 +        command line tools such as:  **ps, top, df, kill, free, lsof, free, netstat,
    1.29 +        ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap**.
    1.30 +        
    1.31 +        It currently supports **Linux**, **Windows**, **OSX**, **FreeBSD**,
    1.32 +        **Sun Solaris** both **32-bit** and **64-bit** with Python versions from **2.4**
    1.33 +        to **3.3** by using a single code base.
    1.34 +        
    1.35 +        ==============
    1.36 +        Example usages
    1.37 +        ==============
    1.38 +        
    1.39 +        CPU
    1.40 +        ===
    1.41 +        
    1.42 +        >>> import psutil
    1.43 +        >>> psutil.cpu_times()
    1.44 +        cputimes(user=3961.46, nice=169.729, system=2150.659, idle=16900.540,
    1.45 +                 iowait=629.509, irq=0.0, softirq=19.422, steal=0.0, guest=0, nice=0.0)
    1.46 +        >>>
    1.47 +        >>> for x in range(3):
    1.48 +        ...     psutil.cpu_percent(interval=1)
    1.49 +        ...
    1.50 +        4.0
    1.51 +        5.9
    1.52 +        3.8
    1.53 +        >>>
    1.54 +        >>> for x in range(3):
    1.55 +        ...     psutil.cpu_percent(interval=1, percpu=True)
    1.56 +        ...
    1.57 +        [4.0, 6.9]
    1.58 +        [7.0, 8.5]
    1.59 +        [1.2, 9.0]
    1.60 +        >>>
    1.61 +        >>> for x in range(3):
    1.62 +        ...     psutil.cpu_times_percent(interval=1, percpu=False)
    1.63 +        ...
    1.64 +        cpupercent(user=1.5, nice=0.0, system=0.5, idle=96.5, iowait=1.5, irq=0.0,
    1.65 +                   softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
    1.66 +        cpupercent(user=1.0, nice=0.0, system=0.0, idle=99.0, iowait=0.0, irq=0.0,
    1.67 +                   softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
    1.68 +        cpupercent(user=2.0, nice=0.0, system=0.0, idle=98.0, iowait=0.0, irq=0.0,
    1.69 +                   softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
    1.70 +        
    1.71 +        Memory
    1.72 +        ======
    1.73 +        
    1.74 +        >>> psutil.virtual_memory()
    1.75 +        vmem(total=8374149120L, available=2081050624L, percent=75.1, used=8074080256L,
    1.76 +             free=300068864L, active=3294920704, inactive=1361616896, buffers=529895424L,
    1.77 +             cached=1251086336)
    1.78 +        >>> psutil.swap_memory()
    1.79 +        swap(total=2097147904L, used=296128512L, free=1801019392L, percent=14.1,
    1.80 +             sin=304193536, sout=677842944)
    1.81 +        >>>
    1.82 +        
    1.83 +        
    1.84 +        Disks
    1.85 +        =====
    1.86 +        
    1.87 +        >>> psutil.disk_partitions()
    1.88 +        [partition(device='/dev/sda1', mountpoint='/', fstype='ext4', opts='rw,nosuid'),
    1.89 +         partition(device='/dev/sda2', mountpoint='/home', fstype='ext, opts='rw')]
    1.90 +        >>>
    1.91 +        >>> psutil.disk_usage('/')
    1.92 +        usage(total=21378641920, used=4809781248, free=15482871808, percent=22.5)
    1.93 +        >>>
    1.94 +        >>> psutil.disk_io_counters()
    1.95 +        iostat(read_count=719566, write_count=1082197, read_bytes=18626220032,
    1.96 +               write_bytes=24081764352, read_time=5023392, write_time=63199568)
    1.97 +        >>>
    1.98 +        
    1.99 +        
   1.100 +        Network
   1.101 +        =======
   1.102 +        
   1.103 +        >>> psutil.net_io_counters(pernic=True)
   1.104 +        {'lo': iostat(bytes_sent=799953745, bytes_recv=799953745,
   1.105 +                      packets_sent=453698, packets_recv=453698),
   1.106 +         'eth0': iostat(bytes_sent=734324837, bytes_recv=4163935363,
   1.107 +                        packets_sent=3605828, packets_recv=4096685)}
   1.108 +        >>>
   1.109 +        
   1.110 +        Other system info
   1.111 +        =================
   1.112 +        
   1.113 +        >>> psutil.get_users()
   1.114 +        [user(name='giampaolo', terminal='pts/2', host='localhost', started=1340737536.0),
   1.115 +         user(name='giampaolo', terminal='pts/3', host='localhost', started=1340737792.0)]
   1.116 +        >>>
   1.117 +        >>> psutil.get_boot_time()
   1.118 +        1365519115.0
   1.119 +        
   1.120 +        
   1.121 +        Process management
   1.122 +        ==================
   1.123 +        
   1.124 +        >>> import psutil
   1.125 +        >>> psutil.get_pid_list()
   1.126 +        [1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224,
   1.127 +        268, 1215, 1216, 1220, 1221, 1243, 1244, 1301, 1601, 2237, 2355,
   1.128 +        2637, 2774, 3932, 4176, 4177, 4185, 4187, 4189, 4225, 4243, 4245,
   1.129 +        4263, 4282, 4306, 4311, 4312, 4313, 4314, 4337, 4339, 4357, 4358,
   1.130 +        4363, 4383, 4395, 4408, 4433, 4443, 4445, 4446, 5167, 5234, 5235,
   1.131 +        5252, 5318, 5424, 5644, 6987, 7054, 7055, 7071]
   1.132 +        >>>
   1.133 +        >>> p = psutil.Process(7055)
   1.134 +        >>> p.name
   1.135 +        'python'
   1.136 +        >>> p.exe
   1.137 +        '/usr/bin/python'
   1.138 +        >>> p.getcwd()
   1.139 +        '/home/giampaolo'
   1.140 +        >>> p.cmdline
   1.141 +        ['/usr/bin/python', 'main.py']
   1.142 +        >>>
   1.143 +        >>> str(p.status)
   1.144 +        'running'
   1.145 +        >>> p.username
   1.146 +        'giampaolo'
   1.147 +        >>> p.create_time
   1.148 +        1267551141.5019531
   1.149 +        >>> p.terminal
   1.150 +        '/dev/pts/0'
   1.151 +        >>>
   1.152 +        >>> p.uids
   1.153 +        user(real=1000, effective=1000, saved=1000)
   1.154 +        >>> p.gids
   1.155 +        group(real=1000, effective=1000, saved=1000)
   1.156 +        >>>
   1.157 +        >>> p.get_cpu_times()
   1.158 +        cputimes(user=1.02, system=0.31)
   1.159 +        >>> p.get_cpu_percent(interval=1.0)
   1.160 +        12.1
   1.161 +        >>> p.get_cpu_affinity()
   1.162 +        [0, 1, 2, 3]
   1.163 +        >>> p.set_cpu_affinity([0])
   1.164 +        >>>
   1.165 +        >>> p.get_memory_percent()
   1.166 +        0.63423
   1.167 +        >>>
   1.168 +        >>> p.get_memory_info()
   1.169 +        meminfo(rss=7471104, vms=68513792)
   1.170 +        >>> p.get_ext_memory_info()
   1.171 +        meminfo(rss=9662464, vms=49192960, shared=3612672, text=2564096, lib=0, data=5754880, dirty=0)
   1.172 +        >>> p.get_memory_maps()
   1.173 +        [mmap(path='/lib/x86_64-linux-gnu/libutil-2.15.so', rss=16384, anonymous=8192, swap=0),
   1.174 +         mmap(path='/lib/x86_64-linux-gnu/libc-2.15.so', rss=6384, anonymous=15, swap=0),
   1.175 +         mmap(path='/lib/x86_64-linux-gnu/libcrypto.so.1.0.0', rss=34124, anonymous=1245, swap=0),
   1.176 +         mmap(path='[heap]', rss=54653, anonymous=8192, swap=0),
   1.177 +         mmap(path='[stack]', rss=1542, anonymous=166, swap=0),
   1.178 +         ...]
   1.179 +        >>>
   1.180 +        >>> p.get_io_counters()
   1.181 +        io(read_count=478001, write_count=59371, read_bytes=700416, write_bytes=69632)
   1.182 +        >>>
   1.183 +        >>> p.get_open_files()
   1.184 +        [openfile(path='/home/giampaolo/svn/psutil/somefile', fd=3)]
   1.185 +        >>>
   1.186 +        >>> p.get_connections()
   1.187 +        [connection(fd=115, family=2, type=1, laddr=('10.0.0.1', 48776),
   1.188 +                    raddr=('93.186.135.91', 80), status='ESTABLISHED'),
   1.189 +         connection(fd=117, family=2, type=1, laddr=('10.0.0.1', 43761),
   1.190 +                    raddr=('72.14.234.100', 80), status='CLOSING'),
   1.191 +         connection(fd=119, family=2, type=1, laddr=('10.0.0.1', 60759),
   1.192 +                    raddr=('72.14.234.104', 80), status='ESTABLISHED'),
   1.193 +         connection(fd=123, family=2, type=1, laddr=('10.0.0.1', 51314),
   1.194 +                    raddr=('72.14.234.83', 443), status='SYN_SENT')]
   1.195 +        >>>
   1.196 +        >>> p.get_num_threads()
   1.197 +        4
   1.198 +        >>> p.get_num_fds()
   1.199 +        8
   1.200 +        >>> p.get_threads()
   1.201 +        [thread(id=5234, user_time=22.5, system_time=9.2891),
   1.202 +         thread(id=5235, user_time=0.0, system_time=0.0),
   1.203 +         thread(id=5236, user_time=0.0, system_time=0.0),
   1.204 +         thread(id=5237, user_time=0.0707, system_time=1.1)]
   1.205 +        >>>
   1.206 +        >>> p.get_num_ctx_switches()
   1.207 +        amount(voluntary=78, involuntary=19)
   1.208 +        >>>
   1.209 +        >>> p.get_nice()
   1.210 +        0
   1.211 +        >>> p.set_nice(10)
   1.212 +        >>>
   1.213 +        >>> p.suspend()
   1.214 +        >>> p.resume()
   1.215 +        >>>
   1.216 +        >>> p.terminate()
   1.217 +        >>> p.wait(timeout=3)
   1.218 +        0
   1.219 +        >>>
   1.220 +        >>> psutil.test()
   1.221 +        USER         PID %CPU %MEM     VSZ     RSS TTY        START    TIME  COMMAND
   1.222 +        root           1  0.0  0.0   24584    2240 ?          Jun17   00:00  init
   1.223 +        root           2  0.0  0.0       0       0 ?          Jun17   00:00  kthreadd
   1.224 +        root           3  0.0  0.0       0       0 ?          Jun17   00:05  ksoftirqd/0
   1.225 +        ...
   1.226 +        giampaolo  31475  0.0  0.0   20760    3024 /dev/pts/0 Jun19   00:00  python2.4
   1.227 +        giampaolo  31721  0.0  2.2  773060  181896 ?          00:04   10:30  chrome
   1.228 +        root       31763  0.0  0.0       0       0 ?          00:05   00:00  kworker/0:1
   1.229 +        >>>
   1.230 +        
   1.231 +Keywords: ps,top,kill,free,lsof,netstat,nice,tty,ionice,uptime,taskmgr,process,df,iotop,iostat,ifconfig,taskset,who,pidof,pmap,smem,monitoring
   1.232 +Platform: Platform Independent
   1.233 +Classifier: Development Status :: 5 - Production/Stable
   1.234 +Classifier: Environment :: Console
   1.235 +Classifier: Operating System :: MacOS :: MacOS X
   1.236 +Classifier: Operating System :: Microsoft
   1.237 +Classifier: Operating System :: Microsoft :: Windows :: Windows NT/2000
   1.238 +Classifier: Operating System :: POSIX
   1.239 +Classifier: Operating System :: POSIX :: Linux
   1.240 +Classifier: Operating System :: POSIX :: BSD :: FreeBSD
   1.241 +Classifier: Operating System :: POSIX :: SunOS/Solaris
   1.242 +Classifier: Operating System :: OS Independent
   1.243 +Classifier: Programming Language :: C
   1.244 +Classifier: Programming Language :: Python
   1.245 +Classifier: Programming Language :: Python :: 2
   1.246 +Classifier: Programming Language :: Python :: 2.4
   1.247 +Classifier: Programming Language :: Python :: 2.5
   1.248 +Classifier: Programming Language :: Python :: 2.6
   1.249 +Classifier: Programming Language :: Python :: 2.7
   1.250 +Classifier: Programming Language :: Python :: 3
   1.251 +Classifier: Programming Language :: Python :: 3.0
   1.252 +Classifier: Programming Language :: Python :: 3.1
   1.253 +Classifier: Programming Language :: Python :: 3.2
   1.254 +Classifier: Programming Language :: Python :: 3.3
   1.255 +Classifier: Topic :: System :: Monitoring
   1.256 +Classifier: Topic :: System :: Networking
   1.257 +Classifier: Topic :: System :: Networking :: Monitoring
   1.258 +Classifier: Topic :: System :: Benchmark
   1.259 +Classifier: Topic :: System :: Hardware
   1.260 +Classifier: Topic :: System :: Systems Administration
   1.261 +Classifier: Topic :: Utilities
   1.262 +Classifier: Topic :: Software Development :: Libraries
   1.263 +Classifier: Topic :: Software Development :: Libraries :: Python Modules
   1.264 +Classifier: Intended Audience :: Developers
   1.265 +Classifier: Intended Audience :: System Administrators
   1.266 +Classifier: License :: OSI Approved :: BSD License

mercurial