Article
Someone in the Novell Support Forums was asking for some help on how to determine how much total system RAM was in a computer.
If the amount of RAM was greater than 512 megs, then he wanted to restore an add-on image for an application which required 512+ megs of RAM to run properly.
I was able to use the following command to output the total amount of system RAM into the variable RAMTOAL:
RAMTOTAL=`free | awk '/Mem:/ {print $2}'`
You can verify this by typing:
free
On my test system I see the following output:
Note that my total RAM is listed as 516352.
Then type:
echo $RAMTOTAL
The value stored in the variable RAMTOTAL evaluates to 516352.
You could do something similar for "Used RAM" and "Free RAM", though it is probably not as useful:
RAMUSED=`free | awk '/Mem:/ {print $3}'`
RAMFREE=`free | awk '/Mem:/ {print $4}'`
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
- How to Load a Linux Driver Manually in a ZENworks Imaging environment
- Manually loading undetected Broadcom network modules within ZENworks Imaging
- Change language and keyboard layout to German in ZENworks Imaging
- Changing NIC Settings for ZENworks Imaging
- Adding a Custom Bootlogo to ZENworks 6.5 / 7 Imaging Environment
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 5542 reads



0