- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How can a non-root user get memory information
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
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
11-30-2001 01:36 PM
11-30-2001 01:36 PM
our production sites are hosted by other company, and I only have application users on those boxes(hpux 11.0), so how can I get information such as memory size with this user(the output of top really confused me)
thanks!
Gary
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 01:39 PM
11-30-2001 01:39 PM
Re: How can a non-root user get memory information
What memory information are you looking for. If you are looking for physical memory info, run "dmesg" command and check for the like saying Physical memory.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 01:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 01:56 PM
11-30-2001 01:56 PM
Re: How can a non-root user get memory information
The memory displayed in top only shows the memory used by running processes and is almost worthless for determining installed memory. Dmesg works but only until the buffer is over-written. You can also use adb to read /dev/kmem but those permission should only allow root to read /dev/kmem or there is a big security hole. However, there is one good option and that is to install STM. Support Tool Manager - that can be executed be an ordinary user and will give you the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 01:59 PM
11-30-2001 01:59 PM
Re: How can a non-root user get memory information
It's not clear to me if you want to know the server's installed physical memory or are interested in *your* processes.
On a per-process basis you could use the POSIX (UNIX95) options of the 'ps' command to assist in this tracking, ranking the output in descending kilobyte core size. Note that a space character follows the 'UNIX95' variable declaration and that the 'ps' command begins without any interceding delimiter. Thus, the variable UNIX95 is set only for the one command line.
# UNIX95= ps -e -o "user,vsz,pid,ppid,args" | sort -rnk2 | more
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 02:27 PM
11-30-2001 02:27 PM
Re: How can a non-root user get memory information
Actually, I'm looking for information about physical memory installed. I can't run sam or dmesg with this user. And I don't know how our host company did, they seem to archive the syslog, so I cannot check the syslog when the server was rebooted.
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 02:47 PM
11-30-2001 02:47 PM
Re: How can a non-root user get memory information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 02:55 PM
11-30-2001 02:55 PM
Re: How can a non-root user get memory information
Try this utility. give execute permission (chmod +x memdetail) before running
Good luck,
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 03:16 PM
11-30-2001 03:16 PM
Re: How can a non-root user get memory information
Save the following in mem.c and compile it
cc -o /tmp/mem mem.c
/tmp/mem would give you the memory in MB
/Begin/
#include
#include
#include
main ()
{
struct pst_static buf;
pstat_getstatic(&buf,sizeof(struct pst_static),1,0);
printf("%ld MB\n", buf.physical_memory/256);
}
/End/
You can run this as a regular user.
-HTH
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 03:25 PM
11-30-2001 03:25 PM
Re: How can a non-root user get memory information
If you have glance installed on machine, use #glance -> m
This will give you physical memory in system.
Thanks.
Prashant Deshpande.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2001 05:37 PM
11-30-2001 05:37 PM
Re: How can a non-root user get memory information
-Santosh