Sponsored Content
Operating Systems Solaris getting available physical RAM Post 100569 by dangral on Tuesday 28th of February 2006 01:06:35 PM
Old 02-28-2006
Thanks zazzybob. That's what I was looking for. This is the code I was using it for, since I wanted the percentage of physical RAM used.

Code:
TOTAL_RAM=`prtdiag | grep '^Memory size' | awk -F: '{ print $2 }' | awk '{ print $1 }'`
(( TOTAL_RAM = TOTAL_RAM * 1000 ))

AVAIL_RAM=`vmstat 1 2 | sed -n '$ p' | awk '{print $5}'`

RAM_PERC=`echo "scale = 2; $AVAIL_RAM/$TOTAL_RAM" | bc | sed 's/\.//'`
(( RAM_PERC = 100 - RAM_PERC ))


Last edited by dangral; 02-28-2006 at 02:13 PM.. Reason: better explanation
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

physical volume and physical disk.

Hello, I need explanations about physical disks and physical volumes. What is the difference between these 2 things? In fact, i am trying to understand what the AIX lspv2command does. Thank you in advance. (2 Replies)
Discussion started by: VeroL
2 Replies

2. UNIX for Dummies Questions & Answers

Physical volume- no free physical partitions

I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Discussion started by: markper
9 Replies

3. Solaris

RAM Physical Memory usage by each Process.

Hi All, I am trying to find the physical memory usage by each process/users. Can you please let me know how to get the memory usage?. Thanks, bsraj. (12 Replies)
Discussion started by: bsrajirs
12 Replies

4. Red Hat

red hat Linux 5.0 is detecting 3gb ram but physical ram is 16gb

Hi, On server 64bit Hw Arch , Linux 5.0(32bit) is installed it is showing only 3gb of ram though physical is 16gb can u give me idea why? (4 Replies)
Discussion started by: manoj.solaris
4 Replies

5. AIX

Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine

Hello All, Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time? Thanks, Jenish (1 Reply)
Discussion started by: jenish_shah
1 Replies

6. Solaris

Solaris sun4v - how do you determine physical RAM?

I have a Sun T5120, and I want to programmatically determine how much RAM it has. # uname -a SunOS myhost 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5120 The box has 64Gb; I tried prtdiag and prtconf, but they give me bogus info prtconf gives me: # prtconf |grep -i... (12 Replies)
Discussion started by: thomn8r
12 Replies

7. Solaris

svc:/network/physical:default: Method "/lib/svc/method/net-physical" failed with exit status 96. [ n

After a memory upgrade all network interfaces are misconfigued. How do i resolve this issue. Below are some out puts.thanks. ifconfig: plumb: SIOCLIFADDIF: eg000g0:2: no such interface # ifconfig eg1000g0:2 plumb ifconfig: plumb: SIOCLIFADDIF: eg1000g0:2: no such interface # ifconfig... (2 Replies)
Discussion started by: andersonedouard
2 Replies

8. Red Hat

Physical RAM

Hi, I have a server (BL460c) with 32G of physical RAM. It currently only uses approx 5% its capacity but will use more (not sure how much more) pending the launch of further applications. If I need to build another node of similar functionality should I consider downgrading the physical... (2 Replies)
Discussion started by: Duffs22
2 Replies

9. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

10. Solaris

ZFS : Can arc size value exceed Physical RAM ?

Hi, kstat -p -m zfs -n arcstats -s size returns zfs:0:arcstats:size 8177310584 this values is approx (7.61 GB) but my Physical Memory size is only 6144 Megabytes. Can this happen ? if yes, then how can I find free memory on the system. BTW, I ran the kstat commands from a Non... (2 Replies)
Discussion started by: sapre_amit
2 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy