- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: memory usage commands
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
04-07-2004 10:55 AM
04-07-2004 10:55 AM
etc.) to gather memory usage stats ? I need the
actual command syntax. Thanks........ :>)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2004 11:59 AM
04-07-2004 11:59 AM
SolutionTo Show Free memory on system:
# vmstat 1 2 | tail -1 | awk '{printf "%d%s\n", ($5*4)/1024, "MB" }'
To Show Top Memory Processes:
# UNIX95= ps -el -o pid,comm,sz | grep -i -v pid | sort -nr -k 3,3 | head -15
This shows the top 15 processes for memory utilisation.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2004 11:59 AM
04-07-2004 11:59 AM
Re: memory usage commands
vmstat is the perfect tool for memory usage collection from the command line
# vmstat 1 1000 >> /tmp/vm.out
This will collect 1000 samples of vmstat output with an interval of 1 sec
# vmstat 1 >> /tmp/vmstat.out
The above command keeps collecting the vmstat output infinitely
Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2004 12:20 PM
04-07-2004 12:20 PM
Re: memory usage commands
# memdetail
Memory Stat total used avail %used
physical 10080.0 9737.5 342.5 97%
active virtual 9586.4 4655.6 4930.8 49%
active real 7257.5 3446.8 3810.7 47%
memory swap 7697.1 1664.7 6032.5 22%
device swap 26528.0 9298.5 17229.5 35%
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2004 04:25 PM
04-07-2004 04:25 PM
Re: memory usage commands
glancePlus is very useful.
but not free.
or:
vmstat | tail -1 | awk '{printf("%6.2f\n",$4*100/($4+$5))}'
but, vmstat show virtual + real memory.
(include disk swap)
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2004 05:55 PM
04-07-2004 05:55 PM
Re: memory usage commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2004 12:50 AM
04-09-2004 12:50 AM
Re: memory usage commands
I am attaching a wonderful tool to collect the memory information. Given below is the procedure to install and sample output.
Procdure to use:
#chmod 777 kmeminfo.bin
#./kmeminfo.bin
#kmeminfo
Sample Output:
--------------------------
Physical memory usage summary (in page/byte/percent):
Physmem = 1572864 6.0g 100% Physical memory
Freemem = 293069 1.1g 19% Free physical memory
Used = 1279795 4.9g 81% Used physical memory
System = 396296 1.5g 25% By kernel:
text = 1977 7.7m 0% text
data = 282 1.1m 0% data
bss = 1596 6.2m 0% bss
Static = 81101 316.8m 5% for text/static data
Dynamic = 154798 604.7m 10% for dynamic data
Bufcache = 157286 614.4m 10% for buffer cache
Eqmem = 39 156.0k 0% for equiv. mapped memory
SCmem = 3072 12.0m 0% for critical memory
User = 887688 3.4g 56% By user processes:
Uarea = 6104 23.8m 0% for thread uareas
Disowned = 8 32.0k 0% Disowned pages
Total Memory : 6GB
Free Memory : 1.1g
Cheers,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2004 09:21 AM
04-09-2004 09:21 AM
Re: memory usage commands
I NEVER recommend chmod 777 on executable. To easy for a trojan horse. Especially a item that you know that root is going to use.
For 11X OS
echo 'phys_mem_pages/D'|
adb /stand/vmunix /dev/kmem|
grep pages | tail -1 |
awk '{print $2}'
For 10.2 OS
echo 'physmem/D'|
adb /stand/vmunix /dev/kmem |
tail -1 |
awk '{print $2}'
swapinfo is aslo helpful to see if your are swaping.