-
Notifications
You must be signed in to change notification settings - Fork 39
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
Darwin support #3
Comments
Luk, The module uses pthread functions to create a thread and monitor the main process. I havent tried with OS X, go ahead and test it and let us know if that works and we can update the description. Although, you might have to try writing a different "i_am_monitoring" file because this one uses "unix_dgram" |
The only thing keeping it from building on OS X is this: https://gist.github.com/luk-/8011914 If I modify that, it will build fine. I'm not sure how the error handling in C++ differs when building on darwin. |
I'm pretty sure just fixing that isn't going to make it fully work. This module inspects the |
Dav is right, you will have to re write the stats info reading and parsing logic for whatever system you want to add support to. May be think of modularizing that piece before you add more OS support. |
I guess I got ahead of myself :) On Tuesday, December 17, 2013, rohiniwork wrote:
|
We can usage getrusage instead of /proc, that will work on both linux and mac. I am willing to devote some free time to it. |
I just happen to have a module for that already :) |
Very interesting - I had a go at this and ended up using times() (less portable than getrusage, but more convenient), and mainly have trouble getting total cpu time on mac portably (equivalent of /proc/stat/). Currently considering mach_absolute_time() for this. |
@luk- Hey! This seems cool. I wanted to run monitr on my mac. Any leads to integrate your pulls? Also why was development on this tool discontinued? Last commit seems pretty old. |
@davglass I'm really sorry to hear that. Looks like I've a bad day today.. hearing only losses since morning. |
Is there any unsolvable reason that we can't give this support on OS X?
If not, I can prepare a patch.
The text was updated successfully, but these errors were encountered: