Solaris Notes

Boot Up/Shutdown

init 0 - power down
init S - single user, all file systems mounted
init s - single user, all file systems mounted
init 1 - administrative state, all file systems mounted, logins allowed
init 2 - multi user, all daemons running except nfs - exports not allowed
init 3 - multi user
init 4 - alternative multi user - unused
init 5 - power down - shutdown and automatically power off if supported
init 6 - reboot

PROM Prompt (ok)

Bootup Files

Bootup Commands


Shutdown Commands

SPARC Boot Process
IA Boot Process

IA Boot Menus

Console

Using tip (the serial port is connected to another Sun server)

Crontab

See unix.html for crontab basics.

Note:  Solaris defaults to ed when using crontab -e, unless the $EDITOR variable is set to something else, like vi.

ksh  -->  export EDITOR=vi

sh  -->   EDITOR=vi
              export EDITOR

See UNIX notes for safely editing crontabs.

Devices

devfsadm  -->  manages special files in /dev and /devices  (boot -r no longer required)

Process to add new hardware:
devinfo  -->  prints information about disk devices.

Mounting a cdrom:
Manually unmounting a cdrom:

Log Files

Directory for log files:  /var/adm, /var/log
messages  --> system messages
syslog  --> default is mail log

/usr/sbin/dmesg  --> obsolete command, can still display boot messages

/etc/cron.d/logchecker --> rotates /var/cron/log to /var/cron/olog when $LIMIT is reached

/etc/default/cron  --> configuration file for cron

Process to enable /var/adm/loginlog to monitor failed login attempts after minimum allowed (default = 5)
Process to enable /var/log/authlog to monitor authentication related events

Network Info

/etc/defaultrouter   --> contains ip address of default router
/etc/inet/netmasks  -->  contains subnet masks for each subnet connected
/etc/nodename  --> contains hostname of server
/etc/hostname.<interface>  -->  contains hostname of server for that interface

Configuring an interface from the command line:
Configuring a second IP address for an existing interface


OSI Stack

Check to see if it is running:
ps -ef|grep osi

server:/> ps -ef|grep osi
    root 17495 17484  0 13:30:42 pts/3    0:00 grep osi
    root  5443  5442  0   Sep 03 ?        0:00 /usr/sbin/osilogd
    root  5442     1  0   Sep 03 ?        0:00 /usr/sbin/osinetd


Starting/Stopping
/etc/rc2.d/S90osinet stop
/etc/rc2.d/S90osinet start


Processes

ps -e
ps -el
kill
kill -9

/usr/proc/bin  --> process analysis utilities are located here
priocntl  --> priority control
nice  -->  sets the priority
renice --> changes the priority
pgrep --> shows active processes
pkill  --> kills active processes
pkill -HUP  --> kills and restarts the process
smpatch --> CLI for Solaris Patch Manager Tool

prstat  --> lists processes and % cpu time, continuously like "top"
prstat -n 5 1 1  --> shows top 5 processes using the cpu and only prints out 1 set of statistics, not continuous.

truss <command>  --> traces the execution of a command

Root Password - Lost


Software/Patches

Software Packages

Solaris Flash Technology


patchadd -p  --> lists patches on the system
showrev -p --> lists patches on the system

install_mu - script to install maintenance update using patchadd

Get patches from:  http://www.sun.com/sunsolve/patches

Swap Space

/usr/sbin/swap -l   --> lists swap space

swap -s  -->  shows swap space usage

How to add more swap space


System Information

cat /etc/release  <-- shows version of Solaris and the type of hardware such as SPARC

eeprom  -->  displays and allows the administrator to alter the contents of the eeprom configuration variables

uname -X  -->  display os version, kernel id, number of processors and type of machine

prtconf   --> prints system configuration

prtconf -vp| grep banner-name:  --> prints model of server

prtconf -vp| grep Memory  --> prints amount of memory

dmesg -->  collects system error messages

psrinfo  --> prints information about processors
psrinfo -v | grep MHz   -->  prints speed of each processor

sysdef -->  prints current system definition in table form
sysdef -i

modinfo  --> displays information about loaded kernel modules

/usr/platform/`uname -i`/sbin/prtdiag  -->  displays system diagnostic information

isainfo -v   --> displays whether the kernel supports 32 bit or 64/32 bit architecture (64 bit kernel is available on Solaris 7 and up)

Local Hard Disk Info
format:
       0. c0t10d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
          /sbus@3,0/SUNW,fas@3,8800000/sd@a,0
       1. c0t11d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
          /sbus@3,0/SUNW,fas@3,8800000/sd@b,0
       2. c3t5d1 <Symbios-StorEdgeA3500FCd-0301 cyl 8615 alt 2 hd 64 sec 64>    <-- NOT Local, but on an external A3500FC array
          /pseudo/rdnexus@3/rdriver@5,1
       3. c3t5d3 <Symbios-StorEdgeA3500FCd-0301 cyl 8615 alt 2 hd 64 sec 64>
          /pseudo/rdnexus@3/rdriver@5,3

 cfgadm -alv


SunOS to Solaris Mapping:
SunOS
Solaris

1.0
5.0
2.0
5.1
2.1
5.2
2.2
5.3
2.3
5.4
2.4
5.5
2.5
5.5.1
2.5.1
5.6
2.6
5.7
7
5.8
8

9


Tuning/Kernel Parameters


/etc/system

Resources

http://www.wright.edu/~mike.corcoran/htmldocs/systems/solaris/-CIPCZQX01aa9e9de1=02002b0214a8858100000000