RAM consumption by Gcore
Hello Expert,
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. Any help is appreciated. Regards Dipan |
Hello Dipan and welcome to LQ.
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? |
Hello rtmistler,
Thanks for your response. 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 |
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? |
No there is no actual problem but am just curios about one thing here it is.
last pid: 2503; load averages: 0.23, 0.45, 0.24 up 0+00:05:53 16:06:33 138 processes: 2 running, 117 sleeping, 2 zombie, 17 waiting Mem: 196M Active, 84M Inact, 60M Wired, 264M Cache, 69M Buf, 1374M Free Swap: 151M Total, 151M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU COMMAND 2383 root 4 0 41856K 24616K kqread 0:00 0.00% rpdf 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.
|
Quote:
htop will show every process running zombied and swapped out htop is to top as less is to more |
All times are GMT -5. The time now is 11:37 AM. |