DevOps

Thursday, 30 September 2010

BOOT PROCESS

THE BOOT PROCESS:
The boot process goes through following phases
1. Boot prom phase
2. Boot program phase
3. Kernel initialization phase
4. Init initialization phase
PROM runs self test diagnostics
Ok printenv boot-device
Boot PROM ok boot (reads disk label from 0sector)
Phase
Reads boot block from 1-15 sectors
PROM loads boot block (i.e. boot block program)
Boot block program loads boot program (ufsboot)
Boot Program
Phase the ufs boot program loads the 32-bit or 64-bit kernel
Loads kernel modules
Kernel init reads/etc/system file
Phase
Kernel initializes itself and starts init process
Init init process starts the run control scripts

Boot strapping is the process that a computer to load and execute the bootable operating system. The instructions for the boot strapping procedure are stored in boot prom

Boot Prom Phase
After you turn on power to the system the PROM displays the system identification number and runs self test diagnostics to verify the system hardware and memory It displays banner the model type, keyboard type, PROM version, release, RAM, PROM serial number, Ethernet address and hosted
It reads disk label from 0 sector on the default boot device and finds boot program
It loads primary boot program called boot block from 1-15 sectors.

Boot Program Phase
The bootblock program finds end executes the secondary boot program called UFSboot from the ufs file system and loads it in to memory.
After the UFSboot program is loaded it loads the kernel and it has two parts
On a 64-bit system
The platform specific kernel is /plarform/’uname-m’/kernal/sparcv9/unix
The generic kernel is /platform/’uname-‘/kernel/sparcv9/genunix
Kernel Initialization Phase
The kernel initializes itself and begins loading modules using the /platform/’uname -’/ufsboot program to read the files. When the kernel is loaded enough modules to mount the root file system it unmaps the ufsboot and continues using its own resources.
The kernel starts unix operating system, mounts the necessary root file systems,
reads/etc/system file and starts the 1st process which is init

Init Initialization
The kernel creates a user process and starts the /sbin/init process which starts the other processes by reading the /etc/inittab file
The /sbin/init process starts the run-control scripts, which executes the series of
other scripts. These scripts/sbin/rc* check and mounts file systems, starts various processes
To customize the /etc/system file
The number of configurable pseudo-ttys
set pt_cnt=100
set npty=100
pt_cnt defines the number of configurable pseudo-ttys (default 48)
npty creates BSD version devices
PRINTER MANAGEMENT
Printers are divided into
1. Local printer
2. Remote printer
3. Network printer
Local & remote printers are dependent on operating system. Network printers O/S independent
The location where the printer files are stored
/usr/bin This directory contains the LP print service user commands
/usr/sbin This directory contains the LP print service administrator commands
/usr/share/lib/terminfo This directory contains term info database such as printers and terminals
/usr/lib/lp This directory contains the LP print service daemons, binary files and default printer interface programs
/usr/lib/lb/model This directory contains the default interface programs called standard or net standard
/var/spool/lp/requests contains print requests
/var/spool/lp/logs contains printer log files

PROCESS MANAGEMENT
To list all currently active process on the local system
# ps
List process identifier (PID)
The terminal from which the command was executed (TTY)
The cpu time consumed by the process (TIME)
The actual command that was executed (CMD)
To produce a process list with full details
# ps –Af
To obtain information about processes bening executed by a particular group of users
# ps -g 0
FUSER
Before unmounting the file system the file system must not be busy A file system is considered busy if a user is accessing the file system,, or a program file is open in that file system
If something causing the file system to be busy you can use the fuser command.
The following command uses fuser to find out why the file system is busy
# fuser –u /export/home
To check which users are accessing a particular file system
# fuser –c /export/home
To give a list of user id’s associated with each process
# fuser -c -u /export/home
The system displays the process and user login names that is using the file system
# wall
attention for all users the file system /export/home is going down for maintenace mode at 6.p.m please kill all the process accessing this file system or I will
press contrl d
You can kill all processes that are still active
# fuser –c -k /export/home
PRSTAT
Executed from the command line to display information about active processes
# prtstat –a ( Displays separate reports about processes and users at the same time)
-c (Continuously prints new reports beneath previous reports instead of overwriting them )
-n ( Reports the number of output lines
-p ( Reports only processes that have a PID in the given list )
-u ( Reports only processes whose uid is given in the list )
-t ( Reports total usage summary for each user )
The following example uses the prstst command to view the four most active root processes running
# prstat –u root –n 4 5 6
4 to restrict the output to the top four processes
5 repeates the command five times
6 in 6 sec intervals


No comments:

Post a Comment