hI,
On Tue, 25 Oct 2005, Pascal Bleser wrote:
Randall R Schulz wrote:
On Tuesday 25 October 2005 09:09, Anders Johansson wrote:
On Tuesday 25 October 2005 17:59, Daniel Hatfield wrote:
Is there a way to obtain the amount of physical memory
installed in a system from within SuSE 10 console? This is for
a script.
$ cat /proc/meminfo
MemTotal: 526525152 kB
[...]
$
Or to be more specific:
cat /proc/meminfo | grep MemTotal
Or to be even more specific
cat /proc/meminfo | grep MemTotal|awk '{print $2}'
Or, to be more parsimonious:
% grep -h MemTotal /proc/meminfo |awk '{print $2}'
If I knew anything at all about awk, I'd know whether it could handle
the selection (grep) part, too, but I don't.
Just for the record:
awk '/^MemTotal:/{print $2}' /proc/meminfo
Topped:
(read a b c; echo $b ) </proc/meminfo
Cheers -e
--
Eberhard Moenkeberg ([EMAIL PROTECTED], [EMAIL PROTECTED])
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]