DiscordBotLinuxMonitor 1.4.0__tar.gz → 1.4.2__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.
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/DiscordBotLinuxMonitor.egg-info/PKG-INFO +1 -1
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/PKG-INFO +1 -1
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/discordbotlinuxmonitor/__main__.py +6 -2
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/discordbotlinuxmonitor/discordbotlinuxmonitor.py +3 -3
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/setup.py +1 -1
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/DiscordBotLinuxMonitor.egg-info/SOURCES.txt +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/DiscordBotLinuxMonitor.egg-info/dependency_links.txt +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/DiscordBotLinuxMonitor.egg-info/requires.txt +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/DiscordBotLinuxMonitor.egg-info/top_level.txt +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/LICENSE.md +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/README.md +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/discordbotlinuxmonitor/__init__.py +0 -0
- {discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: DiscordBotLinuxMonitor
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: From discord channels: 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/Discord-Bot-Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: DiscordBotLinuxMonitor
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: From discord channels: 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/Discord-Bot-Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
{discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/discordbotlinuxmonitor/__main__.py
RENAMED
|
@@ -110,9 +110,13 @@ def main() -> None:
|
|
|
110
110
|
async def ports(interaction: discord.Interaction) -> None: # type: ignore
|
|
111
111
|
await discord_bot_linux_monitor.ports(interaction)
|
|
112
112
|
|
|
113
|
-
@discord_bot.tree.command(name="list_processes", description="[Private] 📋 List active processes 📋")
|
|
113
|
+
@discord_bot.tree.command(name="list_processes", description="[Private] 📋 List active processes (ordered by RAM usage) 📋")
|
|
114
114
|
async def list_processes(interaction: discord.Interaction) -> None: # type: ignore
|
|
115
|
-
await discord_bot_linux_monitor.list_processes(interaction)
|
|
115
|
+
await discord_bot_linux_monitor.list_processes(interaction, order_by_ram=True)
|
|
116
|
+
|
|
117
|
+
@discord_bot.tree.command(name="list_processes_by_cpu_usage", description="[Private] 📋 List active processes (ordered by CPU usage) 📋")
|
|
118
|
+
async def list_processes_by_cpu_usage(interaction: discord.Interaction) -> None: # type: ignore
|
|
119
|
+
await discord_bot_linux_monitor.list_processes(interaction, order_by_ram=False)
|
|
116
120
|
|
|
117
121
|
@discord_bot.tree.command(name="kill_process", description="[Private] 🚫 Stop a process by PID 🚫")
|
|
118
122
|
async def kill_process(interaction: discord.Interaction, pid: int) -> None: # type: ignore
|
|
@@ -33,7 +33,7 @@ __email__ = "quentin@comte-gaz.com"
|
|
|
33
33
|
__license__ = "MIT License"
|
|
34
34
|
__copyright__ = "Copyright Quentin Comte-Gaz (2024)"
|
|
35
35
|
__python_version__ = "3.+"
|
|
36
|
-
__version__ = "1.4.
|
|
36
|
+
__version__ = "1.4.2 (2024/10/07)"
|
|
37
37
|
__status__ = "Usable for any Linux project"
|
|
38
38
|
|
|
39
39
|
# pyright: reportMissingTypeStubs=false
|
|
@@ -736,7 +736,7 @@ class DiscordBotLinuxMonitor:
|
|
|
736
736
|
logging.exception(msg=out_msg)
|
|
737
737
|
await self._interaction_followup_send_no_limit(interaction=interaction, msg=out_msg)
|
|
738
738
|
|
|
739
|
-
async def list_processes(self, interaction: discord.Interaction) -> None:
|
|
739
|
+
async def list_processes(self, interaction: discord.Interaction, order_by_ram: bool) -> None:
|
|
740
740
|
if not self._check_if_valid_guild(guild=interaction.guild):
|
|
741
741
|
return
|
|
742
742
|
if not (await self._is_bot_channel_interaction(interaction=interaction, send_message_if_not_bot=True)):
|
|
@@ -750,7 +750,7 @@ class DiscordBotLinuxMonitor:
|
|
|
750
750
|
|
|
751
751
|
try:
|
|
752
752
|
# Récupérer la liste des processus actifs
|
|
753
|
-
out_msg: str = await self.monitoring.get_ordered_processes()
|
|
753
|
+
out_msg: str = await self.monitoring.get_ordered_processes(get_non_consuming_processes=False, order_by_ram=order_by_ram)
|
|
754
754
|
|
|
755
755
|
# Répondre à l'utilisateur
|
|
756
756
|
await self._interaction_followup_send_no_limit(interaction=interaction, msg=out_msg)
|
|
@@ -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="DiscordBotLinuxMonitor",
|
|
9
|
-
version="1.4.
|
|
9
|
+
version="1.4.2",
|
|
10
10
|
description="From discord channels: 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
|
{discordbotlinuxmonitor-1.4.0 → discordbotlinuxmonitor-1.4.2}/discordbotlinuxmonitor/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|