Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stats: /proc/pid/status parsing more flexible #193

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

Firobe
Copy link
Contributor

@Firobe Firobe commented Oct 7, 2024

/proc/<pid>/status can have empty values, which were refused by the parsing function. For example on my machine (the separating tabs are still present):

x86_Thread_features:	
x86_Thread_features_locked:	

Furthermore, and even though no values other than non/voluntary_ctxt_switches are used for now, other lines have further leading whitespace (seemingly to align values for humans to read), like VmPeak.

Swap to using String.trim instead of doing it manually, accounting for all cases

@hannesm
Copy link
Collaborator

hannesm commented Oct 7, 2024

Thanks.

@hannesm hannesm merged commit 9fcb19e into robur-coop:main Oct 7, 2024
7 of 8 checks passed
@Firobe Firobe deleted the lenient-stat-parsing branch October 7, 2024 16:46
hannesm added a commit to hannesm/opam-repository that referenced this pull request Oct 7, 2024
CHANGES:

* Albatross-daemon: discover and provide root policy with the available system
  resources (robur-coop/albatross#190 @hannesm @reynir @PizieDust)
* Vmm_core.Policy.usable: check that block size, if present, is non-negative
  (robur-coop/albatross#192 @hannesm)
* BREAKING: rename vm to unikernel (robur-coop/albatross#192 @hannesm)
* Document Vmm_trie (robur-coop/albatross#192 @hannesm)
* Parse /proc/pid/status less strict (robur-coop/albatross#193 @Firobe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants