-
Notifications
You must be signed in to change notification settings - Fork 814
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
Process monitoring with grouping support #400
Conversation
except psutil.NoSuchProcess: | ||
pass | ||
#Return value in KB | ||
return (rss, vms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to return memory in bytes, not KB here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On MacOSX, this returns a value in bytes already.
@mastrolinux we pull this data already (see treemap on the host dashboards) but I don't think we have an easy way to turn these into data that can be queried easily. I've added a few comments to your pull request. |
if name == 'All': | ||
process = ['All'] | ||
search_string = instance.get('search_string') | ||
pids_list = self.process_finder(process, search_string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surround the whole block with
try:
# ...
except Exception, e:
self.log.debug("Cannot extract process data: %s" % str(e))
@MisterRayCo we're taking a stab at it. |
@alq666 As a general purpose feel free to directly change my code since I am not a developer. I'll try to fix the code with your nice suggestions but I will not have much time to do it in the near future. |
It requires psutil and works on: Linux, Windows, OSX and FreeBSD, both 32-bit and 64-bit.