LinuxMonitor 1.5.7__tar.gz → 1.5.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8/LinuxMonitor.egg-info}/PKG-INFO +4 -1
- {linuxmonitor-1.5.7/LinuxMonitor.egg-info → linuxmonitor-1.5.8}/PKG-INFO +4 -1
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/README.md +3 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/linuxmonitor/linuxmonitor.py +4 -4
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/setup.py +1 -1
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/LICENSE.md +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/LinuxMonitor.egg-info/SOURCES.txt +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/LinuxMonitor.egg-info/dependency_links.txt +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/LinuxMonitor.egg-info/requires.txt +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/LinuxMonitor.egg-info/top_level.txt +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/linuxmonitor/__init__.py +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/linuxmonitor/__main__.py +0 -0
- {linuxmonitor-1.5.7 → linuxmonitor-1.5.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.8
|
|
4
4
|
Summary: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
|
|
5
5
|
Home-page: https://github.com/QuentinCG/Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -98,6 +98,8 @@ echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /bin/systemctl" >> /etc/sudoers.d/USERNA
|
|
|
98
98
|
echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /etc/init.d/apache2" >> /etc/sudoers.d/USERNAME_HERE
|
|
99
99
|
echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /etc/init.d/mariadb" >> /etc/sudoers.d/USERNAME_HERE
|
|
100
100
|
```
|
|
101
|
+
- Install missing packages :
|
|
102
|
+
- If `last` command not available, install needed package: `sudo apt install wtmpdb util-linux`
|
|
101
103
|
- Check monitor possibilities (you can find it out by calling `python -m linuxmonitor --help` from the root of this repository)
|
|
102
104
|
- Load your shell or python script
|
|
103
105
|
|
|
@@ -213,6 +215,7 @@ Example config entry:
|
|
|
213
215
|
Example of python script using this library:
|
|
214
216
|
- [Discord Bot Linux Monitor](https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library)
|
|
215
217
|
|
|
218
|
+
|
|
216
219
|
## License
|
|
217
220
|
|
|
218
221
|
This project is under MIT license. This means you can use it as you want (just don't delete the library header).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.8
|
|
4
4
|
Summary: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
|
|
5
5
|
Home-page: https://github.com/QuentinCG/Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -98,6 +98,8 @@ echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /bin/systemctl" >> /etc/sudoers.d/USERNA
|
|
|
98
98
|
echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /etc/init.d/apache2" >> /etc/sudoers.d/USERNAME_HERE
|
|
99
99
|
echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /etc/init.d/mariadb" >> /etc/sudoers.d/USERNAME_HERE
|
|
100
100
|
```
|
|
101
|
+
- Install missing packages :
|
|
102
|
+
- If `last` command not available, install needed package: `sudo apt install wtmpdb util-linux`
|
|
101
103
|
- Check monitor possibilities (you can find it out by calling `python -m linuxmonitor --help` from the root of this repository)
|
|
102
104
|
- Load your shell or python script
|
|
103
105
|
|
|
@@ -213,6 +215,7 @@ Example config entry:
|
|
|
213
215
|
Example of python script using this library:
|
|
214
216
|
- [Discord Bot Linux Monitor](https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library)
|
|
215
217
|
|
|
218
|
+
|
|
216
219
|
## License
|
|
217
220
|
|
|
218
221
|
This project is under MIT license. This means you can use it as you want (just don't delete the library header).
|
|
@@ -57,6 +57,8 @@ echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /bin/systemctl" >> /etc/sudoers.d/USERNA
|
|
|
57
57
|
echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /etc/init.d/apache2" >> /etc/sudoers.d/USERNAME_HERE
|
|
58
58
|
echo "USERNAME_HERE ALL=(ALL) NOPASSWD: /etc/init.d/mariadb" >> /etc/sudoers.d/USERNAME_HERE
|
|
59
59
|
```
|
|
60
|
+
- Install missing packages :
|
|
61
|
+
- If `last` command not available, install needed package: `sudo apt install wtmpdb util-linux`
|
|
60
62
|
- Check monitor possibilities (you can find it out by calling `python -m linuxmonitor --help` from the root of this repository)
|
|
61
63
|
- Load your shell or python script
|
|
62
64
|
|
|
@@ -172,6 +174,7 @@ Example config entry:
|
|
|
172
174
|
Example of python script using this library:
|
|
173
175
|
- [Discord Bot Linux Monitor](https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library)
|
|
174
176
|
|
|
177
|
+
|
|
175
178
|
## License
|
|
176
179
|
|
|
177
180
|
This project is under MIT license. This means you can use it as you want (just don't delete the library header).
|
|
@@ -31,9 +31,9 @@ Non exhaustive list of features (available by using it in shell or in python scr
|
|
|
31
31
|
__author__ = 'Quentin Comte-Gaz'
|
|
32
32
|
__email__ = "quentin@comte-gaz.com"
|
|
33
33
|
__license__ = "MIT License"
|
|
34
|
-
__copyright__ = "Copyright Quentin Comte-Gaz (
|
|
34
|
+
__copyright__ = "Copyright Quentin Comte-Gaz (2026)"
|
|
35
35
|
__python_version__ = "3.+"
|
|
36
|
-
__version__ = "1.5.
|
|
36
|
+
__version__ = "1.5.8 (2026/08/22)"
|
|
37
37
|
__status__ = "Usable for any Linux project"
|
|
38
38
|
|
|
39
39
|
import json
|
|
@@ -1575,11 +1575,11 @@ class LinuxMonitor:
|
|
|
1575
1575
|
:return: A dictionary containing the recent user logins.
|
|
1576
1576
|
"""
|
|
1577
1577
|
# Format the date without microseconds (milliseconds)
|
|
1578
|
-
past_date: str = (datetime.now() - timedelta(days=days)).strftime('%Y-%m-%
|
|
1578
|
+
past_date: str = (datetime.now() - timedelta(days=days)).strftime('%Y-%m-%d %H:%M:%S')
|
|
1579
1579
|
|
|
1580
1580
|
try:
|
|
1581
1581
|
# Fetch the logs since the specified date
|
|
1582
|
-
command: str = f"sudo last --ip --hostlast --time-format iso --since '{past_date}' | grep 'pts/' || true"
|
|
1582
|
+
command: str = f"sudo /usr/bin/last --ip --hostlast --time-format iso --since '{past_date}' | grep 'pts/' || true"
|
|
1583
1583
|
last_output: str = subprocess.check_output(
|
|
1584
1584
|
args=command,
|
|
1585
1585
|
shell=True,
|
|
@@ -6,7 +6,7 @@ with io.open(file='README.md', mode='r', encoding='utf-8') as readme_file:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="LinuxMonitor",
|
|
9
|
-
version="1.5.
|
|
9
|
+
version="1.5.8",
|
|
10
10
|
description="Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)",
|
|
11
11
|
long_description=readme,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|