cpustat icon indicating copy to clipboard operation
cpustat copied to clipboard

OSX Support

Open petems opened this issue 9 years ago • 4 comments

No idea how hard this would be, but would be cool to be able to run this on non-Linux OS's, particularly OSX for me 😄

Right now it fails on fatal error: 'linux/taskstats.h' file not found (unsurprising, as it's not Linux)

petems avatar Apr 27 '16 13:04 petems

While the UI is generic, the stats gathering methods are very Linux-specific. We read files from /proc and talk to the Linux taskstats system.

That said, if you or someone else wants to figure out how to get this info out of an OSX kernel, I would be happy to integrate this.

mranney avatar Apr 27 '16 13:04 mranney

Yeah, there's a bit of existing knowledge from the work on from htop-osx

petems avatar Apr 27 '16 14:04 petems

Oh yeah, I forgot that there's htop for OSX. If there's a way to get time spent in the run queue, then we might be able to do it.

Sadly, I don't have time to embark on this quest. I'm happy to help and advise if you or someone else is though.

mranney avatar Apr 27 '16 15:04 mranney

Yep, in fact proper OSX support got merged into htop proper recently: https://github.com/hishamhm/htop/blob/master/darwin/DarwinProcess.h

I'm gonna give it a shot but my C knowledge is pretty bare. Hopefully someone who know's more might be able to help in the future 😄

petems avatar Apr 27 '16 15:04 petems