procps-ticker
Ticks proc
info of the host machine at given intervals and exposes it via a stream interface.
var getstat = sysinfogetstat; { return String' ' + s;} { stream; console;} var stream = stream ;
Table of Contents generated with DocToc
- Installation
- API
- readproctab(opts) → {ReadableStream}
- Stream::end()
- sysinfo::getdiskstat(opts) → {ReadableStream}
- sysinfo::getstat(opts) → {ReadableStream}
- sysinfo::loadavg(opts) → {ReadableStream}
- sysinfo::meminfo(opts) → {ReadableStream}
- sysinfo::uptime(opts) → {ReadableStream}
- sysinfo::uptimeSince(opts) → {ReadableStream}
- sysinfo::vminfo(opts) → {ReadableStream}
- License
Installation
npm install procps-ticker
API
-
procps
-
Exposes the underlying procps library in order to allow calling methods on it directly.
- Source:
-
readproctab(opts) → {ReadableStream}
-
Creates a stream that will emit readprocdata at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
flags
number <optional>
Returns:
stream that emits readproctab data at the given interval
- Type
- ReadableStream
-
Stream::end()
-
Call this on any of the returned streams in case you want to tell the state stream to end. Useful for testing and/or when you want to end your debugging session and allow the program to exit.
- Source:
-
sysinfo::getdiskstat(opts) → {ReadableStream}
-
Creates a stream that will emit disk stats at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
Returns:
stream that emits disk stats at the given interval
- Type
- ReadableStream
-
sysinfo::getstat(opts) → {ReadableStream}
-
Creates a stream that will emit stats at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
Returns:
stream that emits stats at the given interval
- Type
- ReadableStream
-
sysinfo::loadavg(opts) → {ReadableStream}
-
Creates a stream that will emit loadavg info at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
- Source:
Returns:
stream that emits loadavg info at the given interval
- Type
- ReadableStream
-
sysinfo::meminfo(opts) → {ReadableStream}
-
Creates a stream that will emit meminfo at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
unit
number <optional>
'b'|'k'|'m'|'g'
to return usage in Bytes|KB|MB|GB respectivelyReturns:
stream that emits meminfo at the given interval
- Type
- ReadableStream
-
sysinfo::uptime(opts) → {ReadableStream}
-
Creates a stream that will emit uptime info at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
Returns:
stream that emits uptime info at the given interval
- Type
- ReadableStream
-
sysinfo::uptimeSince(opts) → {ReadableStream}
-
Creates a stream that will emit uptime since info at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
Returns:
stream that emits uptime since info at the given interval
- Type
- ReadableStream
-
sysinfo::vminfo(opts) → {ReadableStream}
-
Creates a stream that will emit vminfo at the given interval.
Parameters:
Name Type Description opts
Object options
Properties
Name Type Argument Description interval
number <optional>
interval in milliseconds at which to emit data (default: 1000ms)
Returns:
stream that emits vminfo at the given interval
- Type
- ReadableStream
generated with docme
License
MIT