LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-12-2017, 01:43 PM   #1
dipanchatterjee
LQ Newbie
 
Registered: Jan 2017
Posts: 3
Blog Entries: 1

Rep: Reputation: Disabled
Post 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
 
Old 01-12-2017, 02:41 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,357
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
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?
 
Old 01-13-2017, 03:24 AM   #3
dipanchatterjee
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 01-13-2017, 07:07 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,357
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
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?
 
Old 01-13-2017, 08:20 AM   #5
dipanchatterjee
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
Old 01-13-2017, 08:31 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,357
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
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.
 
Old 01-15-2017, 02:52 PM   #7
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,075

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by dipanchatterjee View Post
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
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Xfce] Some processes are spawned multiple times, high RAM consumption Nh3xus Slackware 7 12-26-2013 09:29 PM
Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM??? Saurav Ghosh Linux - Newbie 7 11-01-2011 03:49 AM
how to install gcore on redhat? johnifanx98 Linux - Newbie 2 08-31-2011 02:15 PM
difference between gcore utility & gdb gcore command coontie Linux - Kernel 0 06-13-2007 09:09 AM
SUSE- reduce ram consumption MTBer Linux - Software 7 04-14-2006 10:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration