設定檔:
/etc/syslog.conf
Contents |
Solaris includes a command line utility to get basic current system configuration information and output it to the console.
prtconf
The prtconf command is used to Print Configuration information to the console
Example:
# prtconf
System Configuration: Sun Microsystems sun4u
Memory size: 8192 Megabytes
System Peripherals (Software Nodes):SUNW,Sun-Fire-480R
packages (driver not attached)
SUNW,builtin-drivers (driver not attached)
deblocker (driver not attached)
disk-label (driver not attached)
terminal-emulator (driver not attached)
SUNW,debug (driver not attached)
dropins (driver not attached)
obp-tftp (driver not attached)
kbd-translator (driver not attached)
SUNW,i2c-ram-device (driver not attached)
SUNW,fru-device (driver not attached)
ufs-file-system (driver not attached)
chosen (driver not attached)
openprom (driver not attached)
client-services (driver not attached)
options, instance #0
aliases (driver not attached)
memory (driver not attached)
virtual-memory (driver not attached)
SUNW,UltraSPARC-III+ (driver not attached)
memory-controller, instance #0
SUNW,UltraSPARC-III+ (driver not attached)
memory-controller, instance #1
SUNW,UltraSPARC-III+ (driver not attached)
memory-controller, instance #2
SUNW,UltraSPARC-III+ (driver not attached)
memory-controller, instance #3
pci, instance #0
pci, instance #0
network, instance #2
network, instance #3
scsi, instance #0
disk (driver not attached)
tape (driver not attached)
sd, instance #1
sd, instance #2 (driver not attached)
sd, instance #3 (driver not attached)
sd, instance #4 (driver not attached)
sd, instance #5 (driver not attached)
sd, instance #6 (driver not attached)
sd, instance #7 (driver not attached)
sd, instance #8 (driver not attached)
sd, instance #9 (driver not attached)
sd, instance #10 (driver not attached)
sd, instance #11 (driver not attached)
sd, instance #12 (driver not attached)
sd, instance #13 (driver not attached)
sd, instance #14 (driver not attached)
sd, instance #15 (driver not attached)
scsi, instance #1
disk (driver not attached)
tape (driver not attached)
sd, instance #16 (driver not attached)
sd, instance #17 (driver not attached)
sd, instance #18 (driver not attached)
sd, instance #19 (driver not attached)
sd, instance #20 (driver not attached)
sd, instance #21 (driver not attached)
sd, instance #22 (driver not attached)
sd, instance #23 (driver not attached)
sd, instance #24 (driver not attached)
sd, instance #25 (driver not attached)
sd, instance #26 (driver not attached)
sd, instance #27 (driver not attached)
sd, instance #28 (driver not attached)
sd, instance #29 (driver not attached)
sd, instance #30 (driver not attached)
ide, instance #0
disk (driver not attached)
cdrom (driver not attached)
sd, instance #0
pci, instance #1
pci, instance #2
ebus, instance #0
flashprom (driver not attached)
bbc (driver not attached)
power (driver not attached)
i2c, instance #1
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
nvram (driver not attached)
idprom (driver not attached)
fru (driver not attached)
fru (driver not attached)
i2c, instance #0
temperature, instance #0
temperature, instance #1
temperature, instance #2
ioexp, instance #0
ioexp, instance #1
ioexp, instance #2
temperature, instance #3
ioexp, instance #3
ioexp, instance #4
ioexp, instance #0
ioexp, instance #1
temperature-sensor, instance #0
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
fru (driver not attached)
rscrtc (driver not attached)
rtc, instance #0
gpio (driver not attached)
pmc (driver not attached)
rsc-control (driver not attached)
rsc-console (driver not attached)
serial, instance #0
usb, instance #0
network, instance #0
pci, instance #3
network, instance #1
SUNW,qlc, instance #0
fp (driver not attached)
disk (driver not attached)
fp, instance #0
ssd, instance #2
ssd, instance #1
pseudo, instance #0
Setting the system date and time is fairly easy on solaris. Because you can easily set the time from the command line, you can set the time on a server remotely.
date mmddhhmmyy
The date command takes the syntax mmddhhmmyy, or “month day hour minute year”. You have to be superuser to set the time.
Example:
# date 1201010106
Fri Dec 1 01:01:00 PST 2006
Setting the default route on Solaris is easy. If you are trying to just set the route temporarily you can use the route command:
route add default <ipaddress>
Example:
route add default 192.168.1.1
If you want the route to be persisted when you reboot the system, you will need to set the route in the /etc/defaultrouter file.
/etc/defaultrouter
Example:
echo 192.168.1.1 > /etc/defaultrouter
Note that Solaris 10 includes “zones” that can also configure this same behavior. There will be more articles covering this in the future.
Solaris is usually used as a server operating system. Because of this, you want to make sure that you shut the system down as gracefully as possible to ensure there isn’t any data loss.
For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.
Shutdown
You have more than one command option that you can use. The best command is this, executed as root:
shutdown -y -i5 -g0
This will immediately shut the system down. You can also use the older command that still works:
sync;sync;init 5
You can even use:
poweroff
Reboot
If you are trying to reboot the system as opposed to turning it off, you could use:
shutdown -y -i6 -g0
Or:
sync;sync;init 6
Or even:
reboot
So many commands to do the same thing… almost seems silly.