Amp with pipe do not work #1976

pull/2033/head
nicolargo 2022-04-10 15:50:39 +02:00
parent 320a1ffcae
commit 7003028f9e
3 changed files with 462 additions and 536 deletions

View File

@ -50,7 +50,7 @@ less than countmin):
.. image:: ../_static/amp-python-warning.png
If the regex option is not defined, the AMP will be executed every refresh
time and the process count will not be displayed (countmin and countmax will
time and the process count will not be displayed (countmin and countmax will
be ignored).
For example:
@ -63,6 +63,26 @@ For example:
one_line=false
command=sysctl net.netfilter.nf_conntrack_count;sysctl net.netfilter.nf_conntrack_max
For security reason, pipe is not directly allowed in a AMP command but you create a sheel
script with your command:
.. code-block:: ini
$ cat /usr/local/bin/mycommand.sh
#!/bin/sh
ps -aux | wc -l
and use it in the amps:
.. code-block:: ini
[amp_amptest]
enable=true
regex=.*
refresh=15
one_line=false
command=/usr/local/bin/mycommand.sh
User defined AMP
----------------

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "Mar 13, 2022" "3.2.5_beta01" "Glances"
.TH "GLANCES" "1" "Apr 10, 2022" "3.2.5_beta01" "Glances"
.SH NAME
glances \- An eye on your system
.