diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-10-08 22:35:03 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-10-08 22:35:03 +0200 |
commit | ecdaac33f5945be19090531be892791ac99fc597 (patch) | |
tree | f1ad707c0a373fc671797b8334a4840825460e66 /scripts | |
parent | 91c9b3e94d8dab7a94e9d57050b9570b8a3ba4c7 (diff) | |
download | psutil-ecdaac33f5945be19090531be892791ac99fc597.tar.gz |
use python 3 as example in docstrings
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/battery.py | 2 | ||||
-rwxr-xr-x | scripts/cpu_distribution.py | 2 | ||||
-rwxr-xr-x | scripts/disk_usage.py | 2 | ||||
-rwxr-xr-x | scripts/free.py | 2 | ||||
-rwxr-xr-x | scripts/ifconfig.py | 2 | ||||
-rwxr-xr-x | scripts/meminfo.py | 2 | ||||
-rwxr-xr-x | scripts/netstat.py | 2 | ||||
-rwxr-xr-x | scripts/pmap.py | 2 | ||||
-rwxr-xr-x | scripts/procinfo.py | 2 | ||||
-rwxr-xr-x | scripts/ps.py | 2 | ||||
-rwxr-xr-x | scripts/pstree.py | 2 | ||||
-rwxr-xr-x | scripts/sensors.py | 2 | ||||
-rwxr-xr-x | scripts/temperatures.py | 2 | ||||
-rwxr-xr-x | scripts/who.py | 2 | ||||
-rwxr-xr-x | scripts/winservices.py | 2 |
15 files changed, 15 insertions, 15 deletions
diff --git a/scripts/battery.py b/scripts/battery.py index 0da2b958..edf4ce8c 100755 --- a/scripts/battery.py +++ b/scripts/battery.py @@ -7,7 +7,7 @@ """ Show battery information. -$ python scripts/battery.py +$ python3 scripts/battery.py charge: 74% left: 2:11:31 status: discharging diff --git a/scripts/cpu_distribution.py b/scripts/cpu_distribution.py index 08997797..fb39d888 100755 --- a/scripts/cpu_distribution.py +++ b/scripts/cpu_distribution.py @@ -7,7 +7,7 @@ """ Shows CPU workload split across different CPUs. -$ python scripts/cpu_workload.py +$ python3 scripts/cpu_workload.py CPU 0 CPU 1 CPU 2 CPU 3 CPU 4 CPU 5 CPU 6 CPU 7 19.8 20.6 18.2 15.8 6.9 17.3 5.0 20.4 gvfsd pytho kwork chrom unity kwork kwork kwork diff --git a/scripts/disk_usage.py b/scripts/disk_usage.py index 901dbf8c..851ae9b1 100755 --- a/scripts/disk_usage.py +++ b/scripts/disk_usage.py @@ -7,7 +7,7 @@ """ List all mounted disk partitions a-la "df -h" command. -$ python scripts/disk_usage.py +$ python3 scripts/disk_usage.py Device Total Used Free Use % Type Mount /dev/sdb3 18.9G 14.7G 3.3G 77% ext4 / /dev/sda6 345.9G 83.8G 244.5G 24% ext4 /home diff --git a/scripts/free.py b/scripts/free.py index 000323c5..8c3359d8 100755 --- a/scripts/free.py +++ b/scripts/free.py @@ -7,7 +7,7 @@ """ A clone of 'free' cmdline utility. -$ python scripts/free.py +$ python3 scripts/free.py total used free shared buffers cache Mem: 10125520 8625996 1499524 0 349500 3307836 Swap: 0 0 0 diff --git a/scripts/ifconfig.py b/scripts/ifconfig.py index cfd02f0d..ae137fb4 100755 --- a/scripts/ifconfig.py +++ b/scripts/ifconfig.py @@ -7,7 +7,7 @@ """ A clone of 'ifconfig' on UNIX. -$ python scripts/ifconfig.py +$ python3 scripts/ifconfig.py lo: stats : speed=0MB, duplex=?, mtu=65536, up=yes incoming : bytes=1.95M, pkts=22158, errs=0, drops=0 diff --git a/scripts/meminfo.py b/scripts/meminfo.py index 550fcd01..b98aa60b 100755 --- a/scripts/meminfo.py +++ b/scripts/meminfo.py @@ -7,7 +7,7 @@ """ Print system memory information. -$ python scripts/meminfo.py +$ python3 scripts/meminfo.py MEMORY ------ Total : 9.7G diff --git a/scripts/netstat.py b/scripts/netstat.py index fe3bfe40..5a21358e 100755 --- a/scripts/netstat.py +++ b/scripts/netstat.py @@ -7,7 +7,7 @@ """ A clone of 'netstat -antp' on Linux. -$ python scripts/netstat.py +$ python3 scripts/netstat.py Proto Local address Remote address Status PID Program name tcp 127.0.0.1:48256 127.0.0.1:45884 ESTABLISHED 13646 chrome tcp 127.0.0.1:47073 127.0.0.1:45884 ESTABLISHED 13646 chrome diff --git a/scripts/pmap.py b/scripts/pmap.py index 5f7246a1..459927bf 100755 --- a/scripts/pmap.py +++ b/scripts/pmap.py @@ -8,7 +8,7 @@ A clone of 'pmap' utility on Linux, 'vmmap' on macOS and 'procstat -v' on BSD. Report memory map of a process. -$ python scripts/pmap.py 32402 +$ python3 scripts/pmap.py 32402 Address RSS Mode Mapping 0000000000400000 1200K r-xp /usr/bin/python2.7 0000000000838000 4K r--p /usr/bin/python2.7 diff --git a/scripts/procinfo.py b/scripts/procinfo.py index 01974513..f0605386 100755 --- a/scripts/procinfo.py +++ b/scripts/procinfo.py @@ -8,7 +8,7 @@ Print detailed information about a process. Author: Giampaolo Rodola' <g.rodola@gmail.com> -$ python scripts/procinfo.py +$ python3 scripts/procinfo.py pid 4600 name chrome parent 4554 (bash) diff --git a/scripts/ps.py b/scripts/ps.py index 540c032a..a234209f 100755 --- a/scripts/ps.py +++ b/scripts/ps.py @@ -7,7 +7,7 @@ """ A clone of 'ps aux'. -$ python scripts/ps.py +$ python3 scripts/ps.py USER PID %MEM VSZ RSS NICE STATUS START TIME CMDLINE root 1 0.0 220.9M 6.5M sleep Mar27 09:10 /lib/systemd root 2 0.0 0.0B 0.0B sleep Mar27 00:00 kthreadd diff --git a/scripts/pstree.py b/scripts/pstree.py index 0005e4a1..dba9f1bd 100755 --- a/scripts/pstree.py +++ b/scripts/pstree.py @@ -8,7 +8,7 @@ Similar to 'ps aux --forest' on Linux, prints the process list as a tree structure. -$ python scripts/pstree.py +$ python3 scripts/pstree.py 0 ? |- 1 init | |- 289 cgmanager diff --git a/scripts/sensors.py b/scripts/sensors.py index e532beba..911d7c9b 100755 --- a/scripts/sensors.py +++ b/scripts/sensors.py @@ -9,7 +9,7 @@ A clone of 'sensors' utility on Linux printing hardware temperatures, fans speed and battery info. -$ python scripts/sensors.py +$ python3 scripts/sensors.py asus Temperatures: asus 57.0°C (high=None°C, critical=None°C) diff --git a/scripts/temperatures.py b/scripts/temperatures.py index e83df440..f2dd51a7 100755 --- a/scripts/temperatures.py +++ b/scripts/temperatures.py @@ -8,7 +8,7 @@ """ A clone of 'sensors' utility on Linux printing hardware temperatures. -$ python scripts/sensors.py +$ python3 scripts/sensors.py asus asus 47.0 °C (high = None °C, critical = None °C) diff --git a/scripts/who.py b/scripts/who.py index c2299eb0..c1e40729 100755 --- a/scripts/who.py +++ b/scripts/who.py @@ -8,7 +8,7 @@ A clone of 'who' command; print information about users who are currently logged in. -$ python scripts/who.py +$ python3 scripts/who.py giampaolo console 2017-03-25 22:24 loginwindow giampaolo ttys000 2017-03-25 23:28 (10.0.2.2) sshd """ diff --git a/scripts/winservices.py b/scripts/winservices.py index 8792f752..5c710159 100755 --- a/scripts/winservices.py +++ b/scripts/winservices.py @@ -7,7 +7,7 @@ r""" List all Windows services installed. -$ python scripts/winservices.py +$ python3 scripts/winservices.py AeLookupSvc (Application Experience) status: stopped, start: manual, username: localSystem, pid: None binpath: C:\Windows\system32\svchost.exe -k netsvcs |