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

outputResults(data, data_name, output) -> boolean | SystemError

Function to pass data to artemis to save. Returns true on success or SystemError.

ParamTypeDescription
datastringA JSON string of data
data_namestringName of the type of data. Ex: processes
outputOutputAn Output object telling artemis how to output the data

dumpData(data, data_name, output) -> boolean | SystemError

Function to pass data to artemis to save and skip adding metadata to the output. Returns true on success or SystemError.

ParamTypeDescription
datastringA JSON string of data
data_namestringName of the type of data. Ex: processes
outputOutputAn Output object telling artemis how to output the data

getSysteminfo() -> SystemInfo

Function to pull systeminfo 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[]Arguements to pass to the command