Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7172 rtx 16 0 73696 34m 3352 R 10 0.1 247:50.05 mysqld
5189 rtx 16 0 322m 316m 4268 S 3 1.3 60:50.34 some.f
5193 rtx 16 0 327m 321m 4264 S 2 1.3 60:14.19 some.f
16015 rtx 15 0 73696 34m 3352 S 1 0.1 139:45.09 mysqld
===========================================================================
From the Top output above i found that the memory usage is about 94%. There are about 45 processes owned by "rtx" user.Am wondering if there is any method i can use to determine the total/approx memory used by "rtx" user only...kindly advise..thanks alot
Linux provides you a wealth of information under /proc including information about each process under /proc/<PID>, where PID is the process ID of the process you're interested in.
Type "man proc". It has lots of detail on one is available including the memory information you want.
Thanks alot jlightner & fpmurphy. i have found out the total 'rtx' process using #ps -ef | grep -i rtx | grep -v grep | wc -l.
I get a total of 45 processes running now.i can use the 'pmap' command to find the invidual PID memory usage...but am wondering how to find the accumulative memory usage by 'rtx'.I don't know how to parse using awk or perl
One thing to be careful of: Linux unlike other *nix systems tends to show threads win the process list. Since every thread shares the same memory space with the other threads including the main process adding up memory becomes problematic because you're actually adding the same memory space multiple times. You need to either exclude threads in your ps output or be sure you're identifying which ones are using the same memory map.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.