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

Added a library function which help to get linux process and kill those process #5932

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PraveenPenguin
Copy link
Collaborator

No description provided.

… name

Added a library function which retruns linux process based on process name

Signed-off-by: Praveen K Pandey <praveen@linux.vnet.ibm.com>
@PraveenPenguin PraveenPenguin force-pushed the add_kill branch 2 times, most recently from 89c1462 to 23559ab Compare May 14, 2024 13:58
added a library function which help to kill linuxprocess

Signed-off-by: Praveen K Pandey <praveen@linux.vnet.ibm.com>
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @PraveenPenguin, thank you for your contribution. I have a question about psutil please have a look.

@@ -24,6 +24,7 @@
"""

import os
import psutil
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see that you are adding psutil as requirement for this utility which is new requirement for Avocado. Unfortunately, right now we don't have a way how to add utils specific requirements. Is it possible for you to do this without psutil ?

PS: Right now we are working on autils project which should merge avocado and avocado-vt utils together and there we should be able to add utils specific requirement. Unfortunately, this project is not prepared yet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@richtja I tried, but we need to grep or awk in ps command that seems not good way, please suggest if you have anything in mind

Copy link
Contributor

Choose a reason for hiding this comment

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

@PraveenPenguin it looks like you're after the process name. That should be available under /proc/$PID/comm. Let me know if there's other info you're after.

@richtja richtja requested a review from clebergnu May 20, 2024 13:08
Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

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

Hi @PraveenPenguin it looks like this data can be obtained without the psutil library. Please refer to my other comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review Requested
Development

Successfully merging this pull request may close these issues.

None yet

3 participants