ps argument pmem equivalent in HP-ux? - HP UX

This is a discussion on ps argument pmem equivalent in HP-ux? - HP UX ; Hi, I'm a DBA and I am trying to get a one shot information on memory use and cpu use. Coming from Sun solaris environment, I am relatively new in using HP-UX. In Sun I was used to gether this ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ps argument pmem equivalent in HP-ux?

  1. ps argument pmem equivalent in HP-ux?

    Hi,

    I'm a DBA and I am trying to get a one shot information on memory use
    and cpu use.
    Coming from Sun solaris environment, I am relatively new in using
    HP-UX.
    In Sun I was used to gether this information on cpu and mem the
    following way.
    "ps -fea -o "pid,user,pcpu,pmem,vsz,rss,args"

    This gave a nice (first) idea about the resources of a machine, to what
    they where dedicated.

    Unfortunately the pmem (memory) argument cannot be used in the HP-UX
    machines I'm working on now. I have to limit the ps argument to
    "ps -fea -o pid,user,pcpu,sz,vsz,args"

    I searched for another command, such as top or vmstat which can give me
    an idea and make a combination in a shell script of both, so I can
    still have my one shot informetion overview. The problem though, is
    that I can hardly use them in shell scripts. Top -d 1 is hardly
    treatable and vmstat requires postprocessing getting kb info instead of
    page lists.

    Well if anyone has any idea what I clould do, I would apreciate the
    tips and tricks to do it.

    Saludos,
    Jacob

    (the version HP-UX xxxxxxxxx B.11.00 A 9000/800 141901507)


  2. Re: ps argument pmem equivalent in HP-ux?

    jojo wrote:
    > Hi,
    >
    > I'm a DBA and I am trying to get a one shot information on memory use
    > and cpu use.
    > Coming from Sun solaris environment, I am relatively new in using
    > HP-UX.
    > In Sun I was used to gether this information on cpu and mem the
    > following way.
    > "ps -fea -o "pid,user,pcpu,pmem,vsz,rss,args"
    >
    > This gave a nice (first) idea about the resources of a machine, to what
    > they where dedicated.
    >
    > Unfortunately the pmem (memory) argument cannot be used in the HP-UX
    > machines I'm working on now. I have to limit the ps argument to
    > "ps -fea -o pid,user,pcpu,sz,vsz,args"


    You have sz (which is the [approximate] physical memory usage of the
    process)... so why not just use pstat_getstatic() in a
    basic C program you can call from your shell script and then do the
    math to figure out the percentage? (This would be the physical_memory
    field in the pst_static structure).

    Alternately, you could use adb to pull the value from the kernel or
    try to cull it from the boot messages (but I don't recommend either
    of those -- pstat is supported, that isn't).

    Don

    >
    > I searched for another command, such as top or vmstat which can give me
    > an idea and make a combination in a shell script of both, so I can
    > still have my one shot informetion overview. The problem though, is
    > that I can hardly use them in shell scripts. Top -d 1 is hardly
    > treatable and vmstat requires postprocessing getting kb info instead of
    > page lists.
    >
    > Well if anyone has any idea what I clould do, I would apreciate the
    > tips and tricks to do it.
    >
    > Saludos,
    > Jacob
    >
    > (the version HP-UX xxxxxxxxx B.11.00 A 9000/800 141901507)
    >


+ Reply to Thread