Here is example to list os info of Raspberry Pi, coded with Node.js.
Node.js to read OS info |
var os= require("os");
console.log("\nhttp://helloraspberrypi.blogspot.com/\n");
console.log("os.tmpdir(): ", os.tmpdir());
console.log("os.endianness()= ", os.endianness());
console.log("os.hostname()= ", os.hostname());
console.log("os.type()= ", os.type());
console.log("os.platform()= ", os.platform());
console.log("os.arch(): ", os.arch());
console.log("os.release()= ", os.release());
console.log("os.uptime()= ", os.uptime());
console.log("os.loadavg()= ", os.loadavg());
console.log("os.totalmem()= ", os.totalmem());
console.log("os.freemem()= ", os.freemem());
console.log("os.cpus()= \n", os.cpus());
console.log("os.networkInterfaces()= \n", os.networkInterfaces());
console.log("os.EOL= ", os.EOL);
No comments:
Post a Comment