Monday, 11 February 2008

SERIVE MANAGEMENT FECILITY

 

 

SERVICE MANAGEMENT FACILITY

                                                SMF

 

The Service Management facility is a new centralized configuration and management facility for administering  the SERVICES in the SOLARIS 10. The service definition is Solaris as follows:

 

The Service is an entity which provides a resource or a list of capabilities to applications and other services, both local and remote.

A service can also be a be the software state of a device, such as a NIC or a file system

 

There can be more than one occurrence of a service running, like Virtual interface of a NIC or multiple file systems

 

The SMF includes:

 

·        Information on procedures to start stop and restart  services

·        A centralized repository for information on startup behaviour and service status

·        A  mechanism to establish the dependency between services

·        A structured mechanism of fault management of services

·        Information regarding the faulted services including misconfigured

·        Individual logs for the each service                                                

 

The Service categories:                                                                                      

 

  • Application   ( Any 3Rd Party Apps can be controlled under this)
  • Device         ( Device configured  in the OS )
  • Legacy         (The Pre Solaris 10 Services )
  • Milestone     (The OS state  ie., single user/Multi user)
  • Network       ( The NIC including virtual)
  • Platform       (The Dynamic Reconfiguration etc)
  • Site              (The Site Specific)      
  • System        ( Solaris Services)

 

 

 

 

The Service Stated

 

The state of each service is one of the following:

 

degraded –The service instance is enabled, but is running at a limited capacity

 

disabled –The service instance is not enabled and is not running.

legacy_run –The legacy service is not managed by SMF, but the service can be observed, mostly they are pre Solaris 10 Services

 

maintenance –The service instance has encountered an error that must be resolved y the administrator.

 

offline –The service instance is enabled, but he service is not yet running

or available to run.

 

online –The service instance is enabled and has successfully started.

uninitialized –This state is the initial state for all services before their configuration has been read.

 

SMF commands

 

·  svcs : report the status of service instances

·  svcadm : manipulate services instances (eg. enable, disable, restart,.)

·  svccfg : manipulate the repository (eg. import, export, configure service)

·  svcprop : display properties for a given service instance

·  inetadm : report and configure inetd based services

·  inetconv : convert and import services from inetd.conf

 

Service Management: User can add, delete or modify services. Service Operator: User can request state changes of any service instance, such as restart and refresh.

 

How To:

 

  • svcs -l -shows the status of the rlogin service (detailed view) 

network/login:rlogin

 

  • svcs -a -shows the status of all services

 

 

 

 

 

 

  • svcs -p  -the "-p" option shows all the processes associated with a service

network/smtp:sendmail

 

  • inetadm -shows the status of all services controlled by inetd

 

  • svcs -D -shows the service instances that are dependend on the multi-user milestone milestone/multi-user

 

  • svcs -d milestone/multi-user:default

-shows the service instances that the multi-user milestone is dependent  on

 

  • svcadm disable network/login:rlogin

     -disables the rlogin service

 

  • svcadm disable -t network/login:rlogin

     -disables temporarly (until the next reboot) the rlogin service

 

  • svcadm enable network/login:rlogin

     -enables the rlogin service

 

  • svcadm enable -rt rpc/bind

     -enables rpcbind. The -t option starts the service in temporary mode   

      which does not change the service repository. The repository is not  

      writable in ingle-user mode.The -r option recursively starts all the  

      dependencies of the named service.

 

  • svcadm restart network/login:rlogin

     -restarts the rlogin service

 

  • svcadm refresh network/login:rlogin

-reloads service configuration and run the refresh method (if any)

 

  • svcadm clear network/login:rlogin

-marks service as repaired

 

  • svcs -xv

-request information about the hung service.

 

  • scadm milestone -d milestone/single-user:default

-change the run-level.

The "-d" option indicates that the default milestone should be set to the named FMRI. Without "-d", "svcadm milestone" transitions the system to the named milestone immediately.

 

 

 

  • svcprop restarter | grep milestone

-check to see what the default milestone is set to for your system

 

Key files, directories and filesystems

 

  • /var/svc/manifest/*
  • /lib/svc/method/*
  • /var/svc/log/*
  • /var/svc/profile/*
  • /etc/svc/repository.db (global configuration database)
  • /lib/svc/see/global.db (minimal configuration database)
  • /etc/svc/volatile (Contains transient data, eg. lock files, init state and some log files allocated from swap)
  • /system/contracts (Primary interface into contract subsystem, to allow service instances to be restarted.Indirectly related to SMF)

 

Although fewer messages are printed, SMF has made the boot process more observable. Each service as a log file in the /var/svc/log directory (or the /etc/svc/volatile directory, for services started before the single-user milestone) indicating when and how it was started, whether it started successfully, and any messages it may have printed during its initialization.

Saturday, 9 February 2008

SUN NVRAM Reference

DISPLAY  NVRAM PARAMETERS• 
.version: display the version of the PROM
• .speed: display the cpu and bus speed
• banner: display the power on banner message
• boot -a -h -s -v -x:
• devalias: identify all current device aliases
• eject-floppy: eject a floppy diskette
• firmware-revision: identifies the firmware version
• password: set PROM password
• printenv: display all current parameters
• probe-fcal: identify all fiber devices attached to the i/o bus
• probe-scsi-all: identify all scsi devices attached to the i/o bus
• reset-all: recycle the system
• setenv : set a value for a parameter
• set-default : reset the value of a parameter to is mfgr default state
• set-default: reset all parameters to mfgr default states
• show-disks: identifys all disk controllers attached to the system
• show-post-results: display POST results
• sifting: search obp commands for text string
• synch: write all file system changes to disk
• test-all:execute a device's self-test procedure
• watch-net-all: identify all network devices attached to the system

 BOOT NET. boot net:rarp - use rarp to find boot server
• boot net:dhcp - use dhcp to find boot server
• boot cdrom -F wanboot – install -install client over WAN
• boot net:speed=100,duplex=full - set network speed and duplex options

NVRAM Prameters from EEPROM from OS
• auto-boot?: if true, boot automatically after POST. (true)
• boot-command: command to execute if auto-boot? is true. (boot)
• boot-device: device to use for booting (disk net)
• boot-file: file to boot (empty string)
• diag-device: diagnostic boot source (net)
• diag-file: file from which to boot in diagnostic more (empty string)
• dial-level: Level of diagnostics to run (min or max)
• diag-switch?: If true, run in diagnostic mode
• input-device: input device to use (keyboard)
• keymap: keyboad map for custom keyboard (no default)
• nvramrc: NVRAM startup script (empty string)
• oem-banner: Custom OEM banner (empty string)
• oem-banner?: If true, use custom OEM banner (false)
• output-device: Output device to use (screen)
• sbus-probe-list: Identifies which sbus slots are probed & in what order  
  (01)
• scsi-initiator-id: SCSI bus address of host adapter (7)
• security-mode: Firmware security level (none  command  full)
• security-password: Firmware security password (none)
• use-nvramrc?: If true, execute commands in NVRAMRC during startup 
  sequence (false)
• watchdog-reboot?: If true, reboot after watchdog reset (false)

NVRAMRC NVRAM Editornvalias alias - Store the command "devalias alias device-path"  
   in NVRAMRC. The alias persists   until the nvunalias or set-defaults commands 
   are executed.
• nvedit -Enter the NVRAMRC editor. If data remains in the temporary buffer from 
  a previous  nvedit session, resume editing those previous ontents. If not,read 
  the contents of NVRAMRC   into the temporary buffer and begin editing them.
• nvquit -Discard the contents of the temporary buffer,without writing it to  
  NVRAMRC   prompt for confirmation.
• nvrecover -Recover the contents of NVRAMRC if they have been lost as a 
  result of the execution of set-defaults; then enter the editor as with nvedit.  
  nvrecover fails if nvedit is executed between the time that the NVRAMRC  
  contents were lost and the time that nvrecover is executed.
• nvrun -Execute the contents of the temporary buffer.
• nvstore -Copy the contents of the temporary buffer to NVRAMRC; discard the  
   contents of the temporary buffer.
• nvunalias alias - Delete the corresponding alias from NVRAMRC. Must reset  
  system.

 nvedit Editor Keystroke Commands• Control-B -Move backward one character.
• Control-C -Exit the editor and return to the OpenBoot command interpreter. The 
   temporary  buffer is preserved but is not written back to NVRAMRC. (Use 
   nvstore afterwards to write back the temporary buffer.)
• Control-F - Move forward one character.
• Control-K -If at the end of a line, join the next line to the current line (that
  is, delete the new line).
• Control-L - List all lines.
• Control-N -Move to the next line of the NVRAMRC editing buffer.
• Control-O - Insert a new line at the cursor position and stay on the current line.
• Control-P -Move to the previous line of the NVRAMRC editing buffer.
• [Delete] -Delete the previous character.
• [Return] - Insert a new line at the cursor position and advance to the next line.

Activating nvram• ok> nvedit

• Type Control-C to get out of the editor and back to the ok prompt.
• nvstore
• setenv use-nvramrc? true
• reset

Monday, 27 August 2007

Today I have started by Blog.

Contributors