Restarting Services with svcadm on Solaris 10 Systems
On systems running Solaris 10, you can restart services using the
svcadm
command. For instance, to restart the SSH daemon on Solaris
10 systems, from the root account use
svcadm restart ssh
.
# svcadm
Usage: svcadm [-v] [cmd [args ... ]]
svcadm enable [-rst] ... - enable and online service(s)
svcadm disable [-st] ... - disable and offline service(s) svcadm restart ... - restart specified service(s)
svcadm refresh ... - re-read service configuration
svcadm mark [-It] ... - set maintenance state
svcadm clear ... - clear maintenance state
svcadm milestone [-d] - advance to a service milestone
Services can be specified using an FMRI, abbreviation, or fnmatch(5)
pattern, as shown in these examples for svc:/network/smtp:sendmail
svcadm svc:/network/smtp:sendmail
svcadm network/smtp:sendmail
svcadm network/*mail
svcadm network/smtp
svcadm smtp:sendmail
svcadm smtp
svcadm sendmail
[/os/unix/solaris]
permanent link
Writing An ISO File to CD or DVD with Solaris
Solaris, at least version 10, provides the cdrw utility that can be used to
write information to CDs or DVDs. To list all of the CD or DVD writers
available on the system, you can use the
cdrw -l
command.
When I used the command on an x86-based Solaris system without any media
in the drive, I saw the following:
# cdrw -l
Looking for CD devices...
No CD writers found or no media in the drive.
I placed a blank DVD in the DVD writer and tried again. I then saw the DVD
writer listed.
# cdrw -l
Looking for CD devices...
Node Connected Device Device type
----------------------+--------------------------------+-----------------
cdrom0 | DVDRW IDE 16X A188 | CD Reader/Writer
You can also use the command iostat -En
to see information
on the CD or DVD writers in a system.
# iostat -En
c0t1d0 Soft Errors: 21 Hard Errors: 3 Transport Errors: 0
Vendor: DVDRW Product: IDE 16X Revision: A188 Serial No:
Size: 0.00GB <8192 bytes>
Media Error: 0 Device Not Ready: 2 No Device: 1 Recoverable: 0
Illegal Request: 21 Predictive Failure Analysis: 0
If you have an .iso file, i.e. an image of a CD or DVD that you wish to
write to a CD or DVD, you can use the command cdrw -i someimage.iso
to write an image to a blank disc in a CD or DVD writer as in the
example below.
# cdrw -i sol-10-u2-companion-ga.iso
Looking for CD devices...
Initializing device...done.
Writing track 1...done
Finalizing (Can take several minutes)...done.
If you wish to specify the device to use for writing, such as in the case
where a system may have multiple devices capable of writing to CDs or DVDs, e.g.
one CD writer and one DVD writer, you can use the -d
option to
specify the device to use for writing.
cdrw -i -d cdrom0 sol-10-u2-ga-x86-dvd.iso
The cdrw command supports the following options:
-a Creates an audio disk. At least one audio-file name
must be specified. A CD can not have more than 99
audio tracks, so no more than 99 audio files can be
specified. Also, the maximum audio data that can be
written to the media by default is 74 minutes,
unless -C is specified.
-b Blanks CD-RW or DVD-RW media. The type of erasing
must be specified by the all, fast, or session
argument. DVD+RW media does not support blanking,
but can be rewritten without the need for blanking.
-c Copies a CD. If no other argument is specified, the
default CD writing device is assumed to be the
source device as well. In this case, the copy
operation reads the source media into a temporary
directory and prompts you to place a blank media
into the drive for the copy operation to proceed.
-C Uses stated media capacity. Without this option,
cdrw uses a default value for writable CD media,
which is 74 minutes for an audio CD, 681984000
bytes for a data CD, or 4.7 Gbytes for a DVD.
-d Specifies the CD or DVD writing device.
-h Help. Prints usage message.
-i Specifies the image file for creating data CDs or
DVDs. The file size should be less than what can be
written on the media. Also, consider having the
file locally available instead of having the file
on an NFS-mounted file system. The CD writing pro-
cess expects data to be available continuously
without interruptions.
-l Lists all the CD or DVD writers available on the
system.
-L Closes the disk. If the media was left in an open
state after the last write operation, it is closed
to prevent any further writing. This operation can
only be done on re-writable CD-RW media.
-m Uses an alternate temporary directory instead of
the default temporary directory for storing track
data while copying a CD or DVD. An alternate tem-
porary directory might be required because the
amount of data on a CD can be huge. For example,
the amount of data can be as much as 800 Mbytes for
an 80 minute audio CD and 4.7 Gbytes for a DVD. The
default temporary directory might not have that
much space available.
-M Reports media status. cdrw reports if the media is
blank or not, its table of contents, the last
session's start address, and the next writable
address if the disk is open. DVD+RW does not sup-
port erasing and always has some content on the
media.
-O Keeps the disk open. cdrw closes the session, but
it keeps the disk open so that another session can
be added later on to create a multisession disk.
-p Sets the CD writing speed. For example, -p 4 sets
the speed to 4X. If this option is not specified,
cdrw uses the default speed of the CD writer. If
this option is specified, cdrw tries to set the
drive write speed to this value, but there is no
guarantee of the actual speed that is used by the
drive.
-s Specifies the source device for copying a CD or
DVD.
-S Simulation mode. In this mode, cdrw operates with
the drive laser turned off, so nothing is written
to the media. Use this option to verify if the sys-
tem can provide data at a rate good enough for CD
writing.
-T Audio format to use for extracting audio files or
for reading audio files for audio CD creation. The
audio-type can be sun, wav, cda, or aur.
-v Verbose mode.
-x Extracts audio data from an audio track.
[/os/unix/solaris]
permanent link