Operating System - HP-UX
1753525 Members
4981 Online
108795 Solutions
New Discussion юеВ

Re: knowing physical memory

 
SOLVED
Go to solution
prasadb
Super Advisor

knowing physical memory

hello experts..

i just want to know whether a a normal user in HP UX having no sudo priviledges can see how much physical memory the system have ? if yes, whats the way to know that ?

thanx in advance..

18 REPLIES 18
Jeeshan
Honored Contributor

Re: knowing physical memory

i think there may be no such possibilities for doing such things until or unless he/she has some privileges on some system administration commands.
a warrior never quits
George_Dodds
Honored Contributor

Re: knowing physical memory

Here are a couple of commands you can try as a normal user to se if they work

dmesg |grep Physical

or if ignite is installed

print_manifest |grep ├в i memory
George_Dodds
Honored Contributor

Re: knowing physical memory

The last one is supposed to be

print_manifest |grep -i memory

It is doubtfull that a normal user will be able to run them, but you could try.
prasadb
Super Advisor

Re: knowing physical memory

both these commands :

dmesg |grep Physical
print_manifest |grep -i memory


cannot be run by the normal user

any other option ?

George_Dodds
Honored Contributor

Re: knowing physical memory

try

swapinfo -at

it shows physical memory as well as swap usage
James R. Ferguson
Acclaimed Contributor

Re: knowing physical memory

Hi:

Rather than asking "how?" I'd would ask "why?".

Why would a user need to know how much physical memory is on a server? Given that any processes he runs will be fenced (limited) by kernel parameters that govern (for example) the maximum stack (maxssiz) and data (maxdsiz) sizes of a process, it would be much more meaningful to program knowing these limits. As a normal user you can use 'ulimit' to display (and change the soft limit value). See the 'sh-posix' manpages under 'ulimit'.

In answer to the original question of how can a normal user know how much physical memory a system has, the answer is *ask* the system administrator.

Regards!

...JRF...
George_Dodds
Honored Contributor

Re: knowing physical memory

Indeed i hope your just playing on your test box.

Remember a little bit of knowledge can be dangerous ;-)
Dennis Handly
Acclaimed Contributor

Re: knowing physical memory

>so the final conclusion is that the normal user can not view the physical memory

Well, "swapinfo -tam" will give a good estimate of it. Also, I'm not sure whether pstat(2) will provide this info. It gives the VM stats.
Don Morris_1
Honored Contributor

Re: knowing physical memory

Physical memory is reported in the physical_memory field [in pages] from the pst_static structure returned by pstat_getstatic().