UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 27th, 2005, 09:17 AM
Jonesin2005 Jonesin2005 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: London, UK
Posts: 150 Jonesin2005 User rank is Private First Class (20 - 50 Reputation Level)Jonesin2005 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 15 h 1 m 42 sec
Reputation Power: 4
Getting memory on HP Unix

Hi,

Anyone know of a command I can use to obtain the memory on an HP UNIX box? On Sun, I could do sar -r but this isn't available on HP.

Any ideas?

Cheers,
J

Reply With Quote
  #2  
Old October 27th, 2005, 11:35 AM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 17 m 10 sec
Reputation Power: 48
Code:
swapinfo -t

             Kb      Kb      Kb   PCT  START/      Kb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev     2146304  469820 1676484   22%       0       -    1  /dev/vg00/lvol2
dev     1687552       0 1687552    0%       0       -    2  /dev/vg00/lvswap1
dev     1687552       0 1687552    0%       0       -    2  /dev/vg00/lvswap2
reserve       - 4836664 -4836664
memory  4786844 4463044  323800   93%
total   10308252 9769528  538724   95%       -       0    -

The first entry on the memory line is the total available RAM. This box is in trouble because it has almost no virtual memory left.

Reply With Quote
  #3  
Old October 31st, 2005, 12:51 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 17 m 10 sec
Reputation Power: 48
Perderabo posted this perl script on unix.com - try it as well:
Code:
#!/usr/contrib/bin/perl

local($PSTAT, $PSTAT_STATIC, $PSTAT_DYNAMIC) = (239, 2, 3);
local($struct_pst) = ("\0" x 156);
local($struct_psd) = ("\0" x 2904);

syscall($PSTAT, $PSTAT_STATIC, $struct_pst, length($struct_pst), 1, 0);
($pages, $psize) = (unpack("x16LL", $struct_pst));
syscall($PSTAT, $PSTAT_DYNAMIC, $struct_psd, length($struct_psd), 1, 0);
$free = unpack("x64L", $struct_psd);
$mb = ($psize / 1024) * $pages;
$mb = $mb / 1024;
printf("Phys Memory:\t%8.2f\n",$mb);
printf("Free Pages: \t%8.0f\n",$free);
$pcfree = 100. * $free /$pages;
$pcused = 100. - $pcfree;
printf("\t%%free %5.2f\n\t%%used %5.2f\n", $pcfree, $pcused);
exit 0;

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Getting memory on HP Unix


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT