How to get memory size in HP and not as user root?

Hi falks,

I'm trying to get the momory size in HP-UX as user oracle.
The command to do it is:
/usr/sbin/dmesg | grep "Physical" | awk '{print $2}'
The problem is that only user root can run this command and i need to run it as user oracle.
Do you know another way to get the memory size in HP ,which can be issued by "not user root"?

Thanks in advance,
Nir

You could grep the /var/adm/syslog/syslog.log (depending on permissions)

i.e. grep "Physical" /var/adm/syslog/syslog.log

You could also run the top command, and look at the statistics there. If you want to capture top's output, do something like top -d 1 > top.out (at the top of the file you'll probably get some gibberish from the escape characters) - you'll see Memory (Real/Virtual) used, as well as free memory. You can then do a "grep "Memory" top.out" and then process with awk.

Cheers
ZB

Hey ZB,

Thanks a lot!!

Regards,
Nir