RAM Size

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat RAM Size
# 1  
Old 07-03-2010
RAM Size

Can anyone let me know whether there is a command to know the RAM capacity in GB?

I have tried cat /proc/meminfo and free.But its not in GB. I need to use it in script.

Thanks and Regards
# 2  
Old 07-03-2010
Assuming cat /proc/meminfo prints
Code:
root:	total:    	used:    	free:  		shared:	buffers:	cached:
Mem:  	1055760384	1041887232	13873152	0	100417536 	711233536
Swap: 	1077501952  	8540160 	1068961792
						
MemTotal:		1031016 kB	
MemFree:		13548 kB
MemShared:		0 kB
Buffers:		98064 kB
Cached:			692320 kB
SwapCached:		2244 kB
Active:			563112 kB
Inact_dirty:		309584 kB
Inact_clean:		79508 kB
Inact_target:		190440 kB
HighTotal:		130992 kB
HighFree:		1876 kB
LowTotal:		900024 kB
LowFree:		11672 kB
SwapTotal:		1052248 kB
SwapFree:		1043908 kB
Committed_AS:		332340 kB

The values in the second and the third line of the above output are in Bytes.
If you want to calculate GB out from Bytes, the formula is like this: Bytes/1024/1024/1024
Code:
cat /proc/meminfo | awk '/^Mem:/ {print $2/1024/1024/1024"GB", $3/1024/1024/1024"GB", $4/1024/1024/1024"GB"}'
0,983253GB 0,970333GB 0,0129204GB
$

Also note that:
Code:
MemTotal:		1031016 kB

is the result of Bytes/1024
# 3  
Old 07-05-2010
try this
Code:
 
# free -g

# 4  
Old 07-05-2010
personally, I am partial to this command and I alias it to meminfo on all my machines:
Code:
vmstat -s -S M | egrep 'mem|swap'

# 5  
Old 07-15-2010
MySQL reply

#free -g
this command can list the RAM size and swap size in GB
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Command for finding RAM size in HP-UX

I am trying to find RAM size in my HP-UNIX server. what command I should use for this? I am using top command but not clear about below line from top o/p Memory: 1517080K (471284K) real, 1877692K (751256K) virtual, 8078944K free Page# 1/6 (3 Replies)
Discussion started by: venkatababu
3 Replies

2. UNIX for Dummies Questions & Answers

how to know RAM size

Hi can anyone please help me, how to know RAM specification in unix? (4 Replies)
Discussion started by: palash2k
4 Replies

3. Shell Programming and Scripting

To find the RAM size for an Linux server.

Hi Gurus, Can someone let me know how to find the RAM size,ROM size and Number of processors for a linux server. Version :Linux 2.4.9-e.57smp Also what does "e.57smp" stands for? Thanks in advance gurus..... cheers. (3 Replies)
Discussion started by: navojit dutta
3 Replies

4. Shell Programming and Scripting

ram size in sun solaris

I need to check ram size and currently free in sun solaris box (8 Replies)
Discussion started by: pmsuper
8 Replies

5. AIX

To find RAM Size in AIX as normal user?

Hi, Am jus trying to find the Total RAM Size of a AIX m/c (in MB)..svmon works perfectly for a superuser...But i want to achive this as a normal user...Please help me out with correct command.. Best Regards, Muthukumaran.M (3 Replies)
Discussion started by: muthukumaran13
3 Replies

6. HP-UX

RAM size

hi, while i am working in hpux 11.23 using a telnet connection how do i check the RAM size and hard disk size? (4 Replies)
Discussion started by: sekar sundaram
4 Replies

7. Programming

getting RAM size

Sir, How can i get the RAM size .Is there is any predefined function ..Howsir??? Thanks In advance, ArunKumar (6 Replies)
Discussion started by: arunkumar_mca
6 Replies

8. UNIX for Dummies Questions & Answers

How to find RAM size in my Solaris 8

Hello there, I have a very basic question. It is so simple to find out all the information about system in windows environment. But I do not see any easy way to find it out in my Unix (Solaris 8) box. All I want to find out how much RAM I have in my solaris 8 box. Is there any command? ... (3 Replies)
Discussion started by: malikabid
3 Replies

9. UNIX for Dummies Questions & Answers

Size of Installed RAM ?

Is it possible from the command line, or by looking at one of the log files to find out the amount of RAM installed on my SCO Unix 5.05 Server? I also need to find out H/Disk size and Processor speed but I think i'll do a search of the forums for those ones. Thanks RamblasPro (2 Replies)
Discussion started by: RamblasPro
2 Replies

10. UNIX for Dummies Questions & Answers

RAM size in Digital unix

Hi All Im currntly working on a digital unix machine and must know what is the amount of MB\GB instaled ( i do not have physical access to the machine). can anyone help me here? 10x!!!!!!!!!!!!!!! (1 Reply)
Discussion started by: dindan100
1 Replies
Login or Register to Ask a Question