Skip to main content

System APIs

These functions help get metadata about the OS

cpus() -> Cpus[]​

Function to get system CPU information

disks() -> Disks[]​

Function to get disk information on the system

memory() -> Memory​

Function to get memory information

processListing(md5, sha1, sha256, binary) -> LinuxProcessInfo[] | WindowsProcessInfo[] | MacosProcessInfo[]​

Function to pull a process listing from the system

ParamTypeDescription
md5booleanEnable MD5 hashing. Optional. Default is false
sha1booleanEnable SHA1 hashing. Optional. Default is false
sha256booleanEnable SHA256 hashing. Optional. Default is false
binarybooleanProcess process binary data. Optional. Default is false

getSysteminfo() -> SystemInfo​

Function to pull system info data

uptime() -> number​

Function to get system uptime in seconds

hostname() -> string​

Function to get hostname of system

osVersion() -> string​

Function to get OS version

kernelVersion() -> string​

Function to get kernel version information

platform() -> string​

Function to get platform type of the system. Ex: Darwin

executeCommand(command, args) -> CommandResult | Error​

Execute a command on the system. If the command can be found via ENV variables then full path not needed. Args are optional.

ParamTypeDescription
commandstringCommand to execute
argsstring[]Arguments to pass to the command

connections() -> Connection[]​

Function to get active network connections.