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

feat: display process tree with command line arguments #89

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

behouba
Copy link
Collaborator

@behouba behouba commented Jul 12, 2023

This PR introduces a new flag --ps-tree-cmd to provide an alternative view of process tree.
Using --ps-tree-cmd it is now possible to display the full command line arguments in the process tree.

Example:

$ checkpointctl inspect /path/to/checkpoint.tar.gz --ps-tree-cmd
counter
└── [1]  bash
    ├── [7]  bash -c 'python counter.py'
    ├── [8]  python counter.py --input data.txt --output result.txt
    ├── [11]  bash -c 'tee output.log'
    └── [20]  tee output.log

@behouba behouba changed the title feat: display process tree with full command line arguments feat: display process tree with command line arguments Jul 12, 2023
@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Test Results

40 tests  +2   40 ✔️ +2   1s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 9b887b1. ± Comparison against base commit b88a99f.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2023

Codecov Report

Patch coverage: 84.44% and project coverage change: +0.14 🎉

Comparison is base (5d84ffa) 82.43% compared to head (9b887b1) 82.58%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   82.43%   82.58%   +0.14%     
==========================================
  Files           4        4              
  Lines         558      603      +45     
==========================================
+ Hits          460      498      +38     
- Misses         72       77       +5     
- Partials       26       28       +2     
Impacted Files Coverage Δ
container.go 76.01% <72.72%> (-0.18%) ⬇️
tree.go 85.82% <76.47%> (-1.36%) ⬇️
checkpointctl.go 92.85% <100.00%> (+0.67%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@rst0git rst0git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rst0git rst0git requested a review from snprajwal July 21, 2023 00:50
checkpointctl.go Outdated Show resolved Hide resolved
checkpointctl.go Outdated Show resolved Hide resolved
@behouba behouba force-pushed the ps-tree-cmd branch 2 times, most recently from 9b61496 to 9fa26f5 Compare July 21, 2023 12:49
tree.go Outdated Show resolved Hide resolved
tree.go Outdated Show resolved Hide resolved
tree.go Outdated Show resolved Hide resolved
tree.go Outdated Show resolved Hide resolved
tree.go Outdated Show resolved Hide resolved
This commit adds `--ps-tree-cmd` flag to the `inspect` sub-command. This
flag allows displaying process tree with the full command line arguments
instead of the default process name value.

Signed-off-by: Kouame Behouba Manasse <[email protected]>
@rst0git rst0git requested a review from adrianreber July 22, 2023 09:31
@adrianreber adrianreber merged commit 4300916 into checkpoint-restore:main Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants