Nodejs os: Difference between revisions
From wikinotes
(Created page with " = Documentation = <blockquote> {| class="wikitable" |- | os docs || https://nodejs.org/api/os.html |- |} </blockquote><!-- Documentation -->") |
No edit summary |
||
Line 8: | Line 8: | ||
|} | |} | ||
</blockquote><!-- Documentation --> | </blockquote><!-- Documentation --> | ||
= Machine Info = | |||
<blockquote> | |||
<syntaxhighlight lang="javascript"> | |||
os.arch() // 'x64' | |||
os.cpus() // [ { ..cpuinfo.. }, {...}, ... ] | |||
os.freemem() | |||
os.totalmem() | |||
os.hostname() // hostname | |||
os.networkInterfaces() // { "lo1": [ ... ] } | |||
os.platform() // linux, freebsd, darwin, win32, ... | |||
</syntaxhighlight> | |||
</blockquote><!-- Machine Info --> |
Revision as of 20:56, 31 July 2021
Documentation
os docs https://nodejs.org/api/os.html
Machine Info
os.arch() // 'x64' os.cpus() // [ { ..cpuinfo.. }, {...}, ... ] os.freemem() os.totalmem() os.hostname() // hostname os.networkInterfaces() // { "lo1": [ ... ] } os.platform() // linux, freebsd, darwin, win32, ...