views:

101

answers:

2

Calling resource.getrusage() from Python returns a 0 value for resident set size on Solaris and Linux systems. On Linux you can pull the RSS From /proc//status instead. Does anybody have a good way to pull RSS on Solaris, either similar or not to the Linux workaround?

A: 

Maybe use Solaris's psinfo under /proc? (solaris proc(4) docs)

orip
A: 

Well...you can pull it from the pmap application by calling pmap -x. But I was looking more for a way to access the info directly in /proc from my app. The only way to do it is to access the /proc/<pid>/xmap file. Unfortunately, the data is stored as an array of prxmap structs...so either a Python C-module is in order or using the ctypes module. I'll post an update when I get one of those written.

jasonjwwilliams