ubus
Communicate between processes over the uBus
TLDR
List available objects
Retrieve system information in JSON format
Listen to events
Display help
SYNOPSIS
ubus [options]
PARAMETERS
-s
Use specific ubus socket (default: /var/run/ubus.sock)
-t
Set timeout in seconds (default: 30)
-S
Use raw sockets
-v
More verbose output
-m
Monitor events on specified
-M
Monitor all events
-h
Display help
list [object]
List available objects and methods
call
Call a method on an object
listen
Listen for events
send
Send an event
wait_for
Wait for an object to become available
DESCRIPTION
The `ubus` command is a versatile utility for interacting with the uBus daemon, a lightweight inter-process communication (IPC) system commonly used in embedded Linux environments, particularly in OpenWrt. It enables communication between different processes running on the system through a publish-subscribe mechanism and remote procedure calls (RPC). `ubus` allows users to inspect, modify, and control system services and devices by sending commands and receiving responses. It provides a command-line interface to invoke methods on uBus objects, list available objects and methods, monitor events, and send signals. It simplifies management of complex system interactions by abstracting the underlying socket communication details.
Primarily intended for embedded systems due to its small footprint, `ubus` is also suitable for other resource-constrained environments requiring efficient and reliable inter-process communication. Its ease of use and flexible interface make it an invaluable tool for debugging, configuration, and automation of system tasks, essential for administering devices running on uBus.
CAVEATS
ubus relies on the ubusd daemon running and properly configured. Without a functional ubusd, the `ubus` command is unusable.
MESSAGE FORMAT
The message argument used in `call` and `send` commands is generally a JSON object. Ensure correct JSON syntax for successful communication.
EVENT MONITORING
When monitoring events with `-m` or `-M`, the output is streamed in real-time, reflecting system activities as they occur. This is extremely helpful during debugging.
SEE ALSO
ubusd(8)