-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- The Process button now displays an inline button that returns a table with information about the TOP 10 processes in terms of CPU and memory usage. - If the bot is running in a Docker environment, limited information about processes is displayed (usually about bot processes)
- Loading branch information
Showing
5 changed files
with
86 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{# templates/b_top_processes.jinja2 #} | ||
{# Template for displaying top CPU and memory consuming processes #} | ||
|
||
{{ thought_balloon }} System Resource Usage - Top Processes | ||
|
||
<pre language="bash"> | ||
PID | Process Name | CPU | Memory | ||
------------------------------------- | ||
{%- for process in context.processes %} | ||
|
||
{{ "%-5d"|format(process.pid) }} | {{ "%-13s"|format(process.name[:18] + ('...' if process.name|length > 13 else '')) }} | {{ "%3.1f%%"|format(process.cpu_percent) }} | {{ "%5.1f%%"|format(process.memory_percent) }} | ||
{%- endfor %} | ||
</pre> | ||
|
||
{{ information }} Updated: {{ context.timestamp }} | ||
|
||
{%- if context.running_in_docker %} | ||
|
||
|
||
{{ warning }} <i>Limited resource information available in Docker environment</i> | ||
{%- endif %} | ||
|
||
{# Display warning if no processes found #} | ||
{%- if not context.processes %} | ||
{{ warning }} No process data available | ||
{%- endif %} |