Diagnostics
The Diagnostics module provides access to realtime low-level statistics.
Methods
getAvFramesInfo()
Get playback related diagnostics.
Returns: A promise. The completion handler will be passed the following arguments:
- frames_info: An object with playback related info. The properties of the object are:
- video_frames_decoded
- video_frames_displayed
- video_frames_errored
- video_frames_dropped
- audio_frames_decoded
- audio_frames_displayed
- audio_frames_errored
- audio_frames_dropped
- errored_frames
getCpuInfo()
Get cpu related diagnostics (from /proc/stat).
Returns: A promise. The completion handler will be passed the following arguments:
- cpu_info: An array of objects with one element per cpu. Index 0 holds the overall cpu info. Each other array element holds the info for a single cpu core separately. For example, in the case of a box with 2 cpu cores, an array of 3 objects will be returned. Each object has the following properties:
- name
- total_time
- user_time
- system_time
- system_all_time
- idle_all_time
- idle_time
- nice_time
- io_wait_time
- irq_time
- soft_irq_time
- steal_time
- guest_time
getMemoryInfo()
Get memory related diagnostics (from /proc/meminfo).
Returns: A promise. The completion handler will be passed the following arguments:
- memory_info: An object with memory related info. All properties are measured in kilobytes. The properties of the object are:
- total_memory
- used_memory
- free_memory
- shared_memory
- buffers_memory
- cached_memory
- total_swap
- used_swap
- free_swap
getNetworkInfo()
Get network related diagnostics (from /proc/net/dev).
Returns: A promise. The completion handler will be passed the following arguments:
- network_info: An object with two main properties: network_mode and interfaces. The interfaces property is array of objects with one element per network interface. The properties of each object are:
- interface_name
- rx_packets
- rx_bytes
- rx_dropped
- rx_errors
- rx_multicast
- rx_compressed
- rx_length_errors
- rx_over_errors
- rx_crc_errors
- rx_frame_errors
- rx_fifo_errors
- rx_missed_errors
- tx_packets
- tx_bytes
- tx_dropped
- tx_errors
- tx_compressed
- tx_aborted_errors
- tx_carrier_errors
- tx_fifo_errors
- tx_heartbeat_errors
- tx_window_errors
- collisions
saveScreenshot()
The saveScreenshot method is used to save a snapshot of what is currently displayed on the screen to a file. The file is saved with the name 'snapshot[current date and time].ppm'.
Returns: A promise. The completion handler will be passed the following arguments:
- path: The path of the screenshot output file.