Truncated output if process being tracked ends before data gathered
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- c, linux
- Domaine
- observability
Piste de recherche
Start with pidstat's average-output path, especially how it handles a tracked process that exits before the first data sample. Reproduce the issue with a PID that disappears before collection and inspect the output for that process. Done means pidstat prints the remaining average output instead of truncating it.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
sysstat version 10.1.5
I am running a script that will find several processes that I want to track, and then track them for a while with a pidstat command. I run the script in a loop because any of the processes may exit and restart, and I want to start tracking the new ones reasonably quickly.
Anyway... I am getting truncate output like this sometimes from pidstat:
Average: UID PID minflt/s majflt/s VSZ RSS %MEM Command
Average: 997 24053 15.14 0.00 9347066 4783839 30.52 java
Average: 990 25271 1.54 0.00 6930412 1205929 7.69 java
Average: 0 28779 0.00 0.00
Any output that should follow is lost.
I am reasonably sure what is happening is that my process picker was getting a short lived process that wasn't intended. When pidstat started, that process exists, but by the first round of data gathering it is gone. So it doesn't appear in any of the regular output lines above the average section. When pidstat gets to the point of printing the average, it knows it should print for that process, but has no data, and bombs out.
Fixing is probably just a matter of ensuring a default value for VSZ and any other stats to cover this possible situation.
While you would think it would be rare, it actually happens a lot over the course of a day... I am running pidstat every 5 minutes with an updated pid list, and it happens at least 10 times a day.
For me, I just fixed my picker to solve the problem. But thought I would let you know what I was seeing. Thanks for the effort on this great tool.
- Langage dominant
- C
- Étoiles
- 3.4k
- Forks
- 490
- Merge moyen
- 4 j 37 min
- PR mergées (30 j)
- 4
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de sysstat/sysstat
-
Difficulté 4/5 3-5 jours Accessibilité débutants 40/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
sar: duplicate interrupts when using SUM while reading interrupts in 390x arch (from `/proc/interrupts`)Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
Toutes les issues de sysstat/sysstat
Issues similaires
-
native-cpu: -Wreturn-type in skainet_row_threads.c:150 (worker fn has no return)Peut-être pris @Doomguy-BFG9000 l’a pris aujourd’hui. Ouvertegood first issue size:xs skill:native
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
SKaiNET-developers/SKaiNET#1358 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
I/O internal correctness medium priority rt_lib
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
libsdl-org/SDL#16539 ·
Les mainteneurs répondent en général sous 1 jour
-
git-workflow task-4
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour