Article
2286
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}'`
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





0