Sponsored Content
Top Forums Shell Programming and Scripting How to read total RAM in GBs? Post 303025871 by apmcd47 on Wednesday 14th of November 2018 07:33:58 AM
Old 11-14-2018
Quote:
Originally Posted by mohtashims
I am aware of the commands to find the total RAM on Linux and Unix for example vmstat.

Can you please tell me which tool / command can give me the Total RAM reading in GBs [gigabytes] on Solaris Unix and Linux ?
There is a tool on Linux called numfmt:
Code:
$ wc -c < myfile | numfmt --to=iec
34M

Unfortunately it is not on Solaris to my knowledge. It is, however, part of the Gnu coreutils, so it may be possible to compile it from source.

Andrew
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Total ram

Hi How can i find the total ram in the system? :confused: (4 Replies)
Discussion started by: orca
4 Replies

2. HP-UX

How should I know the total RAM available on UNIX

Hi How Should I know the Total RAM available on HP-UX box? (7 Replies)
Discussion started by: skull123
7 Replies

3. UNIX for Dummies Questions & Answers

grep running total/ final total across multiple files

Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies

4. Shell Programming and Scripting

View the Server Total Ram in GB

Hello, I want to view server RAM in GB i.e 4 GB or 6 GB via command line to use it in bash script waiting Any Ideas :) Thanks :):) (2 Replies)
Discussion started by: LinuxCommandos
2 Replies

5. 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

6. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

7. Emergency UNIX and Linux Support

Grab total page read from webalizer display in html

Hi, I need a way to grab the total combines since inception, total pages read from webalizer on my centos server or any other location (as long as since inception) and display the result live on my website So with each visit it would be increasing, or perhaps live (ajax) not sure But can... (0 Replies)
Discussion started by: lawstudent
0 Replies

8. Shell Programming and Scripting

Help with sum total number of record and total number of record problem asking

Input file SFSQW 5192.56 HNRNPK 611.486 QEQW 1202.15 ASDR 568.627 QWET 6382.11 SFSQW 4386.3 HNRNPK 100 SFSQW 500 Desired output file SFSQW 10078.86 3 QWET 6382.11 1 QEQW 1202.15 1 HNRNPK 711.49 2 ASDR 568.63 1 The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies

9. UNIX for Dummies Questions & Answers

Total RAM not recognised

Hi We have a redhat 4 with 8GB ram in it but free -m only recognises 3 GB of total ram please could some one help me why this happens HP syetems insight manager showing 4* 2 GB RAMS # free -m total used free shared buffers cached Mem: 3290... (6 Replies)
Discussion started by: robo
6 Replies
FREE(1) 							   User Commands							   FREE(1)

NAME
free - Display amount of free and used memory in the system SYNOPSIS
free [options] DESCRIPTION
free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the ker- nel. The information is gathered by parsing /proc/meminfo. The displayed columns are: total Total installed memory (MemTotal and SwapTotal in /proc/meminfo) used Used memory (calculated as total - free) free Unused memory (MemFree and SwapFree in /proc/meminfo) shared Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on kernels 2.6.32, displayed as zero if not available) buffers Memory used by kernel buffers (Buffers in /proc/meminfo) cached Memory used by the page cache (calculated as Cached - Shmem in /proc/meminfo - the Cached value is actually the sum of page cache and tmpfs memory) OPTIONS
-b, --bytes Display the amount of memory in bytes. -k, --kilo Display the amount of memory in kilobytes. This is the default. -m, --mega Display the amount of memory in megabytes. -g, --giga Display the amount of memory in gigabytes. --tera Display the amount of memory in terabytes. -h, --human Show all output fields automatically scaled to shortest three digit unit and display the units of print out. Following units are used. B = bytes K = kilos M = megas G = gigas T = teras If unit is missing, and you have petabyte of RAM or swap, the number is in terabytes and columns might not be aligned with header. -c, --count count Display the result count times. Requires the -s option. -l, --lohi Show detailed low and high memory statistics. -o, --old Display the output in old format, the only difference being this option will disable the display of the "buffer adjusted" line. -s, --seconds seconds Continuously display the result delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times. --si Use power of 1000 not 1024. -t, --total Display a line showing the column totals. --help Print help. -V, --version Display version information. FILES
/proc/meminfo memory information SEE ALSO
ps(1), slabtop(1), top(1), vmstat(8). AUTHORS
Written by Brian Edmonds. REPORTING BUGS
Please send bug reports to <procps@freelists.org> procps-ng September 2011 FREE(1)
All times are GMT -4. The time now is 03:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy