
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
system-status
Advanced tools
system-status is a NodeJS lib for statistical system data such as cpu, mem, network, disk.
Language : 🇺🇸 English | 🇨🇳 简体中文
system-status is a NodeJS lib for statistical system data such as cpu, mem, network, disk.
mounts (Stat class instance method)mountAt (Stat class instance method)blockDeviceStatistics (Stat class instance method)networks (Stat class instance method)networkStats (Stat class instance method)batteryLife (Stat class instance method)isAcPower (Stat class instance method)memory (Stat class instance method)swap (Stat class instance method)loadAverage (Stat class instance method)uptime (Stat class instance method)bootTime (Stat class instance method)cpuLoadAggregate (Stat class instance method)cpuTemp (Stat class instance method)socketStats (Stat class instance method)format (Function)FileSystem (Type)BlockDeviceStats (Type)Network (Type)NetworkStats (Type)BatteryLife (Type)Memory (Type)LoadAverage (Type)CPULoad (Type)ConvertResult (Type)ConvertOption (Type)| node12 | node14 | node16 | node18 | |
|---|---|---|---|---|
| Windows x64 | ✓ | ✓ | ✓ | ✓ |
| Windows x86 | ✓ | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ | ✓ |
| macOS aarch64 | ✓ | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ | ✓ |
| Linux aarch64 gnu | ✓ | ✓ | ✓ | ✓ |
| Linux aarch64 musl | ✓ | ✓ | ✓ | ✓ |
| FreeBSD x64 | ✓ | ✓ | ✓ | ✓ |
npm install system-status
# or
yarn add system-status
# or
pnpm i system-status
Create Stat class instance in first
const stat = new Stat()
mounts (Stat class instance method)Get filesystem mount information.
mounts(): Array<FileSystem>
mountAt (Stat class instance method)Get a filesystem mount information for the filesystem at a given path.
mountAt(at: string): FileSystem
blockDeviceStatistics (Stat class instance method)Get block device statistics objects.
blockDeviceStatistics(): Array<BlockDeviceStats>
networks (Stat class instance method)Get network intefrace information.
networks(): Array<Network>
networkStats (Stat class instance method)Get statistics for a given interface name (bytes/packets sent/received).
networkStats(interface: string): NetworkStats
batteryLife (Stat class instance method)Get a battery life information object.
batteryLife(): BatteryLife
isAcPower (Stat class instance method)Get whether AC power is plugged in.
isAcPower(): boolean
memory (Stat class instance method)Get memory information.
memory(): Memory
swap (Stat class instance method)Get swap memory information.
swap(): Memory
loadAverage (Stat class instance method)Get load average.
loadAverage(): LoadAverage
uptime (Stat class instance method)Get the system uptime.
uptime(): bigint
bootTime (Stat class instance method)Get the system boot time.
bootTime(): Date
cpuLoadAggregate (Stat class instance method)Get CPU load statistics, average over all CPUs (cores).
cpuLoadAggregate(): CPULoad
cpuTemp (Stat class instance method)Get the current CPU temperature in degrees Celsius. Depending on the platform, this might be core 0, package, etc.
cpuTemp(): number
socketStats (Stat class instance method)Get information about the number of sockets in use
socketStats(): SocketStats
format (Function)Format the source by ConvertOption
The default of ConvertOption is taking 1024 as the advancement, retain one decimal place
function format(source: bigint, option?: ConvertOption | undefined | null): ConvertResult
FileSystem (Type)interface FileSystem {
/** Used file nodes in filesystem */
files: bigint
/** Total file nodes in filesystem */
filesTotal: bigint
/** Free nodes available to non-superuser */
filesAvail: bigint
/** Free bytes in filesystem */
free: bigint
/** Free bytes available to non-superuser */
avail: bigint
/** Total bytes in filesystem */
total: bigint
/** Maximum filename length */
nameMax: bigint
fsType: string
fsMountedFrom: string
fsMountedOn: string
}
BlockDeviceStats (Type)interface BlockDeviceStats {
name: string
readIos: bigint
readMerges: bigint
readSectors: bigint
readTicks: bigint
writeIos: bigint
writeMerges: bigint
writeSectors: bigint
writeTicks: bigint
inFlight: bigint
ioTicks: bigint
timeInQueue: bigint
}
Network (Type)interface Network {
name: string
addrs: Array<NetworkAddrs>
}
interface NetworkAddrs {
addr: string
netmask: string
addrType: AddrType
}
const enum AddrType {
Ipv4 = 0,
IPv6 = 1,
}
NetworkStats (Type)interface NetworkStats {
rxBytes: bigint
txBytes: bigint
rxPackets: bigint
txPackets: bigint
rxErrors: bigint
txErrors: bigint
}
BatteryLife (Type)interface BatteryLife {
remainingCapacity: number
remainingTime: bigint
}
Memory (Type)interface Memory {
free: bigint
total: bigint
used: bigint
}
LoadAverage (Type)interface LoadAverage {
one: number
five: number
fifteen: number
}
CPULoad (Type)interface CPULoad {
user: number
nice: number
system: number
interrupt: number
idle: number
}
ConvertResult (Type)interface ConvertResult {
value: string
unit: string
}
ConvertOption (Type)interface ConvertOption {
advance: Advance
/** Decimal point */
precision: number
}
/**
* unit enum for stat option
* B -> KB, 1000 bytes
* B -> KIB, 1024 bytes
*/
export const enum Advance {
/** 1000 */
Kilobase = 1000,
/** 1024 */
Binary = 1024,
}
RustNode.js@10+ which fully supported Node-APIyarn@1.xSEE CHANGELOG
FAQs
system-status is a NodeJS lib for statistical system data such as cpu, mem, network, disk.
The npm package system-status receives a total of 8 weekly downloads. As such, system-status popularity was classified as not popular.
We found that system-status demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.