's/P[Ss][Uu]til/psutil/g'

Hey, I'm just trying to be consistent.
This commit is contained in:
Alessio Sergi 2018-02-15 19:23:50 +01:00
parent 83d47a8bc9
commit 7364b6d4d0
19 changed files with 36 additions and 37 deletions

View File

@ -8,8 +8,7 @@ For an enhancement or new feature: Describe your needs.
#### Versions
* Glances (glances -V):
* PSutil (glances -V):
* Glances & psutil (glances -V):
* Operating System (lsb_release -a):
#### Logs

View File

@ -46,7 +46,7 @@ Example:
> Short and descriptive example bug report title
>
> Glances and PsUtil version used (glances -V)
> Glances and psutil version used (glances -V)
>
> Operating system description (name and version).
>

22
NEWS
View File

@ -17,7 +17,7 @@ Enhancements and new features:
* Remove graph export from Glances #1206
* Add a code of conduct for Glances project's participants #1211
* Context switches bottleneck identification #1212
* Take advantage of the PSUtil issue #1025 (Add process_iter(attrs, ad_value)) #1105
* Take advantage of the psutil issue #1025 (Add process_iter(attrs, ad_value)) #1105
* Nice Process Priority Configuration #1218
* Display debug message if dep lib is not found #1224
* Add a new output mode to stdout #1168
@ -219,7 +219,7 @@ Version 2.8.3
Enhancements and new features:
* Use new sensors-related APIs of Psutil 5.1.0 (issue #1018)
* Use new sensors-related APIs of psutil 5.1.0 (issue #1018)
* Add a "Cloud" plugin to grab stats inside the AWS EC2 API (issue #1029)
Bugs corrected:
@ -714,7 +714,7 @@ Version 2.0
* Load-5 alert are no longer logged (by Nicolargo)
* Rename In/Out by Read/Write for DiskIO according to #339 (by Nicolargo)
* Migrate from pysensors to py3sensors (by Alessio Sergi)
* Migration to PsUtil 2.x (by Nicolargo)
* Migration to psutil 2.x (by Nicolargo)
* New plugins system (by Nicolargo)
* Python 2.x and 3.x compatibility (by Alessio Sergi)
* Code quality improvements (by Alessio Sergi)
@ -730,7 +730,7 @@ Version 1.7.7
=============
* Fix CVS export [issue #348]
* Adapt to PSUtil 2.1.1
* Adapt to psutil 2.1.1
* Compatibility with Python 3.4
* Improve German update
@ -745,7 +745,7 @@ Version 1.7.6
Version 1.7.5
=============
* Force the Pypi installer to use the PsUtil branch 1.x (#333)
* Force the Pypi installer to use the psutil branch 1.x (#333)
Version 1.7.4
=============
@ -815,7 +815,7 @@ Version 1.6.1
* API improvment add time_since_update for disk, process_disk and network
* Improve help display
* Add more dummy FS to the ignore list
* Code refactory: PsUtil < 0.4.1 is depredicated (Thk to Alessio)
* Code refactory: psutil < 0.4.1 is deprecated (Thk to Alessio)
* Correct a bug on the CPU process limit
* Fix crash bug when specifying custom server port
* Add Debian style init script for the Glances server
@ -849,8 +849,8 @@ Version 1.5.2
Version 1.5.1
=============
* Patch for PsUtil 0.4 compatibility
* Test PsUtil version before running Glances
* Patch for psutil 0.4 compatibility
* Test psutil version before running Glances
Version 1.5
===========
@ -876,7 +876,7 @@ Version 1.4.2.1
Version 1.4.2
=============
* Use the new virtual_memory() and virtual_swap() fct (PsUtil)
* Use the new virtual_memory() and virtual_swap() fct (psutil)
* Display "Top process" in logs
* Minor patch on man page for Debian packaging
* Code optimization (less try and except)
@ -884,7 +884,7 @@ Version 1.4.2
Version 1.4.1.1
===============
* Minor patch to disable Process IO for OS X (not available in PsUtil)
* Minor patch to disable Process IO for OS X (not available in psutil)
Version 1.4.1
=============
@ -896,7 +896,7 @@ Version 1.4.1
Version 1.4
===========
* Goodby StatGrab... Welcome to the PsUtil library !
* Goodby StatGrab... Welcome to the psutil library !
* No more autotools, use setup.py to install (or package)
* Only major stats (CPU, Load and memory) use background colors
* Improve operating system name detection

View File

@ -15,7 +15,7 @@ To install, simply use ``pip``:
*Note*: Python headers are required to install `psutil`_. For example,
on Debian/Ubuntu you need to install first the *python-dev* package.
For Fedora/CentOS/RHEL install first *python-devel* package. For Windows,
just install PsUtil from the binary installation file.
just install psutil from the binary installation file.
You can also install the following libraries in order to use optional
features (like the Web interface, export modules...):

View File

@ -35,7 +35,7 @@ __license__ = 'LGPLv3'
try:
from psutil import __version__ as psutil_version
except ImportError:
print('PSutil library not found. Glances cannot start.')
print('psutil library not found. Glances cannot start.')
sys.exit(1)
# Import Glances libs
@ -121,9 +121,9 @@ def main():
# Catch the CTRL-C signal
signal.signal(signal.SIGINT, __signal_handler)
# Log Glances and PSutil version
# Log Glances and psutil version
logger.info('Start Glances {}'.format(__version__))
logger.info('{} {} and PSutil {} detected'.format(
logger.info('{} {} and psutil {} detected'.format(
platform.python_implementation(),
platform.python_version(),
psutil_version))

View File

@ -58,7 +58,7 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# The PSUtil 2.0 include psutil.cpu_count() and psutil.cpu_count(logical=False)
# The psutil 2.0 include psutil.cpu_count() and psutil.cpu_count(logical=False)
# Return a dict with:
# - phys: physical cores only (hyper thread CPUs are excluded)
# - log: logical CPUs in the system

View File

@ -96,7 +96,7 @@ class Plugin(GlancesPlugin):
return self.stats
def update_local(self):
"""Update CPU stats using PSUtil."""
"""Update CPU stats using psutil."""
# Grab CPU stats using psutil's cpu_percent and cpu_times_percent
# Get all possible values for CPU stats: user, system, idle,
# nice (UNIX), iowait (Linux), irq (Linux, FreeBSD), steal (Linux 2.6.11+)

View File

@ -70,7 +70,7 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# Grab the stat using the PsUtil disk_io_counters method
# Grab the stat using the psutil disk_io_counters method
# read_count: number of reads
# write_count: number of writes
# read_bytes: number of bytes read

View File

@ -97,7 +97,7 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# Grab the stats using the PsUtil disk_partitions
# Grab the stats using the psutil disk_partitions
# If 'all'=False return physical devices only (e.g. hard disks, cd-rom drives, USB keys)
# and ignore all others (e.g. memory partitions such as /dev/shm)
try:

View File

@ -55,7 +55,7 @@ class Plugin(GlancesPlugin):
def generate_view_data(self):
"""Generate the views."""
self.view_data['version'] = '{} {}'.format('Glances', __version__)
self.view_data['psutil_version'] = ' with PSutil {}'.format(psutil_version)
self.view_data['psutil_version'] = ' with psutil {}'.format(psutil_version)
try:
self.view_data['configuration_file'] = 'Configuration file: {}'.format(self.config.loaded_config_file)

View File

@ -82,10 +82,10 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# Grab MEM using the PSUtil virtual_memory method
# Grab MEM using the psutil virtual_memory method
vm_stats = psutil.virtual_memory()
# Get all the memory stats (copy/paste of the PsUtil documentation)
# Get all the memory stats (copy/paste of the psutil documentation)
# 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.

View File

@ -70,10 +70,10 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# Grab SWAP using the PSUtil swap_memory method
# Grab SWAP using the psutil swap_memory method
sm_stats = psutil.swap_memory()
# Get all the swap stats (copy/paste of the PsUtil documentation)
# Get all the swap stats (copy/paste of the psutil documentation)
# total: total swap memory in bytes
# used: used swap memory in bytes
# free: free swap memory in bytes

View File

@ -81,7 +81,7 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# Grab network interface stat using the PsUtil net_io_counter method
# Grab network interface stat using the psutil net_io_counter method
try:
netiocounters = psutil.net_io_counters(pernic=True)
except UnicodeDecodeError:

View File

@ -45,10 +45,10 @@ def convert_timedelta(delta):
def split_cmdline(cmdline):
"""Return path, cmd and arguments for a process cmdline."""
# There is an issue in PsUtil for Electron/Atom processes (maybe others...)
# There is an issue in psutil for Electron/Atom processes (maybe others...)
# Tracked by https://github.com/nicolargo/glances/issues/1192
# https://github.com/giampaolo/psutil/issues/1179
# Add this dirty workarround (to be removed when the PsUtil is solved)
# Add this dirty workarround (to be removed when the psutil is solved)
if len(cmdline) == 1:
cmdline = shlex.split(cmdline[0])
# /End of the direty workarround

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""PsUtil plugin."""
"""psutil plugin."""
from glances import psutil_version_info
from glances.plugins.glances_plugin import GlancesPlugin
@ -46,9 +46,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self.reset()
# Return PsUtil version as a tuple
# Return psutil version as a tuple
if self.input_method == 'local':
# PsUtil version only available in local
# psutil version only available in local
try:
self.stats = psutil_version_info
except NameError:

View File

@ -68,7 +68,7 @@ class Plugin(GlancesPlugin):
# Get the latest CPU percent value
self.stats['cpu'] = cpu_percent.get()
self.stats['percpu'] = cpu_percent.get(percpu=True)
# Use the PsUtil lib for the memory (virtual and swap)
# Use the psutil lib for the memory (virtual and swap)
self.stats['mem'] = psutil.virtual_memory().percent
self.stats['swap'] = psutil.swap_memory().percent
elif self.input_method == 'snmp':

View File

@ -244,7 +244,7 @@ class GlancesGrabSensors(object):
else:
self.init_fan = True
# !!! Disable Fan: High CPU consumption with PSUtil 5.2.0 or higher
# !!! Disable Fan: High CPU consumption with psutil 5.2.0 or higher
# Delete the two followings lines when corrected (https://github.com/giampaolo/psutil/issues/1199)
self.init_fan = False
logger.debug("Fan speed sensors disable (see https://github.com/giampaolo/psutil/issues/1199)")

View File

@ -87,7 +87,7 @@ class Plugin(GlancesPlugin):
if self.input_method == 'local':
# Update stats using the standard system lib
# Grab network interface stat using the PsUtil net_io_counter method
# Grab network interface stat using the psutil net_io_counter method
try:
netiocounters = psutil.net_io_counters(pernic=True)
except UnicodeDecodeError:

View File

@ -35,7 +35,7 @@ class GlancesProcesses(object):
def __init__(self, cache_timeout=60):
"""Init the class to collect stats about processes."""
# Add internals caches because PSUtil do not cache all the stats
# Add internals caches because psutil do not cache all the stats
# See: https://code.google.com/p/psutil/issues/detail?id=462
self.username_cache = {}
self.cmdline_cache = {}