- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- knowing physical memory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 03:50 AM
06-22-2008 03:50 AM
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..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 04:13 AM
06-22-2008 04:13 AM
Re: knowing physical memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 04:14 AM
06-22-2008 04:14 AM
Re: knowing physical memory
dmesg |grep Physical
or if ignite is installed
print_manifest |grep â i memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 04:17 AM
06-22-2008 04:17 AM
Re: knowing physical memory
print_manifest |grep -i memory
It is doubtfull that a normal user will be able to run them, but you could try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 04:34 AM
06-22-2008 04:34 AM
Re: knowing physical memory
dmesg |grep Physical
print_manifest |grep -i memory
cannot be run by the normal user
any other option ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 04:44 AM
06-22-2008 04:44 AM
Re: knowing physical memory
swapinfo -at
it shows physical memory as well as swap usage
- Tags:
- swapinfo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 05:04 AM
06-22-2008 05:04 AM
Re: knowing physical memory
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 05:32 AM
06-22-2008 05:32 AM
Re: knowing physical memory
Remember a little bit of knowledge can be dangerous ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 07:23 AM
06-22-2008 07:23 AM
Re: knowing 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 03:56 PM
06-22-2008 03:56 PM
Re: knowing physical memory
- Tags:
- pstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2008 10:16 PM
06-22-2008 10:16 PM
Solution# echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm
This will give you *all* details about the physical memory.
Why do you need this?
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2008 06:23 AM
06-23-2008 06:23 AM
Re: knowing physical memory
yes, this has worked...
echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm
this was required to know the memory of all the servers to prepare a report..
excellent option...
thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2008 06:58 AM
06-23-2008 06:58 AM
Re: knowing physical memory
Ferony (under Nancy Rippey's login) here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851889
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2008 08:24 AM
06-23-2008 08:24 AM
Re: knowing physical memory
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2008 11:53 PM
06-23-2008 11:53 PM
Re: knowing physical memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2008 11:59 PM
06-23-2008 11:59 PM
Re: knowing physical memory
IMHO all interactive tools won't help you here, so go with the "cstm" command I gave you
or
if you have Integrity Servers or HP9000 (with 11.31) you can also use
/usr/contrib/bin/machinfo
and grep for "Memory". this should also work for non-root users.
Example:
# /usr/contrib/bin/machinfo
CPU info:
64 Intel(R) Itanium 2 9000 series processors (1.6 GHz, 18 MB)
533 MT/s bus, CPU version C2
128 logical processors (2 per socket)
Memory: 981492 MB (958.5 GB)
...
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2008 10:11 AM
06-28-2008 10:11 AM
Re: knowing physical memory
your command echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm
worked fine for me, but i was wondering to know
that this command takes the output from cstm anyway, which does not run from normal user, but this command can be run by normal user, how does this become possible.
could you throw some light on this ?
thanking you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2008 12:44 PM
06-28-2008 12:44 PM
Re: knowing physical memory
I'm not sure what you are really asking?
Anyone can get the memory size, if they write a program calling pstat(2) as Don said.
Torsten's cstm command also gets this and more, probably because it is a setid program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2008 01:24 PM
06-28-2008 01:24 PM
Re: knowing physical memory
> which does not run from normal user, but this command can be run by normal user, how does this become possible.
> Dennis: Anyone can get the memory size, if they write a program calling pstat(2) as Don said.
Yes.
> Dennis: Torsten's cstm command also gets this and more, probably because it is a setid program.
No, 'cstm' isn't a setuid executable. I suspect that this executable is using the 'pstat()' system call, though without access to the HP source code I can't be absolutely positive. This would be a logical expectation, however.
As an aside, when the 'setuid' bit is set for a binary, the code runs as the user that owns the binary, inheriting the privileges of the owning, not running user account. A classic example is '/usr/bin/passwd' command which is owned by 'root' and thus when run by a normal users has 'root' privileges. The 'chmod' command is used to set the 'setuid' bit. For more information see the manpages for 'chmod(1)' and 'chmod(2)'.
As for 'cstm', as Torsten showed, its full path is 'Hi:
> which does not run from normal user, but this command can be run by normal user, how does this become possible.
> Dennis: Anyone can get the memory size, if they write a program calling pstat(2) as Don said.
Yes.
> Dennis: Torsten's cstm command also gets this and more, probably because it is a setid program.
No, 'cstm' isn't a setuid executable. I suspect that this executable is using the 'pstat()' system call, though without access to the HP source code I can't be absolutely positive. This would be a logical expectation, however.
As an aside, when the 'setuid' bit is set for a binary, the code runs as the user that owns the binary, inheriting the privileges of the owning, not running user account. A classic example is '/usr/bin/passwd' command which is owned by 'root' and thus when run by a normal users has 'root' privileges. The 'chmod' command is used to set the 'setuid' bit. For more information see the manpages for 'chmod(1)' and 'chmod(2)'.
As for 'cstm', if you look further, you will see that '/usr/sbin/cstm' is really just a shell script wrapper that is a convenience to invoke:
# /usr/sbin/stm/ui/bin/stm -c $*
All the script is doing is calling the (c)haracter interface ('-c') to 'stm' passing along any and all arguments ($*) you passed to the wrapper when you invoked it.
Similar wrappers exist for the X-window based use of 'stm', via:
# /usr/sbin/xstm
...and for the menu-based interface to 'stm':
# /usr/sbin/mstm
Regards!
...JRF...