Comments (7)
By default, unless you run it with -children=false, it will group all processes that don't match a different config section into the same section as their parent. See what ps axuwf
reports, and take a look at the namedprocess_namegroup_num_procs gauge.
from process-exporter.
Hi,
ps auxwf | grep postgres
root 13977 0.0 0.0 103324 852 pts/4 S+ 10:48 0:00 \_ grep postgres
postgres 3201 0.0 0.0 187028 4316 ? S Aug08 0:02 /usr/pgsql-9.6/bin/postmaster -D /u01/postgres
postgres 3203 0.0 0.0 184900 1452 ? Ss Aug08 0:00 \_ postgres: logger process
postgres 3205 0.0 0.0 187160 2060 ? Ss Aug08 0:02 \_ postgres: checkpointer process
postgres 3206 0.0 0.0 187028 1580 ? Ss Aug08 0:00 \_ postgres: writer process
postgres 3207 0.0 0.0 187028 1640 ? Ss Aug08 0:00 \_ postgres: wal writer process
postgres 3208 0.0 0.0 188140 2448 ? Ss Aug08 0:00 \_ postgres: autovacuum launcher process
postgres 3209 0.0 0.0 191168 5268 ? Ss Aug08 0:21 \_ postgres: stats collector process
postgres 3237 0.0 0.0 193420 8188 ? Ss Aug08 0:03 \_ postgres: postgres postgres 127.0.0.1(36327) idle
All postgres processes are childrens of postmaster
I run with children=false or true but nothing changed
In the results only two children process are found
namedprocess_namegroup_num_procs
postgres: logger process 1
postgres: stats collector process 1
How can I collect all of postgres childrens separately ?
or may be there is a way to combine it to one postmaster process ?
And no one postgres or postmaster process are found by
cmdline:
- '.+'
from process-exporter.
Well, may be I have the same question.
Here are all the processes what I want to collect,include sixteen processes named batman and one process named sidekiq xxx batman
ps auxwf|grep batman
root 19568 0.0 0.0 103264 844 pts/1 S+ 20:11 0:00 \_ grep batman
deploy 11731 12.6 6.3 5570140 2091580 ? Sl Aug07 981:48 sidekiq 4.2.10 batman [0 of 35 busy]
deploy 12406 0.0 0.3 393752 127852 ? Sl Aug07 0:07 unicorn master -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 23635 2.5 0.7 864948 243832 ? Sl Aug10 103:02 \_ unicorn worker[14] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 19456 2.2 0.7 870876 250088 ? Sl 02:14 24:14 \_ unicorn worker[0] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24120 2.2 0.7 858580 239856 ? Sl 02:15 24:04 \_ unicorn worker[9] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24416 2.2 0.6 834340 216560 ? Sl 02:15 24:39 \_ unicorn worker[2] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24496 2.3 0.6 844020 222728 ? Sl 02:15 24:54 \_ unicorn worker[8] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24665 2.2 0.6 841780 219952 ? Sl 02:15 24:30 \_ unicorn worker[5] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24728 2.2 0.7 865060 243792 ? Sl 02:15 24:30 \_ unicorn worker[4] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24915 2.1 0.6 839096 217880 ? Sl 02:15 23:29 \_ unicorn worker[1] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24918 2.2 0.7 868380 245696 ? Sl 02:15 24:01 \_ unicorn worker[6] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 24921 2.1 0.6 839104 221352 ? Sl 02:15 22:41 \_ unicorn worker[12] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 25529 2.2 0.6 848428 228476 ? Sl 02:15 24:13 \_ unicorn worker[3] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 25532 2.3 0.7 856024 240504 ? Sl 02:15 25:21 \_ unicorn worker[11] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 27056 2.3 0.6 842908 221744 ? Sl 02:16 24:44 \_ unicorn worker[13] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 31434 2.2 0.7 841436 230408 ? Sl 02:17 24:29 \_ unicorn worker[10] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
deploy 31438 2.2 0.6 850824 229468 ? Sl 02:17 24:31 \_ unicorn worker[7] -c /opt/work/batman/current/config/unicorn/production.rb -E deployment -D
and here is my yml file
process_names:
- name: "batman"
comm:
- ruby
cmdline:
- ^unicorn\s.+batman.+production.rb\s.+
- name: "sidekiq-batman"
comm:
- ruby
cmdline:
- ^sidekiq\s.+batman.*
now I could collect the process info of batman without sidekiq-batman. The regex is right, so what's my problem?I have been stuck for two days...Thanks for any suggestion!
from process-exporter.
The newest pre-release 0.3.7 includes a -debug option that may answer your question. I suggest using it with the -once-to-stdout option as it produces quite a lot of output.
from process-exporter.
Wow,thank you very much for newest process_exportert.I have tried to use option -debug and -once-to-stdout for my process_exporter.
./process-exporter -config.path process-exporter.yaml -debug -once-to-stdout >log 2>&1
And I could read the log 'reading metrics for Pid xxxx'
2018/08/13 14:14:12 Reading metrics from /proc based on "process-exporter.yaml"
2018/08/13 14:14:12 using config matchnamer: [[comms: [ruby] cmdlines: [^unicorn\s.+batman.+production.rb\s.+]] [comms: [ruby] cmdlines: [^unicorn\s.+waka.+production.rb\s.+]] [comms: [ruby] cmdline
s: [^unicorn\s.+fishtrip.+production.rb\s.+]] [comms: [ruby] cmdlines: [^unicorn\s.+hunter-x-hunter.+production.rb\s.+]] [comms: [ruby] cmdlines: [^unicorn\s.+finder.+production.rb\s.+]] [comms: [ru
by] cmdlines: [^sidekiq\s.+batman.*]] [comms: [ruby] cmdlines: [^sidekiq\s.+waka.*]] [comms: [ruby] cmdlines: [^sidekiq\s.+fishtrip.*]] [comms: [ruby] cmdlines: [^sidekiq\s.+hunter-x-hunter.*]] [com
ms: [ruby] cmdlines: [^sidekiq\s.+finder.*]] [comms: [ruby] cmdlines: [^/opt.+batman.+rake]] [comms: [ruby] cmdlines: [^/opt.+hunter-x-hunter.+rake]]]
2018/08/13 14:14:12 found new proc: {Pid:1 StartTimeRel:3}:{Name:init Cmdline:[/sbin/init] ParentPid:0 StartTime:2016-12-16 03:15:19.03 +0000 UTC EffectiveUID:0}
2018/08/13 14:14:12 error reading metrics for {Pid:2 StartTimeRel:3}: EOF
2018/08/13 14:14:12 error reading metrics for {Pid:3 StartTimeRel:3}: EOF
2018/08/13 14:14:12 error reading metrics for {Pid:4 StartTimeRel:3}: EOF
2018/08/13 14:14:12 error reading metrics for {Pid:5 StartTimeRel:3}: EOF
...
Could all Pids be captured by process_exporter ? I couldn't find the Pid:4168 in the log.
ps -ef|grep sidekiq
deploy 4168 1 6 14:04 ? 00:01:04 sidekiq 4.2.10 batman [0 of 35 busy]
I could find the 4168 process in the path /proc/4168.
So,I think it's pivotal.
Thanks for your help once more!
from process-exporter.
I think my problem has been solved.
The question is I used wrong version which is pre-linux-386 for my amd64 linux OS.
Thanks for your help!
from process-exporter.
Great!
from process-exporter.
Related Issues (20)
- Is it possible to have process network io metrics?
- exec docker run cannot create a docker container
- Can we get the top 10 process in the machine which is having high cpu usage HOT 14
- How to monitor Java processes ? HOT 1
- grafana dasboard link 404 now
- can we also get cpu io_wait and idle time per process?
- Specifying threads flag in front of config flag causes the config to be ignored HOT 1
- How to differienciate mutile process with same process name? HOT 1
- While process-exporter restart,namedprocess_namegroup_cpu_seconds_total resets to zero
- Exe full and arguments HOT 4
- Remove process group when namedprocess_namegroup_num_procs = 0 HOT 4
- Not getting any namedprocess_namegroup_* metrics from process exporter HOT 1
- Not getting any process metrics from process exporter on Debian 12 (bookworm) HOT 2
- Default value to -62135596800 corresponding to 0001-01-01 when no process found
- Unusual high number of involuntary context switches, how is this number computed?
- metric is not updated
- High cardinality of Process Exporter metrics HOT 2
- /net/http/pprof were detected as information disclosure vulnerability
- need update gomod to fix CVE list HOT 2
- Process-exporter new release need with latest go and exporter toolkit HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from process-exporter.