* Handle disconnected sockets in unbound collector.
This adds an explicit check for the case of a socket that's already
disconnected and skips logging an error message. The conditionn
technically is an error, but it's one that we can recover from trivially
by just doing nothing in this case (we were trying to disconnect the
scoket anyway, so if it's already disconnected, we don't need to change
anything).
This uses Python's `errno` module so that we can detect this situation
in a system-agnostic manner.
Fixes#6434
<!--
Describe the change in summary section, including rationale and degin decisions.
Include "Fixes #nnn" if you are fixing an existing issue.
In "Component Name" section write which component is changed in this PR. This
will help us review your PR quicker.
If you have more information you want to add, write them in "Additional
Information" section. This is usually used to help others understand your
motivation behind this change. A step-by-step reproduction of the problem is
helpful if there is no related issue.
-->
##### Summary
Add memory free
Add per process memory usage
##### Component Name
nvidia_smi
##### Additional Information
<!--
Describe the change in summary section, including rationale and degin decisions.
Include "Fixes #nnn" if you are fixing an existing issue.
In "Component Name" section write which component is changed in this PR. This
will help us review your PR quicker.
If you have more information you want to add, write them in "Additional
Information" section. This is usually used to help others understand your
motivation behind this change. A step-by-step reproduction of the problem is
helpful if there is no related issue.
-->
##### Summary
Fixes: #5608
Add ssl connection support to MySQLService
> python-mysqlclient connection
```
:param dict ssl:
dictionary or mapping contains SSL connection parameters;
see the MySQL documentation for more details
(mysql_ssl_set()). If this is set, and the client does not
support SSL, NotSupportedError will be raised.
```
[SSL connection parameters:](https://dev.mysql.com/doc/refman/5.6/en/mysql-ssl-set.html)
- **key**: The path name of the client private key file.
- **cert**: The path name of the client public key certificate file.
- **ca**: The path name of the Certificate Authority (CA) certificate file. This option, if used, must specify the same certificate used by the server.
- **capath**: The path name of the directory that contains trusted SSL CA certificate files.
- **cipher**: The list of permitted ciphers for SSL encryption.
##### Component Name
[`collectors/python.d.plugin/python_modules/bases/FrameworkServices/MySQLService`](https://github.com/netdata/netdata/blob/master/collectors/python.d.plugin/python_modules/bases/FrameworkServices/MySQLService.py)
___
@woosley please test it
```yaml
tcp:
name : 'local'
user : 'user'
pass : 'pass'
host : 'localhost'
port : '3306'
ssl:
key: 'path/to/key'
cert: 'path/to/cet'
ca: 'path/to/ca'
```
<!--
Describe the change in summary section, including rationale and degin decisions.
Include "Fixes #nnn" if you are fixing an existing issue.
In "Component Name" section write which component is changed in this PR. This
will help us review your PR quicker.
If you have more information you want to add, write them in "Additional
Information" section. This is usually used to help others understand your
motivation behind this change. A step-by-step reproduction of the problem is
helpful if there is no related issue.
-->
##### Summary
python loaders module cleanup
- move `load_module` to `python.d.plugin`
- use `load_config` in unbound module instead of YamlOrderedLoad class
- remove all classes from `loaders.py` - no longer used
##### Component Name
[`collectors/python.d.plugin/python_modules/bases/loaders`](https://github.com/netdata/netdata/blob/master/collectors/python.d.plugin/python_modules/bases/loaders.py)
##### Additional Information
<!--
Describe the change in summary section, including rationale and degin decisions.
Include "Fixes #nnn" if you are fixing an existing issue.
In "Component Name" section write which component is changed in this PR. This
will help us review your PR quicker.
If you have more information you want to add, write them in "Additional
Information" section. This is usually used to help others understand your
motivation behind this change. A step-by-step reproduction of the problem is
helpful if there is no related issue.
-->
##### Summary
python SimpleService cleanup 1 - remove OldVersionCompatibility
##### Component Name
[`collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService`](collectors/python.d.plugin/python_modules/bases/FrameworkServices)
##### Additional Information
it is dead code, no longer supported
##### Summary
This PR adds (major) changes only to `python.d.plugin` file.
Fixes: #5525
`pyhton.d.plugin` imports a lot of additional packages during initial module initialization/job creating/checking and there is no way to unimport them, even if they arn't needed. It consumes relatively a lot of ram.
___
Memory utilization comparing before/after the PR (one job `example` module, py3.7.2):
> 21.1 => 8.8 MiB

##### Component Name
[`collectors/python.d.plugin`](https://github.com/netdata/netdata/blob/master/collectors/python.d.plugin/python.d.plugin.in)
##### Additional Information
This PR adds separate process for initial module checking.
Logic:
- main process spawns checker process
- checker process loads every module, loads module config, creates jobs and runs job.check() for every job, if check success it adds the job to the list.
- checker process returns list of modules and jobs.
- main process loads only active modules, etc.
Using `with connection as cursor` has been deprecated in 2017 and now with 1.4.0 the API call has been removed. Therefore the cursor needs to be created and closed "manually"
<!--
Describe the change in summary section, including rationale and degin decisions.
Include "Fixes #nnn" if you are fixing an existing issue.
In "Component Name" section write which component is changed in this PR. This
will help us review your PR quicker.
If you have more information you want to add, write them in "Additional
Information" section. This is usually used to help others understand your
motivation behind this change. A step-by-step reproduction of the problem is
helpful if there is no related issue.
-->
##### Summary
Fix: #4756
`python.d.plugin` updates:
* remove `retries` option
* make `penalty` configurable (enabled by default, max is 10 minutes)
> penalty indicates whether to apply penalty to update_every in case of failures.
> Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
> penalty: yes
##### Component Name
`python.d.plugin`
##### Additional Information
This updates our copy of the libsensors Python bindings to the most
recent upstream copy, which provides proper errors instead of just
raising bare Exceptions, and updates our code to catch those errors
instead of catching bare exceptions.
##### Summary
<!--- Describe the change below, including rationale and design decisions -->
Removing variables which are not used in Python code
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
##### Component Name
<!--- Write the short name of the module or plugin below -->
- python.d.plugin
- portcheck python module
- postgres python module
##### Additional Information
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste log output below, e.g. before and after your change -->
```paste below
```