Command line for cdpub
Start cdpub device publisher
Synopsis
cdpub [-b] -f raw_device[:cam] [-l] [-m pps_path] [-n iterations] [-p insertion:removal] [-r scope:init] [-s dll_path] [-v]
Options
- -b
- Run cdpub in the foreground (not background). This option is handy for debugging because you can press CtrlC to terminate the publisher.
- -f raw_device[:cam]
- Device path of the CD drive to monitor for state changes. You can name only one device, with or without its device name and unit number: /dev/cd0 or /dev/cd0:/dev/cam0/000.
- -l
- Log messages to slog2info instead of standard out.
- -m pps_path
- The PPS directory path. The subdirectories for storing the device, device control, driver, and mount objects are located in this directory. The default is /pps/qnx/.
- -n iterations
- Number of polling intervals (i.e., CD drive state readings) to skip before checking the device temperature. The time between successive polling intervals can be one of two values: the insertion polling interval or the removal polling interval, depending on the CD drive state. After querying the device for its temperature, cdpub updates the temperature_state and temperature_value attributes in the device information object.
- -p insertion:removal
- The insertion and removal polling intervals (in milliseconds), which are how often cdpub checks for CD insertions and removals. Often, you'll want the insertion interval to be shorter than the removal interval because detecting new CDs and publishing their information through PPS has higher priority than cleaning up PPS objects for removed CDs.
- -r scope:init
- Removal-prevention setting for CD devices. Both fields are Boolean and must be 0 or 1.
- -s dll_path
- The plugin path. At startup, cdpub looks in this path for plugins that it can load and use to provide more detailed device information (for details, see Plugins).
- -v
- Increase output verbosity. Setting one v logs CD insertions and removals. Setting two v's adds the logging of PPS object creation and deletion. Setting three or four v's logs more detailed events as well as errors that are less severe.
Description
The cdpub command starts the CD device publisher, which monitors the CD drive and publishes up-to-date information on CD devices through PPS.
You must name the raw device (i.e., /dev/cd0) with the -f option to tell cdpub which device path to use for monitoring the CD drive state. Through other options, you can set how often cdpub checks for CD insertions and removals, the default removal-prevention policy, and how it logs errors and events.
The cdpub service runs as a self-contained process that doesn't require any user input or accept any commands. It has no client utility for performing device-publishing tasks on request or for adjusting any of its settings. To reconfigure cdpub, you must restart the service with different command-line options. We recommend putting the cdpub command line in a startup script (e.g., startup.sh) to launch the publisher automatically during bootup.
