Questions tagged [procstat]
10 questions
1
vote
1 answer
Capture 4 Element of /proc/stat of CPU line in sh
I am unable to capture CPU[3] to IDLE variable in shell script (/bin/sh)
Code snippet as below:-
while true; do
CPU=$(sed -n 's/^cpu\s//p' /proc/stat)
**IDLE=$CPU[3]** # Just the idle CPU time.
for…

charan
- 21
- 4
1
vote
0 answers
difference between reading the /proc/stat files via syscall fucntion read () or via glibc function fread()
Program reading /proc/stat files via read(like cat) or via fread (like nl) return different values. read() /proc/stat return right result, while fread() return wrong result.
I had write simple C programs that just read or fread /proc/stat. read()…

shaun
- 21
- 5
1
vote
2 answers
Count the number of running process with Telegraf
I'm using telegraf, influxdb and grafana to make a monitoring system for a distributed application. The first thing I want to do is to count the number of java process running on a machine.
But when I make my request, the number of process is nearly…

Emrys Myrooin
- 2,179
- 14
- 39
1
vote
1 answer
Telegraf - inputs.procstat pgrep plugin issue
Telegraf v1.0.1
I'm not able to see telegraf[._] (tree) metric anymore after I enabled [[inputs.procstat]] plugin.
Telegraf is installed successfully. Process is running. I'm pretty much using the normal settings for inputs plugins and output…

AKS
- 16,482
- 43
- 166
- 258
0
votes
0 answers
Monitoring a postgresql db process with telegraf using procstat input plugin send running=0i for active running state
I'm monitoring a postgresql db process with telegraf and procstat input plugin, but it's not seems to be working as expected in all machines(master and slaves).
The input plugin configuration is like below:
[[inputs.procstat]]
systemd_unit =…

GUISSOUMA Issam
- 2,572
- 2
- 16
- 27
0
votes
1 answer
how to control decimal point in SAS output dataset?
I am new to SAS programming and I trying to work on proc means statement.
For controlling my decimal value in the output I have used maxdec option however when I tried to assign a new dataset to the output and print it my decimal values are not…
0
votes
1 answer
Telegraf & InfluxDB: how to convert PROCSTAT's pid from field to tag?
Summary: I am using telegraf to get procstat into InfluxDB. I want to convert the pid from an integer field to a TAG so that I can do group by on it in Influx.
Details:
After a lot of searching I found the following on some site but it seems to be…

R G
- 31
- 4
0
votes
2 answers
Get CPU Utilization of all available CPUs individually in C
When I use cat /proc/stat command on terminal I get the following output:
cpu 9268738 47123 3940054 3851366876 911347 0 164981 0 0 0
cpu0 558436 2170 208965 240825151 54221 0 30439 0 0 0
cpu1 699380 1976 382320 240476662 50707 0 7260 0 0 0
cpu2…

Somdip Dey
- 3,346
- 6
- 28
- 60
0
votes
0 answers
What does a proc_status of -6 mean?
I'm trying to call a stored procedure in a database using the Sybase module for Python and I'm having this proc_status returned. I don't know what this proc_status means. Can anyone tell me? Code is attached…
0
votes
1 answer
Telegraf - inputs.procstat procstat Plugin - README.md doc - exe, pid_file, command line pattern username
Using: Telegraf v1.0.1
Telegraf procstat plugin's documentation:
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/procstat
My custom config File: /etc/telegraf/telegraf.d/my_custom_process_service-telegraf.conf…

AKS
- 16,482
- 43
- 166
- 258