svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
sysobjadm(8)
sysobjadm(8) System Administration Commands sysobjadm(8)
NAME
sysobjadm - administrative command for the system object database
SYNOPSIS
/usr/sbin/sysobjadm [-R rootpath] initialize
/usr/sbin/sysobjadm [-R rootpath] restore [-l] [-f file] [name]
/usr/sbin/sysobjadm [-R rootpath] regenaux
/usr/sbin/sysobjadm [-R rootpath] dump [search]
/usr/sbin/sysobjadm [-R rootpath] device-list [-P] [-I] [-i] [-a]
[-u uuid | -p path | -d driver]
/usr/sbin/sysobjadm [-R rootpath] device-remove
-u uuid | -p path | -d driver [-i]
/usr/sbin/sysobjadm [-R rootpath] device-set-instance
-u uuid | -p path instance
DESCRIPTION
The sysobjadm command is the administrative command that interacts with
the system object daemon (sysobjd) and the system object database it‐
self.
The subcommands that deal with initializing or restoring the database
should not be necessary under normal system operation. Unless an alter‐
nate root is specified, they should not be run while sysobjd is run‐
ning; sysobjadm checks for this.
Additionally, a reboot is required after running most of these subcom‐
mands if no alternate root is specified. Normally, the expected se‐
quence of commands for the initialize and restore commands is:
# svcadm disable -st sysobj [if the sysobj SMF service is running]
# sysobjadm {backup|restore} ...
# reboot
OPTIONS
The following global option is supported:
-R Specifies an alternate root path (base dir) to be used. This can
be used to do maintenance of the system object database on a dif‐
ferent boot environment. For more information, see the beadm(8)
man page.
SUB-COMMANDS
initialize
Creates a new, empty database.
restore [-l] [-f file] [name]
Restores the database from a backup file. The -l option lists all
available backup files created by the standard sysobjd backup mech‐
anism.
The backup file can be specified in two ways:
o Through -f file for a non-standard backup file. For ex‐
ample, copied to a non-standard location by the system
administrator.
o Using the name parameter, which selects a file from the
standard location.
After restoring the database, all auxiliary files (if any), gener‐
ated by sysobjd plugins, will be regenerated using the restored
database.
dump [search]
Prints all aliases and properties of system objects. The optional
search parameter specifies the class of objects to be printed. If
it is omitted, all objects will be printed. The search parameter
has the same syntax as the search string specified to
sysobj_lookup(3SYSOBJ).
This subcommand can be run by an unprivileged user, although the
user should be aware that not all classes of objects might be ac‐
cessible without privileges.
regenaux
Regenerates any auxiliary files as managed by sysobjd plugins. If
the daemon is not running, or an alternate root is specified,
sysobjadm loads the plugins itself, and instructs them to rewrite
the files. This command can be used if the generated files got out
of sync with the database, which is not expected to happen under
normal system operation.
DEVICE SUBCOMMANDS
These are the subcommands specified by the sysobj device plugin. These
commands are not expected to be used commonly; instead they act as re‐
placements for the rare case where the system administrator might have
edited the path_to_inst file. For more information, see the
path_to_inst(5) man page. Since these commands manipulate vital device
metadata, they should be used with care.
A 'running device' in this section refers to a situation where the com‐
mand is executed on the main database (if -R option is not specified),
and the specified device is active. When executed on the current boot
environment (for example, without -R option), a reconfigure boot (re‐
boot -- -r) is likely needed to make sure /dev and /devices are in
sync.
device-list [-P] [-I] [-i] [-a] [-u uuid | -p path | -d driver]
Lists device objects in the database, prints their UUID, driver,
instance, and state (active or inactive). If -P option is speci‐
fied, the device path is printed instead of the UUID.
If -I option is specified, the format of path_to_inst is mimicked,
printing the path, driver, and instance. The -I flag is mutually
exclusive with the -P flag.
If -u, -p, or -d option is not specified, this will list all device
objects, else only devices with the specified UUID, path, or driver
will be listed.
With the -a option, only active devices are listed. With the -i op‐
tion, only inactive devices (currently not in the system) are
listed. Without either of these options, all devices are listed.
It is important to note that when the global -R option is speci‐
fied, the active/inactive state reflects the state the device had
when the database in the alternate root path was last active and
not the current state.
device-remove -u uuid | -p path
device-remove -d driver [-i]
Removes a device from the database, specified by device path or
UUID. To remove a running device, the sysobj service must be dis‐
abled, and the command should be followed by a reboot. The second
form of the command removes all devices with the specified device
driver from the database, removing all inactive devices only if -i
option is specified.
See the device-list command for what the device active/inactive
state means in the case of the use of the global -R flag.
device-set-instance -u uuid | -p path instance
Sets the instance number for a device. If done on an running de‐
vice, this command should be run with the sysobj service disabled,
and followed by a reboot.
DEVICE COMMAND EXAMPLES
This example displays how a number of old device entries can be re‐
moved, and then the remaining device instances can be reassigned to
have low, contiguous instance numbers. This example uses the USB 'hid'
driver as an example, removing old instances of the mouse/keyboard de‐
vices.
# svcadm disable -st sysobj
# sysobjadm device-list -d hid
002f2bf6-bb28-4e6c-b484-9e59e7b376c9 hid 10 inactive
3dbaed01-1165-4003-8ca7-c7c1f0d03c7c hid 12 inactive
41a60dfd-c584-4e47-b370-feae64a06539 hid 13 active
39b2cd4c-ae80-4028-843b-b205629c8e41 hid 9 active
# sysobjadm device-remove -d hid -i
# sysobjadm device-list -d hid
41a60dfd-c584-4e47-b370-feae64a06539 hid 13 active
39b2cd4c-ae80-4028-843b-b205629c8e41 hid 9 active
# sysobjadm device-list -P -d hid
/pci@0,0/pci1028,498@1a/hub@1/device@4/input@1 hid 13 active
/pci@0,0/pci1028,498@1d/hub@1/device@5/keyboard@0 hid 9 active
# sysobjadm device-set-instance -u 41a60dfd-c584-4e47-b370-feae64a06539 0
# sysobjadm device-set-instance -u 39b2cd4c-ae80-4028-843b-b205629c8e41 1
# reboot
[after reboot]
# sysobjadm device-list -d hid
41a60dfd-c584-4e47-b370-feae64a06539 hid 0 active
39b2cd4c-ae80-4028-843b-b205629c8e41 hid 1 active
This example shows how sysobjadm can be used to fix a duplicate in‐
stance number problem, if for example two devices have been in error
assigned the same instance number. In this case, two sd devices have
been assigned the instance number 1.
# svcadm disable -st sysobj
# sysobjadm device-list -I
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd"
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 1 "sd"
# sysobjadm device-set-instance \
-p /pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0 2
# reboot
[ after reboot ]
# sysobjadm device-list -I
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd"
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 2 "sd"
This example is the same as above, but illustrates how sysobjadm can be
used to repair a duplicate instance assignment on a mounted root image.
[ mount alternate root image on /mnt ]
# sysobjadm -R /mnt device-list -I
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd"
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 1 "sd"
# sysobjadm -R /mnt device-set-instance \
-p /pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0 2
# sysobjadm -R /mnt device-list -I
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd"
"/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 2 "sd"
# bootadm update-archive -R /mnt
[ unmount alternate root image on /mnt ]
It is possible to bootstrap a known-good path_to_inst file into kdev‐
data/sysobj. The known-good path_to_inst file might be restored from a
backup or provided by an administrator. Note: sysobj will automatically
import path_to_inst if it determines that kdevdata/sysobj are cor‐
rupted, missing, or has reverted to its bootstrap form.
# svcadm disable -st sysobj
# mv /etc/sysobj/sysobj.db /etc/sysobj/sysobj.db.original
# mv /etc/devices/kdevdata /etc/devices/kdevdata.original
# sysobjadm initialize
# echo '#kdevdata_bootstrap_1' > /etc/devices/kdevdata
[ restore or otherwise fix /etc/devices/path_to_inst ]
# bootadm update-archive
# reboot
Full bootstrapping is the process of (re)generating path_to_inst for
all devices in the system using fresh sequential instance number as‐
signments. If the hardware configuration is unchanged, full bootstrap
instance number assignment for a particular device will always be the
same. This process is used during Solaris install, and can also be used
as an administrative recovery procedure to get install-like instance
number assignments.
# svcadm disable -st sysobj
# mv /etc/sysobj/sysobj.db /etc/sysobj/sysobj.db.original
# mv /etc/devices/kdevdata /etc/devices/kdevdata.original
# mv /etc/devices/path_to_inst /etc/devices/path_to_inst.original
# sysobjadm initialize
# echo '#kdevdata_bootstrap_1' > /etc/devices/kdevdata
# echo '#path_to_inst_bootstrap_1' > /etc/devices/path_to_inst
# bootadm update-archive
# reboot
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 A fatal error occurred. One or more error messages are displayed
on standard error. The exit code is an error code as specified in
Intro(2). For invalid command line arguments, EINVAL is returned,
and other exit codes depend on the command.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityEvolv‐
ing
SEE ALSO
sysobjd(8), libsysobj(3LIB), svcadm(8), beadm(8)
Oracle Solaris 11.4 23 Jun 2025 sysobjadm(8)