totalmem
method of OS
module of node.js
This method is used to get the total amount of system memory in bytes.
This method returns Integer
. Code snippet is given below:
//Name of the file: totalmem.js
var os = require('os');
var value = os.totalmem();
console.log("os.totalmem() => " + value);
>node totalmem.js
os.totalmem() => 1948631040