This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Get memory for a Linux service

I am trying to write a SAM component to show the memory used by a running service in Linux.
Anyone have a Perl or Python script to attempt this?

I did some googling but you need to specify PID numbers.
I want to do it using the service name, e.g. "sshd"

return $memoryused("sshd")