![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Initialization and Shutdown | ||||||||||
Home | SCJP | SCWCD | SCEA | SCSA | ||||||||||
Match the Solaris run levels to their intended functions The Solaris O.S uses run levels to describe certain states of the overall m/c. An admin must be aware of the functionality provided at each level to ensure that the system runs smoothly |
||||||||||
-------------------------------------------------------------------------------------------------------- Run Level State Functionality -------------------------------------------------------------------------------------------------------- 0-------------------Power-down --------------Safe to turn off power to the system 1-------------------Admin Single user ------All available f.s with no user logins allowed. For admin tasks. 2-------------------Multiuser------------------Multiple users can access sys and f.s. except NFS and syslog. 3-------------------Multiuser w/NFS----------Multiple users with NFS resource sharing available. 4-------------------Alternative Multiuser---This level is currently unavailable. 5-------------------Power-down---------------Shutdown system and auto turn off system power. 6-------------------Reboot---------------------Shutdown and then reboot to multiuser state (def inittab file) S,s-----------------Single-User---------------Single user mode with all f.s mounted and accessible. ----------------------------------------------------------------------------------------------------------------------------- =============================================================================== State the fn of the following files or dir and the relationships bet them: /etc/initab, /etc/init.d, /etc/rc# (where # falls in the range of 0 to 6, or S), or /etc/rc#.d /etc/inittab = contains info about actions to occur at each system run level and is read by the init process. The 3 items it defines are: 1. Default run level 2. A list of processes to start/restart and monitor 3. What to do when a new run level is started The lines of the inittab file look like: id:rstate:action:process s6:6:wait:/sbin/rc6 >/dev/msglog 2<>/dev/msglog </dev/console fw:0:wait:/sbin/uadmin 2 0 >/dev/msglog 2<>/dev/msglog </dev/console sc:234:respawn:/usr/lib/saf/sac -t 300 co:234:respawn:/usr/lib/saf/ttymon -g -h -p "'uname -n ` console login: " -T sun -d /dev/console -l console -m ldterm, ttcompat where id is 4 character identifier, rstate is the run level for the line to apply to action is how the process will execute, and process is what gets executed. Some action keyworkds: initdefault: specifies the default runlevel sysinit: causes the line to execute and wait for completion before the file continues and before the console prompt appears wait: also causes the line to execute before the script continues resa\pawn: will start or restart processes as needed, or take no action if they don't exist powerfail: executes the specified process if the powerfail signal is received Message from scripts run from this file are saved to the /dev/msglog file. |
||||||||||
![]() |
||||||||||