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.
Am trying to find a way to identify, how much RAM is used by gcore.
Am taking gcore for rpd process. rpd process is around 28MB running in the physical memory or ram.
Is there any way I get to know how much ram is consumes by gcore, while taking core for the rpd process.
What have you tried to use to determine how much RAM any process is using in your system? Do you know how to determine this for any general process? Have you looked at the top command?
Am new to Linux.
Yes I ran the top -bSH and ps -aus command.
I could find the PID value of the rpd process and using that pid value I can take the gcore.
But I can't see the PID of gcore (nor in top or neither in syslogs).
So is there any command that can show me how much physical memory or ram is used while running the gcore command.
I'll agree that it is difficult to rely on top because gcore usually works pretty fast. Commands like "ps -aux" are useful to show some of this information; however there are arguments that it is not a true representation of the actual memory in use, but instead the maximum allocation made by the process. The smaps file for any process has a lot of detail about memory allocations made by the process. All this depends on whether or not the process is still around however. If the gcore completes, all process information will be removed.
Is there a problem with running it, or are you just curious how much RAM it might be using?
What I see that the RES value of the rpdf process is around 24 MB.
Now when I take the gcore, I do not see that the core dumps the same amount of data. Gcore file written in the hard-disk is lesser than the rpdf RES value.
I expect it to be around 24MB same as RES of rpdf. Even if I have enough storage in the directory say 3 GB (which is sufficient for the gcore).
It dumps only 18-19 MB of data.
So I was wondering why is that so. Shouldn't it take the complete snapshot of the process.
As I've said, the ps command statistics are largely argued by many persons about whether or not things like memory usage are true representations. I suggest you perform a web search with terms like "linux determine memory use by a process" or similar types of terms and review the various discussions. There are also questions on other sites about how to determine memory use by a process where the answers show the use of ps, but also caution about it, and then follow on discussions ensue about the accuracy versus not. I agree, the numbers cited in a ps command output do not appear to be accurate.
Am new to Linux.
Yes I ran the top -bSH and ps -aus command.
I could find the PID value of the rpd process and using that pid value I can take the gcore.
But I can't see the PID of gcore (nor in top or neither in syslogs).
So is there any command that can show me how much physical memory or ram is used while running the gcore command.
Regards
Dipan
htop is alot better for what your doing top will show the top CPU load
htop will show every process running zombied and swapped out
htop is to top as less is to more
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.