Command line for cdpub

Start cdpub device publisher


    cdpub [-b] -f raw_device[:cam] [-l] [-m pps_path]
          [-n iterations] [-p insertion:removal] [-r scope:init]
          [-s dll_path] [-v] 


Run cdpub in the foreground (not background). This option is handy for debugging because you can press CtrlC to terminate the publisher.
By default, cdpub runs in the background.
-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.
The CD driver creates the /dev/cam0/000 entry, which gives cdpub another device path for issuing commands (e.g., eject, load) when the path of the /dev/cd0 path is busy (perhaps due to a filesystem operation).
This flag and one of the two listed device paths must be specified once on the command line; cdpub ignores extra -f options.
Log messages to sloginfo instead of standard out.
By default, cdpub logs messages to 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: either 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 object.
By default, cdpub skips 5 polling intervals between temperatures checks.
-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 CDs that have been removed.
The default insertion interval is 1000 ms; the default removal interval is 2000 ms.
-r scope:init
Removal-prevention settings for CD devices. Both settings are Boolean, so they must be either 0 or 1.
For scope, a value of 0 specifies a local scope for the removal-prevention setting, which means cdpub (and not the actual device) enforces the removal-prevention policy. A value of 1 makes cdpub query the device for its own removal-prevention setting before it attempts to update or report the setting when requested by an application.
For init, a value of 0 makes cdpub allow device removals when it starts, while a value of 1 makes it prevent device removals. Applications can change the removal-prevention setting by writing a command to the device control object (see Device control object for more information).
The default cdpub behavior is to use a local scope and to allow device removal.
-s dll_path
The plugin path. At startup, cdpub looks in this path for plugins it can load and then use to provide more detailed device information (see Media Player Plugins).
If this option isn't specified, no plugins are loaded.
Increase output verbosity. The -v option is cumulative, so you can use several v's to increase 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.
Output verbosity is handy when you're trying to understand the operation of cdpub. However, when many v's are used, the logging becomes quite significant. The verbosity setting is good for systems under development but probably shouldn't be used in production systems or during performance testing.


Note: You should start cdpub with an explicit command only if the process terminates unexpectedly. Before trying to start cdpub manually, always confirm that the process isn't already running by checking the list of active processes with pidin or ps.

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) to tell cdpub which device path to use for monitoring the CD drive state. Through other command options, you can set how often cdpub checks for CD insertions and removals and specify the default removal-prevention policy. You can also adjust how cdpub logs error and event information.

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 change the options in its command line and restart the service. We recommend putting the cdpub command line in a startup script (e.g., to launch the publisher automatically during bootup.