System Administration Guide: Solaris Printing
Previous Next

Administering the Network Device Discovery Service by Using SMF

The HAL network device-discovery/printers service is controlled by SMF. You can enable, disable and refresh this service by using the svcadm command. For more information about using the svcadm command, see the svcadm(1M) man page.

How to Initiate the Network Device Discovery Services by Using SMF

This procedure describes how to initiate the network device-discovery/printers service (the HAL add-on module) by using the svcadm command. To initiate the HAL network discovery add-on module by using GNOME Desktop tools, see Initiating the HAL Network Device Discovery Add-On Module.

  1. Become superuser or assume an equivalent role.
  2. Determine whether the SMF device-discovery/printers service is online.
    # svcs device-discovery/printers

    If the service is online, the following output is displayed:

    STATE          STIME    FMRI
    online         13:30:22 svc:/network/device-discovery/printers:snmp

    If the service is offline, the following output is displayed:

    STATE          STIME    FMRI
    disabled       Dec_12   svc:/network/device-discovery/printers:snmp
  3. To enable the service instance, type the following command:
    # svcadm enable printers:snmp
    • To enable the service temporarily, type the following command:
      # svcadm enable -t printers:snmp

      When the -t option is specified with the svcadm command, the service instance is temporarily enabled. The service is enabled only until the next system reboot. Note that to modify the restarter_actions property group of the service instances, you must be superuser or have solaris.smf.manage.discovery.printers.snmp authorization, which is part of the Printer Management profile. For more information, see the smf_restarter(5) man page. By default, the enable command, when used without additional options, is persistent across a system reboot.

  4. Verify that the HAL add-on module has been enabled.
    # svcs device-discovery/printers
    STATE          STIME    FMRI
    online         13:30:22 svc:/network/device-discovery/printers:snmp 

How to Initiate a Single Scan of the Network for Newly Discovered Devices

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. To initiate a single scan of the network for newly discovered devices, type the following command:
    # svcadm refresh device-discovery

    If the service is enabled, or a scan has been successfully completed, the HAL device tree contains a complete list of all known printers that queues can be created for. For information about obtaining a list of all of the printers that have been discovered by the system, see How to Obtain Information about Discovered Printers by Using the Command Line.

  3. Verify that the device has been added to the HAL device tree. See How to Obtain Information about Discovered Printers by Using the Command Line.

How to Disable the SMF Network Device Discovery Service

  1. Become superuser or assume an equivalent role.
  2. To disable the network device-discovery/printers services, type the following command:
    # svcadm disable printers:snmp
  3. Verify that the service is disabled:
    # svcs device-discovery/printers
    STATE          STIME    FMRI
    disabled       Dec_12   svc:/network/device-discovery/printers:snmp

    For information about how to enable the service, see How to Initiate the Network Device Discovery Services by Using SMF.

See Also

To enable and disable the HAL network device discovery services by using printing tools in the GNOME Desktop Environment, see How to Initiate the HAL Network Device Discovery Add-On Module in the GNOME Desktop Environment.

Modifying the Network Device Discovery Service Properties

Use the svccfg command to add or modify the config/interval property of the svc:/network/device-discovery/printers:snmp service instance. This property can be modified to specify how often (in seconds) the system should scan the network for devices. For more information about using the svccfg command, see the svccfg(1M) man page.

For more information about the SMF properties that are associated with this service, see the smf(5) man page.

Example 10-1 Using the svccfg Command to Modify SMF Network Discovery Properties

This example shows how to change the config/interval property to scan the network for devices every 30 seconds.

# svccfg 
svc:> select printers:snmp 
svc:/network/device-discovery/printers:snmp>  setprop config/interval = integer: 30 
svc:/network/device-discovery/printers:snmp> quit
Previous Next