Skip to content

Commit 194ae67

Browse files
committed
Update docs but 'make docs' do not work...
1 parent 8107525 commit 194ae67

File tree

3 files changed

+146
-670
lines changed

3 files changed

+146
-670
lines changed

docs/aoa/ps.rst

+58-1
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,61 @@ Accumulated per program — key 'j'
199199
When activated ('j' hotkey or --programs option in the command line), processes are merged
200200
to display which programs are active. The columns show the accumulated cpu consumption, the
201201
accumulated virtual and resident memory consumption, the accumulated transferred data I/O.
202-
The PID columns is replaced by a NPROCS column which is the number of processes.
202+
The PID columns is replaced by a NPROCS column which is the number of processes.
203+
204+
Export process
205+
--------------
206+
207+
Glances version 4 introduces a new feature to export specifics processes. In order to use this
208+
feature, you need to use the export option in the processlist section of the Glances configuration
209+
file.
210+
211+
The export option is one of the following:
212+
- a comma separated list of process names or regular expressions
213+
- a single filter (see above)
214+
215+
Example number one, export all processes with the name 'python':
216+
217+
.. code-block:: ini
218+
219+
[processlist]
220+
export=.*python.*
221+
222+
Example number two, export all processes with the name 'python' or 'bash':
223+
224+
.. code-block:: ini
225+
226+
[processlist]
227+
export=.*python.*,.*bash.*
228+
229+
Example number three, export all processes belong to the user 'nicolargo':
230+
231+
.. code-block:: ini
232+
233+
[processlist]
234+
export=username:nicolargo
235+
236+
The output of the export use the PID as the key (for example if you want to export firefox process
237+
to a CSV file):
238+
239+
Configuration file (glances.conf):
240+
241+
.. code-block:: ini
242+
243+
[processlist]
244+
export=.*firefox.*
245+
246+
Command line example:
247+
248+
.. code-block:: bash
249+
250+
glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet
251+
252+
the result will be:
253+
254+
.. code-block:: csv
255+
256+
timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max
257+
2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0
258+
2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0
259+

0 commit comments

Comments
 (0)