Operating System - HP-UX
1752798 Members
5698 Online
108789 Solutions
New Discussion юеВ

Determining which processes are increasing memory (Historical Data)

 
Tony Vargas
New Member

Determining which processes are increasing memory (Historical Data)

After searching, I haven't found a thread dealing with this issue, so...

I'm trying to determine a means to an end. We see a slight, but worrisome increase in memory consumption on a machine over a three day period that we simply rebooted on Friday and left running over the weekend with nothing special running and would like to get 'under the hood' and determine what/which process(es) are responsible for this difference.

I'm relatively new to the wonderful world of PerfView and don't see a way of isolating what is increasing memory consumption over a historical period (as can be done in real time with Glance) so we can better research the problem and see if it's a programming problem or whathaveyou.

Now, ideally we could do this with PerfView, but as I said, we haven't seen a way to do this up to now. I know that, the ps -el | more command offers us page 'sz' (size) of physical pages of a process. We've thought about maybe working on a script that compares this size figure on a process by process basis, but this may not be cut and dry remedy either.

Therefore, I thought it could be helpful to throw ourselves upon the mercy of the court and see if someone may have a useful suggestion that could help us out. Is there a way to accomplish this with PerfView or would a perl script be a better way to go about this? Has anyone done anything similar that may be of benefit?

BTW, this is my first post here. I really enjoy these forums. Kudos on the excellent work. These are really invaluable.
4 REPLIES 4
Chris Wilshaw
Honored Contributor

Re: Determining which processes are increasing memory (Historical Data)

Rather than using ps -el to get the memory use, you can use

UNIX95= ps -eopid,vsz,args | sort -nk2

Note the space between the = and ps.

This will list the PID, memory size (in KB) and command with arguments, sorted based on memory

eg:
3006 636 /usr/sbin/stm/uut/bin/tools/monitor/lpmc_em
635 716 /usr/lib/netsvc/fs/automount/automount -f /etc/auto_master
2561 744 /usr/sbin/stm/uut/bin/tools/monitor/dm_FCMS_adapter
2603 744 /usr/sbin/stm/uut/bin/tools/monitor/dm_TL_adapter
1053 800 /var/dmi/bin/swci
618 804 /usr/sbin/rpc.statd
570 1012 /usr/sbin/rpcbind
2188 1028 psmctd
624 1056 /usr/sbin/rpc.lockd

The ps man page has a number of other options listed under -o that you may find of use.
Andi Rigauer
Regular Advisor

Re: Determining which processes are increasing memory (Historical Data)

Hi Tony,

I think you do not even need perfview for that, If it appears again, check the memory consumption with glance. (work at best with hpterm)

hope that helps
god, root where's the difference
Manish Srivastava
Trusted Contributor

Re: Determining which processes are increasing memory (Historical Data)

Hi,

Use the top command to check which process is using the max memory on the system

manish
Brian Crabtree
Honored Contributor

Re: Determining which processes are increasing memory (Historical Data)

Tony,

Memory problems from the UX level can be hard to find, since a process can take memory out of the shared text block of the system.

However, from the internal perspective, it is possible to see how much extra space a process is taking up on the system. You will want to do something like the following:

select sid,sum(value) from v$sesstat where statistic# in ('13','20') group by sid order by sum(value);

This should show you which processes are taking up the most space. However, this information is only going to be available by current processes (if they have closed and exited, they will not be available) and you will only be able to get the current and possibly the previous SQL statement unless you have tracing active for the session.

Thanks,

Brian