Skip to content
My Custom Title
Main Navigation
Home
Guide
API
Appearance
Menu
Return to top
On this page
Node.js 运行在操作系统上,可以通过os模块获取系统信息
CPU 核心数
os.cpus().length
总内存
os.totalmem()
空闲内存
os.freemem()
操作系统类型
os.type()
主机名
os.hostname()