Index: third_party/psutil/docs/index.html |
diff --git a/third_party/psutil/docs/index.html b/third_party/psutil/docs/index.html |
index 8395837cf578d8057130a84ee2172d55fa264e11..4ac43f46d2e12f6121afe6103d66643983d9828b 100644 |
--- a/third_party/psutil/docs/index.html |
+++ b/third_party/psutil/docs/index.html |
@@ -1,26 +1,50 @@ |
- |
- |
- |
<html> |
<head> |
- <title>psutil</title> |
+ <title>Home</title> |
</head> |
<body> |
- <div id="wikicontent"> |
- <table width="100%" border="0" cellspacing="0" cellpadding="0"> |
- <tr> |
- <td class="vt" id="wikimaincol" width="100%"> |
+<div> |
+<table> |
+ <tr> |
- <div id="wikiheader" style="margin-bottom:1em"> |
+ <td style="vertical-align:top; padding-left:5px"> |
- </div> |
- <h1><a name="Summary"></a>Summary<a href="#Summary" class="section_anchor"></a></h1><p>psutil is a module providing an interface for retrieving information on running processes and system utilization (CPU, memory) in a portable way by using Python, implementing many functionalities offered by command line tools like <strong>ps</strong>, <strong>top</strong>, <strong>kill</strong> and Windows <strong>task manager</strong>. </p><p>It currently supports <strong>Linux</strong>, <strong>OS X</strong>, <strong>FreeBSD</strong> and <strong>Windows</strong> with Python versions from <strong>2.4</strong> to <strong>3.1</strong> by using a unique code base. </p><h1><a name="Example_usage"></a>Example usage<a href="#Example_usage" class="section_anchor"></a></h1><h3><a name="process_management"></a>process management<a href="#process_management" class="section_anchor"></a></h3><pre class="prettyprint">>>> import psutil |
+ <div id="wikicontent"> |
+ <div class="vt" id="wikimaincol"> |
+ <h1><a name="Summary"></a>Summary<a href="#Summary" class="section_anchor"></a></h1><p>psutil is a module providing an interface for retrieving information on all running processes and system utilization (CPU, disk, memory) in a portable way by using <strong>Python</strong>, implementing many functionalities offered by command line tools such as: </p><ul><li>ps </li><li>top </li><li>df </li><li>kill </li><li>free </li><li>lsof </li><li>netstat </li><li>nice </li><li>ionice </li><li>uptime </li><li>tty </li></ul><p>It currently supports <strong>Linux</strong>, <strong>Windows</strong>, <strong>OSX</strong> and <strong>FreeBSD</strong> both <strong>32-bit</strong> and <strong>64-bit</strong> with Python versions from <strong>2.4</strong> to <strong>3.3</strong> by using a single code base. </p><p><a href="http://code.google.com/p/psutil/#Donate" rel="nofollow"></a> </p><h1><a name="Example_usages"></a>Example usages<a href="#Example_usages" class="section_anchor"></a></h1><h3><a name="CPU"></a>CPU<a href="#CPU" class="section_anchor"></a></h3><pre class="prettyprint">>>> import psutil |
+>>> psutil.cpu_times() |
+cputimes(user=3961.46, nice=169.729, system=2150.659, idle=16900.540, iowait=629.509, irq=0.0, softirq=19.422) |
+>>> |
+>>> for x in range(3): |
+... psutil.cpu_percent(interval=1) |
+... |
+4.0 |
+5.9 |
+3.8 |
+>>> |
+>>> for x in range(3): |
+... psutil.cpu_percent(interval=1, percpu=True) |
+... |
+[4.0, 34.2] |
+[7.0, 8.5] |
+[1.2, 9.0] |
+>>></pre><h3><a name="Memory"></a>Memory<a href="#Memory" class="section_anchor"></a></h3><pre class="prettyprint">>>> psutil.phymem_usage() |
+usage(total=4153868288, used=2854199296, free=1299668992, percent=34.6) |
+>>> psutil.virtmem_usage() |
+usage(total=2097147904, used=4096, free=2097143808, percent=0.0) |
+>>></pre><h3><a name="Disks"></a>Disks<a href="#Disks" class="section_anchor"></a></h3><pre class="prettyprint">>>> psutil.get_partitions() |
+[partition(device='/dev/sda3', mountpoint='/', fstype='ext4'), |
+ partition(device='/dev/sda7', mountpoint='/home', fstype='ext4')] |
+>>> |
+>>> psutil.disk_usage('/') |
+usage(total=21378641920, used=4809781248, free=15482871808, percent=22.5) |
+>>></pre><h3><a name="Process_management"></a>Process management<a href="#Process_management" class="section_anchor"></a></h3><pre class="prettyprint">>>> import psutil |
>>> psutil.get_pid_list() |
[1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224, |
268, 1215, 1216, 1220, 1221, 1243, 1244, 1301, 1601, 2237, 2355, |
@@ -28,72 +52,74 @@ |
4263, 4282, 4306, 4311, 4312, 4313, 4314, 4337, 4339, 4357, 4358, |
4363, 4383, 4395, 4408, 4433, 4443, 4445, 4446, 5167, 5234, 5235, |
5252, 5318, 5424, 5644, 6987, 7054, 7055, 7071] |
+>>> |
>>> p = psutil.Process(7055) |
>>> p.name |
'python' |
->>> p.path |
-'/usr/bin' |
+>>> p.exe |
+'/usr/bin/python' |
>>> p.cmdline |
-['/usr/bin/python', '-O', 'run.py'] |
->>> p.uid |
-1000 |
->>> p.gid |
-1000 |
+['/usr/bin/python', 'main.py'] |
+>>> str(p.status) |
+'running' |
+>>> |
+>>> p.uids |
+user(real=1000, effective=1000, saved=1000) |
+>>> p.gids |
+group(real=1000, effective=1000, saved=1000) |
>>> p.username |
-'jake' |
+'giampaolo' |
>>> p.create_time |
1267551141.5019531 |
->>> p.get_cpu_percent() |
-12.31243 |
+>>> p.get_cpu_percent(interval=1.0) |
+12.1 |
>>> p.get_memory_percent() |
0.63423 |
->>> rss, vms = p.get_memory_info() |
->>> "Resident memory: %s KB" %(rss / 1024) |
-'Resident memory: 3768 KB' |
->>> "Virtual memory: %s KB" %(vms / 1024) |
-'Virtual memory: 6176 KB' |
+>>> p.get_memory_info() |
+meminfo(rss=7471104, vms=68513792) |
+>>> p.get_io_counters() |
+io(read_count=478001, write_count=59371, read_bytes=700416, write_bytes=69632) |
+>>> |
+>>> p.get_open_files() |
+[openfile(path='/home/giampaolo/svn/psutil/somefile', fd=3)] |
+>>> |
+>>> p.get_connections() |
+[connection(fd=115, family=2, type=1, local_address=('10.0.0.1', 48776), remote_address=('93.186.135.91', 80), status='ESTABLISHED'), |
+ connection(fd=117, family=2, type=1, local_address=('10.0.0.1', 43761), remote_address=('72.14.234.100', 80), status='CLOSING'), |
+ connection(fd=119, family=2, type=1, local_address=('10.0.0.1', 60759), remote_address=('72.14.234.104', 80), status='ESTABLISHED'), |
+ connection(fd=123, family=2, type=1, local_address=('10.0.0.1', 51314), remote_address=('72.14.234.83', 443), status='SYN_SENT')] |
+>>> |
+>>> p.get_threads() |
+[thread(id=5234, user_time=22.5, system_time=9.2891), |
+ thread(id=5235, user_time=0.0, system_time=0.0), |
+ thread(id=5236, user_time=0.0, system_time=0.0), |
+ thread(id=5237, user_time=0.0707, system_time=1.1)] |
+>>> |
+>>> p.nice |
+0 |
+>>> p.nice = 10 # set/change process priority |
+>>> p.nice |
+10 |
>>> |
>>> p.suspend() |
>>> p.resume() |
+>>> |
+>>> p.terminate() |
+>>> p.wait(timeout=3) |
+0 |
+>>> |
>>> psutil.test() |
UID PID %CPU %MEM VSZ RSS START TIME COMMAND |
0 0 0.0 0.0 0 0 00:12 00:00 [sched] |
0 1 0.0 0.3 1740 600 00:12 00:04 /sbin/init |
0 2 0.0 0.0 0 0 00:12 00:00 [kthreadd] |
-0 3 0.0 0.0 0 0 00:12 00:00 [migration/0] |
+0 3 0.1 0.0 0 0 00:12 00:00 [migration/0] |
... |
0 13239 0.0 2.6 13604 1044 00:38 00:00 /usr/sbin/smbd -D |
-1000 23648 0.0 2.4 12512 2008 14:43 00:06 sshd: user@pts/2 |
+1000 23648 1.1 2.4 12512 2008 14:43 00:06 sshd: user@pts/2 |
1000 23649 0.0 1.2 5944 3340 14:43 00:00 -bash |
-0 25926 0.0 1.1 5432 3072 17:55 00:00 -su |
+0 25926 0.3 1.1 5432 3072 17:55 00:00 -su |
0 28655 0.0 1.0 4932 3204 21:58 00:00 python _psutil.py |
->>></pre><h3><a name="System_monitoring_(CPU_and_memory)"></a>System monitoring (CPU and memory)<a href="#System_monitoring_(CPU_and_memory)" class="section_anchor"></a></h3><pre class="prettyprint">>>> import psutil, time |
->>> print psutil.cpu_times() |
-softirq=50.87; iowait=39.63; system=1130.67; idle=164171.41; user=965.15; irq=7.08; nice=0.0 |
->>> |
->>> while 1: |
-... print round(psutil.cpu_percent(), 1) |
-... time.sleep(1) |
-... |
-5.4 |
-3.2 |
-7.3 |
-7.1 |
-2.5 |
-Traceback (most recent call last): |
- File "<stdin>", line 3, in <module> |
-KeyboardInterrupt |
->>> |
->>> psutil.TOTAL_PHYMEM |
-526458880 |
->>> psutil.avail_phymem() |
-153530368 |
->>> psutil.total_virtmem() |
-197365760 |
->>> psutil.avail_virtmem() |
-194277376</pre><h1><a name="Mailing_lists"></a>Mailing lists<a href="#Mailing_lists" class="section_anchor"></a></h1><p><strong>Users</strong><br><a href="http://groups.google.com/group/psutil/topics" rel="nofollow">http://groups.google.com/group/psutil/topics</a> </p><p><strong>Developers</strong><br><a href="http://groups.google.com/group/psutil-dev/topics" rel="nofollow">http://groups.google.com/group/psutil-dev/topics</a> </p><p><strong>SVN commits and issue tracker changes</strong><br><a href="http://groups.google.com/group/psutil-commits/topics" rel="nofollow">http://groups.google.com/group/psutil-commits/topics</a> </p><h1><a name="Contribute"></a>Contribute<a href="#Contribute" class="section_anchor"></a></h1><p>If you want to help or just give us suggestions about the project and other related things, subscribe to the <a href="http://groups.google.com/group/psutil" rel="nofollow">discussion mailing list</a>. If you want to talk with project team members about psutil and other related things feel free to contact us at the following addresses: </p><p><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Name</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Country</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>E-mail</strong> </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> Jay Loden </td><td style="border: 1px solid #aaa; padding: 5px;"> New Jersey (USA) </td><td style="border: 1px solid #aaa; padding: 5px;"> jloden at gmail dot com </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> Giampaolo Rodola' </td><td style="border: 1px solid #aaa; padding: 5px;"> Turin (Italy) </td><td style="border: 1px solid #aaa; padding: 5px;"> g.rodola at gmail dot com </td></tr> </table></p><p>Feedbacks and suggestions are greatly appreciated as well as new testers and coders willing to join the development.<br> For any bug report, patch proposal or feature request, add an entry into the <a href="http://code.google.com/p/psutil/issues/list" rel="nofollow">Issue Tracker</a>.<br> </p><p>Thank you. </p> |
- |
- |
+>>></pre><h1><a name="Donate"></a>Donate<a href="#Donate" class="section_anchor"></a></h1><p>A lot of time and effort went into making psutil as it is right now. If you feel psutil is useful to you or your business and want to support it's future development please consider donating us (Giampaolo Rodolà and Jay Loden) some money. We only ask for a small donation, but of course we appreciate any amount. </p><p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8" rel="nofollow"></a> </p><h2><a name="People_who_donated_so_far"></a>People who donated so far<a href="#People_who_donated_so_far" class="section_anchor"></a></h2><ul><li>Kim Gräsman </li></ul><h1><a name="Mailing_lists"></a>Mailing lists<a href="#Mailing_lists" class="section_anchor"></a></h1><p><strong>Users</strong><br><a href="http://groups.google.com/group/psutil/" rel="nofollow">http://groups.google.com/group/psutil/</a> </p><p><strong>Developers</strong><br><a href="http://groups.google.com/group/psutil-dev/" rel="nofollow">http://groups.google.com/group/psutil-dev/</a> </p><p><strong>SVN commits and issue tracker changes</strong><br><a href="http://groups.google.com/group/psutil-commits/" rel="nofollow">http://groups.google.com/group/psutil-commits/</a> </p><h1><a name="Contribute"></a>Contribute<a href="#Contribute" class="section_anchor"></a></h1><p>If you want to help or just give us suggestions about the project and other related things, subscribe to the <a href="http://groups.google.com/group/psutil" rel="nofollow">discussion mailing list</a>. If you want to talk with project team members about psutil and other related things feel free to contact us at the following addresses: </p><p><table class="wikitable"><tr><td style="border: 1px solid #ccc; padding: 5px;"> <strong>Name</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>Country</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>E-mail</strong> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> Giampaolo Rodola' </td><td style="border: 1px solid #ccc; padding: 5px;"> Turin (Italy) </td><td style="border: 1px solid #ccc; padding: 5px;"> g.rodola at gmail dot com </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> Jay Loden </td><td style="border: 1px solid #ccc; padding: 5px;"> New Jersey (USA) </td><td style="border: 1px solid #ccc; padding: 5px;"> jloden at gmail dot com </td></tr> </table></p><p>Feedbacks and suggestions are greatly appreciated as well as new testers and coders willing to join the development.<br> For any bug report, patch proposal or feature request, add an entry into the <a href="http://code.google.com/p/psutil/issues/list" rel="nofollow">Issue Tracker</a>.<br> </p><p>Thank you. </p> |
</body> |
</html> |
- |