mirror of https://github.com/nicolargo/glances
Amp with pipe do not work #1976
parent
320a1ffcae
commit
7003028f9e
|
@ -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
|
||||
----------------
|
||||
|
||||
|
|
974
docs/api.rst
974
docs/api.rst
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
.
|
||||
|
|
Loading…
Reference in New Issue