Comments (9)
I can think of a number of possible explanations. Assuming the error metrics aren't increasing, my best guess is that it's kernel process(s) with an empty cmdline, and hence which are ignored by the '.+' regexp we're matching on by default. Try it with '.*' instead and see if that changes things.
from process-exporter.
Hi,
Looks like same thing. Note In this case I'm running MySQL Benchmark so I kind of expect MySQL to be out there in the top. My theory could be main MySQL thread indeed sleeps most of the time and for this metric other thread statuses are not accounted for, while they are in VMSTAT
from process-exporter.
If you provide instructions to reproduce I'll have a look. Otherwise:
- try decreasing scrape interval (though you may need to make the config more specific to the mysql procs for process-exporter to keep up)
- try the -threads argument to process-exporter
from process-exporter.
Looking more into it.
Running "stress -c 8" Which creates 8 separate processess spinning on CPU I see:
namedprocess_namegroup_states{groupname="stress",state="Running"} 8
So it works properly for process
In general it does not seems like States are counted per thread even if --threads argument is specified:
namedprocess_namegroup_states{groupname="mysqld",state="Other"} 0
namedprocess_namegroup_states{groupname="mysqld",state="Running"} 0
namedprocess_namegroup_states{groupname="mysqld",state="Sleeping"} 1
namedprocess_namegroup_states{groupname="mysqld",state="Waiting"} 0
namedprocess_namegroup_states{groupname="mysqld",state="Zombie"} 0
We can see only one process "sleeping" here, which I guess is MySQL main thread, we have only one process
namedprocess_namegroup_num_procs{groupname="mysqld"} 1
But many threads:
namedprocess_namegroup_num_threads{groupname="mysqld"} 48
I think for practical purposes "sleeping", "running", "waiting" it is better to count threads thank procs.
from process-exporter.
I'm sorry, -threads was bad advice, I forgot that I never got around to adding the per-thread state metrics. I will use this issue to track that work and rename it accordingly.
from process-exporter.
Perhaps I've been thinking about this the wrong way. The 'state' metrics have always been weak because they're gauges: mostly everything is sleeping and waiting, and threads often run only brief intervals, so catching anything in the running state is pretty rare. #62 is probably a better way to provide visibility on how many threads are running or not, via the proposed cpu histograms.
If that takes care of measuring the running threads, we're left with just sleeping and waiting. Sleeping is the default and can be inferred to be the state of what's not running or waiting. For waiting, if I implement #18, we'll know not just how many threads are waiting, we'll see what they're waiting on. In which case this bug possibly becomes a wontfix.
from process-exporter.
Gauges are indeed very volatile but aggregated over period of time they can show good picture.
There is a difference between CPU usage and DiskIO and Waiting. Imagine I have 1 CPU core available. The most I can see is the process using 1 CPU core from CPU time standpoint. However this can come from 1 running thread of from 10 threads in the run queue. It would be best if it would be easy to see the time process/thread spends in Run Queue but not being on CPU or the time process spends waiting on disk IO but I do not think such stats are available and "Running" and "Blocked" Gauges are at least somewhat reasonable estimates.
from process-exporter.
Much as I hate to break backward compatibility, I'm going to do as you propose in this case, because I've done more testing and it looks like for threaded programs the per-state metrics aren't meaningful. They only report the state of the first thread, which can be very deceptive. The new load-generator cmd I just added always shows up as state S regardless of how many threads are in state D or R.
from process-exporter.
v0.4.0 pre-release includes this change (state metrics count threads instead of procs.)
from process-exporter.
Related Issues (20)
- 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
- Process Exporter v0.7.11 is missing library GLIBC_2.34 HOT 1
- Failed to start the server: no web listen address or systemd socket flag specified HOT 1
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.