샤브의 블로그 RSS 태그 관리 글쓰기 방명록
Device & Language (105)
2010-09-03 02:02:04

Service Management Facility

1. SMF 특징(SMF Features)

가. (Legacy 스크립트) SMF 서비스(새로운 서비스 관리 방식)와 Legacy Run Control스크립트 (이전 서비스 관리 방식, SMF 서비스에 의해 관리 되지 않는다.)를 둘 다 사용할 수 있다.

나. (서비스 restart) 서비스의 의존성 순서를 점검하고, 자동으로 실패한 서비스를 restart 한다.

# svcs -a | grep sendmail/* sendmail 서비스 online 상태 */

# pgrep -lf sendmail /* 정상적으로 데몬이 떠 있는 상태 */

# pkill -9 sendmail /* sendmail 데몬을 강제 종료 */

# pgrep -lf sendmail /* 데몬 restart */

다. (SMF 서비스 관리에 대해) svcadm 명령어를 통해 disable/enable 할 수 있으며, 이런 경우 영구적으로 설정 된다. -t 옵션으로 현재만 서비스의 상태를 disable/enable 할 수 있다

라. (부팅시의 메시지) 부팅할 때 콘솔 출력 메시지를 자세하게 보여주지 않는다.

마. (서비스 설정 저장소) service configuration repository는 서비스마다 snapshot 설정을 유지하며, 최근에 성공했던 snapshot 설정으로 돌리는 것이 가능하다.

바. (서비스 설정 snapshot) 서비스 설정에 대한 자동 snapshot 기능에 의해 서비스 설정에 대한 쉬운 백업, 복구, 이전 상태로 변경할 수 있다.

사. (서비스 의존성 관계) 서비스간의 의존성 관계의 정의 때문에, 서비스간의 이상 관계를 쉽게 발견할 수 있도록 해 주거나, 서비스를 병렬적으로 수행할 수 있도록 해 준다. 그래서 부팅이 빨라졌다.

 

2. SMF 아키텍처(SMF Architecture)

- SMF 구성 요소(Main components of SMF)

● 서비스 추상화(Service abstraction)

● 서비스 저장소(Repository of service information, (예) /etc/svc/repository.db)

● 저장소 관리 데몬(Daemon to access the repository, svc.configd)

● 저장소 접근 API(APIs for access to the repository)

● 메인 재시작 데몬(Master restarter daemon, svc.startd)

● 위임된 재시작 데몬(Delegated restarters, (예) inetd)

● 명령행 툴(Command line tools, (예) svcs, svcadm, svccfg)

 

3. SMF 서비스(SMF Services)

가. 서비스의 종류(Categories of Service)

milestone (런레벨)

system (시스템)

network (네트워크)

application (응용프로그램)

legacy (이전 방식)

● device (디바이스)

● site (사이트)

● platform (플랫폼)

[참고] svcadm milestone

# svcadm milestone single-user(런레벨 1)

# svcadm milestone multi-user (런레벨 2)

# svcadm milestone multi-user-server (런레벨 3, text)

# svcadm milestone all (런레벨 3, GUI)

 

# svcadm milestone -d single-user ; reboot (런레벨 1)

# svcadm milestone -d multi-user ; reboot (런레벨 2)

# svcadm milestone -d multi-user-server ; reboot (런레벨 3, text)

# svcadm milestone -d all ; reboot (런레벨 3, GUI)

 

[EX] GUI / TEXT Mode 전환

(On Linux : GUI / TEXT Mode 전환 : Runleve 3 <-> Runlevel 5)

# svcadm milestone -d multi-user-server

# svcadm milestone multi-user-server

 

# svcadm milestone -d all

# svcadm milestone all

나. 서비스 URI문법

FMRI(Fault Managed Resource ID)

(FMRI EX1) svc:/network/http:apache2

● svc SMF에 의해 관리되는 서비스 prefix, SMF에 의해 관리 함

/network/http Service Name (network: Service Type, http: Service Name)

apache2 Instance Name

 

(FMRI EX2) lrc:/etc/rc3_d/S90samba

● lrc prefix lrc(Legacy Run Control), SMF에 의해 관리 되지 않음

● /etc/rc3_d /etc/rc3.d 디렉토리

● S90samba S90samba 스크립트

- 다음의 FMRI 형식은 모두 같은 의미이다.

● svc:/system/console-login:default

● svc://localhost/system/console-login:default

● system/console-login:default

● console-login:default

● console-login

- vold 데몬 관리 예

# svcadm disable svc:/system/filesystem/volfs:default

= svcadm disable system/filesystem/volfs:default

= svcadm disable filesystem/volfs:default

= svcadm disable volfs:default

= svcadm disable volfs

다. 서비스 상태

- Disabled -> (Offline -> Maintenance) -> Online

Uninitialized

모든 인스턴스가 초기화 되지 않은 상태, 서비스의 구성정보가 아직 로드 되지 않았으며, 아직 구동되지 않은 상태를 의미 한다.

Offline

해당서비스 인스턴스는 활성화 되었으나 구동되지 않은 상태, 인스턴스가 시작 메소드(실행 메소드, Method) 동안에 발생한 에러 또는 의존성 문제로 발생된 상태를 의미한다.

Online

해당 서비스가 활성화 되었으며, 성공적으로 구동되어진 상태이다.

Disabled

해당 서비스가 관리자에 의해 비활성화 되거나 서비스 인스턴스의 구성 데이터에 disable로 표시된 경우.

Degraded

서비스는 활성화 되었으나, 일부 실패들로 인한 제한적으로 구동되어 있는 상태이다

Maintenance

서비스 인스턴스는 관리자에 의해서만 해결이 가능한 에러를 만난 경우의 상태이다. 이 상태는 서비스가 불가능하고, 관리적 활성화 또는 관리자에 의한 직접적인 관리 요구를 필요로 한다. (# svcs -xv, Web page, Log)

라. 서비스 구성요소

/etc/svc

repository.db(svc.configd) <----- svc.startd ----- /var/svc/profile, /var/svc/manifest

 

generic.xml

(예) ftp.xml

1) svc.startd Daemon

- 시스템의 서비스를 책임지는 Daemon. Master Daemon 이라고도 한다.

2) /etc/svc/repository.db

- 서비스의 정보를 담고 있는 파일. 부팅 할 때 이 파일의 내용을 가지고 서비스를 실행한다.

- /lib/svc/seed/global.db 파일은 비어있는 파일이다.

- Solaris를 설치할 때 global.db 파일을 repository.db 파일로 복사한다. 

[참고] 부팅하는 과정에서 repository.db 파일 이상

[문제] 부팅하는 과정중 에러 메세지

svc.configd: Fatal error: /etc/svc/repository.db: unable to open database /etc/svc/repository.db

Requesting System Maintenance Mode

svc.configd exited with status 102 (database initialization failure)

Root password for system maint

enance (control-d to bypass): (관리자 암호 입력)

single-user privilege assigned to /dev/console

Entering system Maintenance Mode

#

 

부팅시에 위와 같은 에러가 발생하게 된다면 아래와 같은 3가지 방법을 통해 해결이 가능하다.

 

[해결1]

# mount -o remount,rw /

# cp /lib/svc/seed/global.db /etc/svc/repository.db

# reboot

 

[해결2]

# /lib/svc/bin/restore_repository

......

Enter response [boot]: -seed-

 

[해결3]

ok boot -m seed

3) SMF Profile & SMF Manifest

가) SMF Profile

(1) 시스템이 부팅될 때 활성화 되는 서비스 인스턴스들의 목록

(2) 부팅될 때 사용 되는 파일은 아니다. 부팅될 때는/etc/svc/repository.db 파일을 사용

(3) 초기 repository.db 파일의 서비스 목록과 부팅시 활성화할 목록을 만들때 사용

(4) repository.db에 로딩하기 위해서는 다음과 같이 사용할 수 있다.

(예) # svccfg apply /var/svc/profile/generic.xml

(5) SMF Profile은 /var/svc/profile/generic.xml파일이다.

- 이 파일은 generic_open.xml or generic_limited_net.xml 파일에 심볼릭 링크 걸려 있다.

- generic_open.xml 파일을 사용하면 일반적인 원격 서비스는 모두 enable

- generic_limited_net.xml 파일을 사용하면 ssh 서비스를 제외한 원격서비스는 disable

나) SMF Manifests

(1) XML 형식의 파일로 구성된 서비스 또는 서비스 인스턴스의 관계 설정 파일로 Property의 집합으로 구성된다.

(2) 서비스에 대한 서비스명, 서비스 start/stop Method, 또는 여러 가지 목록이다.

(3) 모든 Manifest는 /var/svc/manifest directory에 위치하고, 이 directory의 로컬 그룹 서비스의 서브디렉토리들을 포함할 수 있다.

4) /var/svc/log Directory

가) /var/svc/log -> SMF log file 존재(누적 로그 기록)

나) 부팅시에 Service Instance 실행시 에러가 있는지 확인

# egrep -l '(ERROR|WARNING)' /var/svc/log/*

마. SMF 서비스 관리(SMF Service Management)

1) inetd Daemon

가) inetd Daemon은 SMF의 일부로 동작한다. (svc:/network/inetd:default)

나) network/inetd:defualt는 svc.startd에 의해서 동작하는 서비스 인스턴스이다.

다) inetd Daemon은 더 이상 /etc/inetd.conf 파일을 읽지 않는다.

2) svcs CMD

명령어 형식

# svcs (-> disable 되어진 서비스는 출력되지 않음)

# svcs -a (svcs -a | grep telnet, svcs telnet)

# svcs -l svc:/system/filesystem/minimal:default (svcs -l minimal)

# svcs -p "*nfs*" (-p : process)

# svcs -d /system/filesystem/minimal:default (-d : dependency)

# svcs -D /system/filesystem/minimal:default

# svcs -xv (svcs -x, svcs -xv)

옵션

-a 모든 인스턴스 출력(활성화/비활성화), 상태와 시간으로 정렬

-x 에러와 상태를 출력, 장애 처리에 활용(부팅시 에러 출력)

-d 현재 서비스가 의존하는 서비스 정보 출력

-D 현재 서비스에 의존적인 서비스 정보 출력

-p 프로세스 정보 출력

-v 상세 정보 출력

-l 특정 서비스 목록 정보 출력

가) 서비스 전체 목록 확인

# svcs

- disable 된 서비스는 확인 안됨

legacy_run 23:19:24 lrc:/etc/rc2_d/S81dodatadm_udaplt

legacy_run 23:19:24 lrc:/etc/rc2_d/S05vmware-tools

..... (중략) .....

online 23:17:16 svc:/system/svc/restarter:default

online 23:17:20 svc:/network/pfil:default

online 23:17:20 svc:/network/tnctl:default

..... (이하생략) .....

# svcs -a

- disable 된 서비스도 확인 가능

legacy_run 23:19:24 lrc:/etc/rc2_d/S70uucp

..... (생략) .....

disabled 23:17:18 svc:/network/rpc/keyserv:default

disabled 23:17:18 svc:/network/winbind:default

..... (생략) .....

online 23:18:38 svc:/system/coreadm:default

online 23:18:38 svc:/system/resource-mgmt:default

online 23:19:29 svc:/system/basicreg:default

online 23:19:45 svc:/system/boot-archive-update:default

offline 23:17:18 svc:/system/console-login:default

나) svcs 명령어의 -p 옵션을 통해 process 정보 확인

# svcs -p "*nfs*" (# svcs -p *nfs*)

STATE

online

online

STIME

23:18:59

23:18:59

23:18:59

23:18:59

FMRI

svc:/network/nfs/status:default

412 statd

svc:/network/nfs/cbd:default

417 nfs4cbd

→ (# svcs -a | grep nfs) + # pgrep -lf nfs

다) svcs 명령어 통한 서비스간의 의존성 관계 확인

- minimal 서비스는 Service1이 online 되어 있어야만 동작을 하는(online 상태) 서비스라면, minimal 서비스는 Service1의존적인(Dependency) 서비스라고 표현하고, svcs 명령어에 -d 옵션을 통해서 확인이 가능하다.

- minimal 서비스가 online 상태로 되어 있어야만 Service2 서비스가 동작(online 상태)하는 서비스라면, Service2 서비스는 minimal의존적인 서비스라고 표현하고, svcs 명령어에 -D 옵션을 통해서 확인이 가능하다.

Service1

filesyste/minimal:default

Service2

-d

-D

# svcs -d minimal

STATE

online

online

STIME

23:18:31

23:18:37

FMRI

svc:/system/filesystem/usr:default

svc:/system/device/local:default

# svcs -D minimal

STATE

disabled

disabled

disabled

disabled

disabled

disabled

online

online

online

online

online

online

offline

STIME

23:17:17

23:17:17

23:17:17

23:17:18

23:17:18

23:17:18

23:18:59

23:18:59

23:18:59

23:18:59

23:19:11

23:19:15

23:17:18

FMRI

svc:/network/nis/client:default

svc:/network/dns/client:default

svc:/network/nis/server:default

svc:/network/ldap/client:default

svc:/system/mdmonitor:default

svc:/system/pools:default

svc:/network/nfs/cbd:default

svc:/system/sysidtool:system

svc:/network/nfs/nlockmgr:default

svc:/network/nfs/mapid:default

svc:/application/management/snmpdx:default

svc:/system/fmd:default

svc:/system/console-login:default

# svcs -l minimal

fmri

name

enabled

next_state

state_time

alt_logfile

restarter

dependency

dependency

svc:/system/filesystem/minimal:default

minimal file system mounts

true

none

Wed Oct 08 23:18:37 2008

/etc/svc/volatile/system-filesystem-minimal:default.log

svc:/system/svc/restarter:default

require_all/none svc:/system/filesystem/usr (online)

require_all/none svc:/system/device/local (online)

라) svcs 명령어를 통해 부팅시의 에러 메시지 확인

# svcs -x

svc:/application/print/server:default (LP print server)

State: disabled since Fri Dec 05 15:05:05 2008

Reason: Disabled by an administrator.

See: http://sun.com/msg/SMF-8000-05

See: lpsched(1M)

Impact: 2 dependent services are not running. (Use -v for list.)

# svcs -xv

svc:/application/print/server:default (LP print server)

State: disabled since Fri Dec 05 15:05:05 2008

Reason: Disabled by an administrator.

See: http://sun.com/msg/SMF-8000-05

See: man -M /usr/share/man -s 1M lpsched

Impact: 2 dependent services are not running:

svc:/application/print/rfc1179:default

svc:/application/print/ipp-listener:default


출처 : 광수의 작은세상(http://blog.daum.net/oh0625/7502876)

'Device & Language > Solaris 10' 카테고리의 다른 글

useradd – administer a new user login on the system  (0) 2010.09.03
속성  (0) 2010.09.03
Hardware Diagnostics for Sun Systems  (0) 2010.09.01
manpages section 1M: System Administration Commands  (0) 2010.09.01
솔10 svcadm  (0) 2010.09.01
2010-09-02 09:14:48
http://www.allimant.org/javadoc/index.php


Document Format Last update File size Download links
J2SE 7 Preview documentation  HTMLHelp Jun. 23,2009 57 Mb Link
J2SE 6 documentation  HTMLHelp Jun. 23,2008 54 Mb Link
J2SE 5.0 Documentation  HTMLHelp Oct. 10,2004 41 Mb Link
J2SE 1.4.2 Documentation  HTMLHelp Jul. 3,2003 34 Mb Link
JDK 1.3.1 Documentation  HTMLHelp Mar. 7,2002 23 Mb Link
JDK 1.1.8 Documentation  WinHelp Apr. 16,1999 2.6 Mb Link
The Java Tutorial (March 14, 2008 edition)  HTMLHelp Jun. 23,2008 11.6 Mb Link
Java Enterprise Edition 5 API Documentation  HTMLHelp Feb. 7,2007 5.1 Mb Link
The Java Enterprise Edition 5 Tutorial  HTMLHelp Feb. 6,2007 6.9 Mb Link
Java 2 Enterprise Edition 6 API Documentation and Tutorial NEW !  HTMLHelp Jan. 7,2010 8 Mb Link

'Device & Language > Java' 카테고리의 다른 글

Java 언어의 특징  (0) 2010.09.06
% 연산자 음수 적용시  (0) 2010.09.06
jsp 2.0 spec  (0) 2010.09.01
jstl 1.0 spec  (0) 2010.09.01
servlet 2.4 spec  (0) 2010.09.01
2010-09-02 01:01:12
넥서스 원에 있는 트위터 어플이 깔끔하지 않고 무거우면서도
알림 기능이 잘 안되어서
트위카라는 어플을 받았는데~
생각외로 깔끔하고
내가 원하는 방법으로 알림을 받을 수 있는 점이
맘에 든다...

참고로 가볍고 빠르게 움직는 모습도 하나의 장점이라고 하겠다.
강추 어플~
2010-09-01 18:01:35

Hardware Diagnostics for SunTM Systems: 

 

A Toolkit for System Administrators

 시스템을 좀더 쉽고 명확하게 관리하기 위해 System Administrator를 위한 하드웨어 진단법을 5단계로 분류하여 설명을 합니다.

OpenBootTM commands(Power on Self Test(POST) program)는 시스템 보드에 있는  LEDs의 상태로 Sun MicrosystemsTM server, desktop products 와 연관된 하드웨어 문제를 진단할수 있고 low-level 진단법을 이용하여 시스템과 추가한 디바이스의 상태를 확인 할수 있읍니다. 한 예로 당신은 시스템의 디바이스를 알아볼수 있고, 동작 여부를 확인 할수 있고  또한 시스템의 구성 정보를 알수 도 있읍니다.

다음 테이블은 여기서 설명할 부 주제에 관한 설명입니다.:

OpenBoot Prom (OBP) Diagnostic Commands and Tools OBP command는 시스템 구성 정보를 알아볼수 있고, 시스템에 붙여진 디바이스를 테스트 할수 있고, 네트워크  연결을 모니터링하고, 그밖에 더많은 일을 할수 있는 명령어 들이다.
OBDiag 시스템이 실행 될때 테스트가 어떻게 이루어지는지 보여주고, 메인 보드, 인터페이스, 디스크 디라이브, 테입 디바이스의 진단을 수행 한다.
Power On Self Test (POST) POST가 어떻게 초기화하고, 구성되어지고, 시스템을 테스트 하는지 설명하고,  POST의 출력결과, 시스템 보드, 파워 서플라이의 LEDs를 의미를 다룬다.
System Board and Power Supply LED Status Tables 시스템 보드, 파워 서플라이의 LED 상태의 의미와 Ultra Enterprise server 제품들의 시스템 보드, 파워 서플라이 LED 상태의 interpret의 정보를 다룬다.
Solaris Operating Environment Diagnostic Commands

이장에서는 시스템 구성 정보와, Field Replaceable Units (FRU)가 실패일때, 하드웨어 교정 정보, 패치의 설치 정보와 관련되 명령어에 대해서 다룬다.

 

OBP DIAGNOSTIC COMMANDS AND TOOLS

OBP는 시스템에  설치된 디바이스를 위한 강력한 low-level interface입니다..( OBP는 또한 ok prompt로 잘 알려져 있다.) 간단한  OBP 명령어를 배우는 동안 당신은 이더넷 어드레스 같은 자세한 시스템 구성과, CPU, bus speed, memory 초기화등을 알수 있고 OBP를 사용하는 동안 당신은 또한 default boot device같은 system parameter 값을 설정하거나 알아 볼수 있고, 네트워크 인터페이스, SCSI, SBUS 디바이스를 테스트 할수 있읍니다..

다음 표는 OpenBoot version 3.x 에 사용되는 명령어의 설명이다. 사용하기 위해서는 OBP ok prompt에서 간단히 입력하고 Return을 눌르면 된다.

 

banner 시스템 파워가 들어 오면 banner가 출력 된다. banner는 CPU speed, OBP revision, system memory, ethernet address, hostid를 보여준다.
devalias alias path 새로운 device alias를 설정한다.alias는 새로운 alias 이름이고 path는 device의 물리적 경로이다. 만약 devalias를 인수 없이 사용하면 모든 시스템 디바이스 aliases를 출력한다.
.enet-addr 이더넷 어드레스를 출력한다.
led-off/led-on 시스템  led를 on/off 시킨다.
nvalias name path 디바이스를위한 새로운 alias를 생성한다. name은 alias의 이름이다. path는 device의 물리적 경로이다.                        

Note - non-volatile memory(NVRAM) 에 새로운 alias를 저장시키기 위해서 reset-all 또는 nvstore 명령을 실행시킨다.

nvunaliasname path 사용자가 만든 alias를 지운다. name은 alias의 이름이고 path는 디바이스의 물리적인 경로이다.        

Note - non-volatile memory(NVRAM) 에 새로운 alias를 저장시키기 위해서 reset-alll 또는nvstore 명령을 실행시킨다.

nvstore temporary buffer의 목록을 NVRAM에 복사하거나 제거한다.
power-off/power-on 시스템 파워를 on/off시킨다.
printenv 모든 설정 환경을 화면에 출력 시켜 준다.
probe-fcal-all Fiber Channel로 정의된 모든 장치 디바이스를 출력해 준다.
probe-sbus SBUS 슬롯에 설치된 도든 디바이스를 출력해 준다. 
Note - 이 명령어는 SBUS 슬롯을 가지고 있는 시스템에서만 적용된다.
probe-scsi SCSI 버스에 설치된 모든 장비를 출력해 준다.
probe-scsi-all SCSI 버스들에 설치된 모든 장비들을 출력해 준다.
set-default parameter parameter에 입력된 값을 기본값으로 설정해 준다.
set-defaults 모든 설정 값들을 초기값으로 설정한다.
setenv parameter value parameter에 값을 설정해 준다.
Note - 설정한 값을 저장하기 위해서는 reset-all명령을 사용한다.
show-devs 시스템에 구성된 모든 다바이스를 출력한다.
show-disks disk controller의 물리적 디바이스 경로를 출력한다.
show-displays frame buffer를 위한 물리적 디바이스 경로를 출력한다.
show-nets network interface를 위한 물리적 디바이스 경로를 출력한다.
show-post-results 전원이 들어오고 POST가 완료가 되었다면 ok prompt상에서 POST의 결과를 출력해 준다.
show-sbus SBUS 슬롯에 설치된 모든 디바이스를 추력해 준다. probe-sbus와 비슷하다.
show-tapes tape controllers를 위한 물리적 디바이스 경로를 출력한다.
.speed CPU와 bus 속도를 출력한다.

OBDIAG

OBDiag는 대화식으로 아래의 Sun 시스템의  실행시 테스트와 OBP level에서의 디바이스를 자체진단 하는 기능을 제공합니다.

  • Sun Enterprise 420R Server
  • Sun Enterprise 220R Server
  • Sun Ultra Enterprise 450 Server
  • Sun Ultra Enterprise 250 Server
  • Sun Ultra 80
  • Sun Ultra 60
  • Sun Ultra 30
  • Sun Ultra 10
  • Sun Ultra 5

OBDiag은 키보드와 시스템의 앞쪽 LEDs를 사용하여 테스트 결과를 표시한다. interpret 결과는 아래의 표 'System board and Power Supply LED Status Tables'을 참고하기 바랍니다.

OBDiag는 또한 진단과 에러 메세지를 시스템 console 창에 출력합니다.. OBDiag에 관해 좀더 알고 싶으면 http://docs.sun.com을 방문하세요.

OBDiag 테스트는 메인보드 만이 아닌 아래와 같은 다른 인터페이스 장비들도 포함합니다. :

  • PCI
  • SCSI
  • Ethernet
  • Serial
  • Parallel
  • Keyboard/mouse
  • NVRAM
  • Audio
  • Video
How To Run OBDiag

OBDiag를 실행시키기 위해서는 간단히 Open Boot ok prompt에서 obdiag를 입력하면 됩니다.

시스템에 power-on시킬때 자동으로 OBDiag를 실행하게 설정할수 있고 설정 방법은 아래와 같이 3가지 방법을 제공합니다.

  • OBDiag를 실행시키기 위한 설정을 다음과 같이 한다.

    ok setenv diag-switch? true

  • 시스템에 power가 들어오는 순간 stop-d를 동시에 누른다.
  • Ultra Enterprise servers는 시스템에 파워를 넣을때 스위치 키를 diagnostics position에 맞춘다.
POWER ON SELF TEST (POST)

POST 는 각각의 시스템 보드의 firmware(PROM)에 존재하는 프로그램이고 이것은 initialize, configure, 시스템 보드의 테스트에 사용 됩니다. POST의 출력은 시리얼 포트 A에  터미널 디바이스를 연결을 하면 볼수 있읍니다.(Ultra Enterprise server, POST의 출력 결과는 시스템 보드나 클럭 보드의 시리얼 포트 A에 터미널 디바이슬 연결하여 출력값을 볼수 있다.) Ultra Enterprise server의 각각의 시스템 보드의 LEDs의 상태는 POST의 테스트 상태를 나타낸다. 한 예로 만약 시스템 보드가 POST 테스트에서 실패하면 LED는 황색으로 표시된다.

POST의 출력 결과를 실시간으로 보고 싶으면 시리얼 포트 A에 터미널 디바이스를 연결하면 볼수 있다. 만약 이것이 불가능 하다면 POST의 테스트가 끝난 후에 OBP 명령인 show-post-results으로 결과를 볼수 있다.

How To Run POST 
  1. 시스템의 시리얼 포트 A에 터미널 장비를 연결한다.
  2. OBP 진단을 하기위해 아래와 같이 설절을 한다.

    ok setenv diag-switch? true

  3. 원하는 테스트 level을 설정한다.

    OBP는 두개의 테스트 level인 max와 min을  제공 한다. max는 모든 테스트를 할수 있고 min은 몇가지만을 테스트 한다. 원하는 OBP 값을 diag-level 명령으로 설정하면 된다.(max  또는 min)

    ok setenv diag-level max

  4. 만약 디스크로 부팅을 원한다면 OBP 값을 diag-device로 설정한다.

    ok setenv diag-device disk

    시스템은 기본적으로 diag-device 값은 net 이다.
  5. 자동으로 부팅이 되지 않게 하기위해서는 아래와 같이 한다.
    ok setenv auto-boot? false
  6. 지금 까지 설정을 저장하기 위해서 다음과 같이 한다.
     
    ok reset-all
  7. Power cycle the system 

시스템의 파워가 켜지면 POST는 실행이 된다. 그리고 POST의 출력 결과는 시리얼 포트 A에 연결한 터미널 장비에 출력 된다. POST가 완료된 후에 OBP 명령인 show-post-result를 이용하여 결과를 출력하여 볼수 있다.

SYSTEM BOARD AND POWER SUPPLY LED STATUS TABLES

이장은 Ultra Enterprise Server 제품들의 시스템 보드와 파워 서플라이의 설치시 LED 상태의 이해를 도와주기 위한 장이다.

Ultra Enterprise Server Front Panel and Clock Board LED Status

 

Power LED Service LED Cycling LED Condition
off off off no power
off on off failure mode
off off on failure mode
off on on failure mode
on off off hung in POST/OBP or OS
on off on hung in OS
on on off hung in POST/OBP
hung in OS/failed component
on on on hung in POST/OBP
hung in OS/failed component
on off flashing OS running normally
on on flashing OS running with failed component
on flashing off slow flash = POST
fast flash=OBP
on flashing on OS or OBP error

Notes:

 

LED Name Location Note
Power LED Left 이 LED는 항상 불이 켜져 있어야 한다. 만약 세게의 LED가 불이 꺼져있다면 power에 이상이 생긴 것이다. 만약 다른 LED와 다르면 문제가 생긴것을 나타낸다.
Service LED Middle 이 LED는 불이 꺼져있는 상태가 정상이다. 만약 켜져 있다면 각각의 보드의 이상 이무로 각각의 LED를 체크해야 한다. 이 LED는 OS에 관계되는 문제와는 상관이 없다.
Cycling LED Right 이 LED는 반짝이는 상태가 정상이다.

Ultra Enterprise CPU/Memory, I/O, and Disk Board LED Status

 

Power LED Service LED Cycling LED Condition
off off off board no power
off on off low power mode - unpluggable
off off on failure mode
off on on failure mode
on off off hung in POST/OBP of OS
on off on hung in OS
on on off hung in POST/OBP
hung in OS and failed component on board
on on on hung in POST/OBP
hung in OS/failed component on board
on off flashing OS running normally
on on flashing OS running normally/failed component on board
on flashing off slow flash = POST
fast flash = OBP
on flashing on OS or OBP error
Notes: Low Power Mode - 만약 보드의 LEDs가 off-on-off이면 이것은 보드가 low power mode이을 의미한다. Low Power Mode는 POST의  실패 때문에 보드가 장애가 있을때나 보드가 단지 끼워져만 있을때 일어난다. Low power mode는 단지 시스템이 실행돼는 동안 아마도 당신이 보드를 제거 했을때 나타나는 상태이다. Disk Boards - Ultra Enterprise server에 설치된 디스크 보드에 황색 LED가 나타나면 이것은 Ultra Enterprise server가 Solaris 2.6 5/98 또는 그 상위의 OS가 작동하는 것을 의미한다. 

Power Supply LED Status

LEDs는 파워 서플라이 또는 fan failure 같은 에러 상태를 나타내는데 사용된다.파워 서플라이는 hot-pluggable이 된다. 그러나 만약 파워의 부족함을 발견되면 Solaris Operating Environment는 시스템을 종료한다. 일반적으로 시스템은 각각의 시스템 보드를 위해 파워 서플라이를 가지는 구조로 되어 있다. 

Green LED Yellow LED Condition
off off No AC input or keyswitch is turned off
on off normal operation
on on Fan failure or one or more voltages out of specification
off on One or more DC outputs failed, or voltages out of specification, or system in low power state
 

SOLARIS OPERATING ENVIRONMENT DIAGNOSTIC COMMANDS

다음 테이블의 OS 명령어는 시스템 구성, Field Replaceable Units (FRU)가 실패 일때, 하드웨어 진단 정보, 패치의 설치 등의 정보를 출력하는데 사용된다. 

 

/usr/platform/sun4u/sbin/prtdiag -v 시스템 구성, 진단 정보, Field Replaceable Units (FRU)의 fail list를 출력한다.
/usr/bin/showrev [-p] 현재 하드웨어와 소프트웨어의 진단을 출력한다. -p 옵션을 사용하면 설치된 패치정보를 출력한다. 
/usr/sbin/prtconf 시스템 구성 정보를 출력한다.
/usr/sbin/psrinfo -v clock speed를 포함한 CPU 정보를 출력한다.

위의 내용은 sunsolve에서 내용을 발취하여 정리한 것입니다.

 

Editor&Written by leemary

 

 

 

출처 : http://www.bigcom.co.kr/tech/admin/hddiag.htm

 

출처 : http://cafe.naver.com/hunistyle.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=30


'Device & Language > Solaris 10' 카테고리의 다른 글

속성  (0) 2010.09.03
Service Managerment Facility  (0) 2010.09.03
manpages section 1M: System Administration Commands  (0) 2010.09.01
솔10 svcadm  (0) 2010.09.01
fsck-spec  (0) 2010.09.01
2010-09-01 15:26:37

'Device & Language > Solaris 10' 카테고리의 다른 글

Service Managerment Facility  (0) 2010.09.03
Hardware Diagnostics for Sun Systems  (0) 2010.09.01
솔10 svcadm  (0) 2010.09.01
fsck-spec  (0) 2010.09.01
svcs– report service status  (0) 2010.09.01
2010-09-01 15:17:13

'Device & Language > Solaris 10' 카테고리의 다른 글

Hardware Diagnostics for Sun Systems  (0) 2010.09.01
manpages section 1M: System Administration Commands  (0) 2010.09.01
fsck-spec  (0) 2010.09.01
svcs– report service status  (0) 2010.09.01
fsck– check and repair file systems  (0) 2010.09.01
2010-09-01 15:14:51
출처 서른.. 그 즈음에... | 쏭알
원문 http://blog.naver.com/0164624348/40004694146
디스크 사용관리...

여기서는 정상적인 파일시스템을 유지하기 위한 방법을 알아보도록 하지여...

시스템이 정상적으로 shutdown되지 않으면 파이시스템은 손상을 입을 수도 있고...
머...암튼 여러가지 원인으로 파일시스템이 손상될수 있음니다...

이때 사용되는 유틸리티가 fsck 입니다...
fsck 유틸리티는 다음과 같은 검사를 합니다..탭키로 구분해 놓은 것은 하위 검사 목록입니다..

super block
	file system size
	inode number
	free block count
	free inode count

inode
	format and type
		일반파일
		디렉토리
		block special
		character special
		심볼릭 링크
		FIFO(name pipe)
		socket
	link count
	duplicate block
	bad block number
	inode size

indirect block
	블록이 다른 inode에 의해 이미 점유되어 있는 것
	블록수가 파일 시스템 범위에 어긋난 것

data block
	평범한 data block
	심벌릭 링크 data block
	디렉토리  data block

이렇게 4가지를 검사합니다...
super block은 파일시스템의 모든 요약 정보를 포함하고 있습니다...
이것은 가장 일반적인 파일시스템의 문제를 일으키는 요인입니다..

주의할 점은 fsck는 마운트 되어 있는 파일 시스템은 작동하지 않습니다...
fsck는 두가지 모드가 있습니다...

non_interactive
interactive

시스템이 정상적 부팅시에 non-interactive 모드로 fsck가 운영되고, 문제 발생시에는 시스템 관리자의 
개입없이 repair할 수 있는 문제는 해결하고, 해결못한 문제일 경우는 fsck를 종료후, single user mode로 
시스템을 올린뒤 관리자에게  interactive fsck 유틸리티를 실행하도록 요구합니다..

다음은 fsck 유틸의 사용법과 옵션입니다...

fsck [-F FSType][-V][-m][special]
fsck [-F FSType][-V][-n|Ny|Y][-o specific_options][special]

-F                   : 검사할 파일 시스템의 유형을 지정한다. 
-Y|y                 : fsck 실행중 묻게 되는 모든 질문에 yes라고 한다. 이 결과로 어떤 데이타가 삭제 될 수 있다.
-N|n                 : fsck 실행중 묻게 되는 모든 질문에 no라고 한다.
-V                   : fsck가 실행되지 않고 실행 명령어를 자세히 보여준다.
-m                   : 파일 시스템을 검사하여 시스템의 상태값을 반환한다.
special              : block 또는 caracter device를 나타낸다.
-o specific_options  : b=n n번째 블록을 파일 시스템의 superblock으로 사용한다. block 32는 항상 예비 superblock이다. 다른 superblock위치는
                       newfs -F 로 지정해 줄 수 있다.
p                    : 파일 시스템에 문제를 해결하기 위한 작업을 수행하나 관리자의 개입이 요구되는 문제가 발생하면 자동으로 fsck가 종료된다.
f                    : force option. 파일 시스템이 clean flag상태여도 강제로 검사

여기서는 소개만 하겠슴다....머..이런 부분은 시스템 관리자의 몫으로 돌리겠슴다...

=======================================================================================================================
# fsck -V /export/home
fsck -F ufs /dev/rdsk/c0d0s7
==========================================================================================================================

이제부터 이번 단원의 주제인 디스크 사용관리를 살펴봅시다..
머....어케보면 명령어 사용법 익히는 거 같습니다만...어쩔 수 없지여...
명령어를 익혀야...머를 하던지 하니까여..
먼저...df명령어 입니다...
df명령어는 각 파일 시스템의 디스크 스페이스에 대한 정보를 보여주는 명령어 입니다..
다음은 옵션입니다..

-F  : 파일시스템의 유형을 정의, 명시하지 않으면 /etc/vgstab파일로 부터 찾아 정보를 얻는다.
-a  : /etc/mnttab 파일에 정의된 모든 파일 시스템을 보여준다.
-b  : 사용 가능한 디스크 용량을 KB단위로 보여준다.
-e  : 사용 가능한 파일의 number만 보여준다.
-k  : KB단위로 파일 시스템의 정보를 보여준다.
-l  : 로컬 파일 시스템의 마운트된 정보를 보여준다.
-n  : 파일 시스템의 유형을 보여준다.
-o  : specific_options
-i  : 시스템에 마운트된 파일 시스템의 inode 사용 내역 및 정보를 보여준다.

==========================================================================================================================

# df
/                  (/dev/dsk/c0d0s0   ): 1159550 블록   326014 파일
/boot              (/dev/dsk/c0d0p0:boot):   17631 블록       -1 파일
/proc              (/proc             ):       0 블록     9920 파일
/dev/fd            (fd                ):       0 블록        0 파일
/etc/mnttab        (mnttab            ):       0 블록        0 파일
/var/run           (swap              ):  875856 블록    20265 파일
/tmp               (swap              ):  875856 블록    20265 파일
/export/home       (/dev/dsk/c0d0s7   ): 4156934 블록   425930 파일
# df -b
파일시스템               가용
/dev/dsk/c0d0s0        579775
/dev/dsk/c0d0p0:boot     8815
/proc                       0
fd                          0
mnttab                      0
swap                   437928
swap                   437928
/dev/dsk/c0d0s7       2078467
# df -k
파일시스템           K바이트    사용    가용   용량    설치지점
/dev/dsk/c0d0s0      1491822  912047  520103    64%    /
/dev/dsk/c0d0p0:boot   10484    1669    8815    16%    /boot
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
swap                  437932       4  437928     1%    /var/run
swap                  441072    3144  437928     1%    /tmp
/dev/dsk/c0d0s7      3723974 1645507 2041228    45%    /export/home
# df -n
/                  : ufs
/boot              : pcfs
/proc              : proc
/dev/fd            : fd
/etc/mnttab        : mntfs
/var/run           : tmpfs
/tmp               : tmpfs
/export/home       : ufs
# df -F ufs -o i
파일 시스템             iused   ifree  %iused  마운트 위치
/dev/dsk/c0d0s0        48770  326014    13%   /
/dev/dsk/c0d0s7        47414  425930    10%   /export/home

==========================================================================================================================

다음은 디렉토리와 파일에서 사용하고 있는 디스크 공간을 512byte단위로 보여주는 df명령어에 대해서 살펴보겠슴다...
옵션은 다음과 같습니다..

-a : 모든 파일과 디렉토리에 의해 사용되고 있는 블록의 수를 보여준다.
-s : 디스크 사용량을 요약해서 보여준다.
-k : KB 단위로 정보를 보여준다.

==========================================================================================================================

# cd /export/home/yasi
# du
30      .
# du -k
15      .
# du -ak
1       ./.profile
1       ./sh_script
1       ./.cshrc
1       ./sample
1       ./script.csh
1       ./if1.csh
1       ./if2.csh
1       ./while.csh
1       ./foreach.csh
1       ./repeat.csh
1       ./switch.csh
1       ./ex.csh
1       ./sample.c
1       ./file2
15      .
# du -s
30      .

==========================================================================================================================

다음에 살펴볼 명령어는 ff명령어 입니다..
ff명령어는 파일 시스템의 파일들에 대한 inode number와  path name 을 제공해 줍니다..
옵션은 다음과 같습니다..

-F : 파일시스템의 유형을 명시
-V : ff 명령어를 실행하지 않고 명령어의 사용법을 보여준다.
-s : 파일의 path name 뒤에 파일의 사이즈를 바이트단위로 보여준다.
-u : 파일의 path name 뒤에 파일의 소슈자 명를 보여준다.

ff명령어의 사용예를 생략하겠습니다..
다음은 quot 명령어로 파일시스템에서 각 사용자에 의해 사용된 디스크의 사용량을 1024바이트 단위로 보여줍니다..
옵션은..

-a : 마운트된 모든 파일 시스템의 디스크 사용량을 보여준다.
-f : 파일 시스템에서 각 사용자에 의해서 사용된 디스크의 사용량과 함께 파일의 수를 보여준다.

==========================================================================================================================
# quot -a
/dev/rdsk/c0d0s0 (/):
574238  root
307878  bin
21837   daemon
 3482   #100
 3347   oracle
  765   uucp
  290   adm
  167   lp
   37   #101
    4   #5001
    2   nobody
/dev/rdsk/c0d0s7 (/export/home):
1643985 oracle
 1485   root
   23   yasi
   13   #101
    1   #100
==========================================================================================================================

우리가 보통 메일을 보내고 받고 하는 서비를 받는데...
여기서 모든 사이트는 용량제한을 해놓았습니다....
이런 식으로 솔라리스에서도 사용자에 대한 디스크 사용공간을 제한할 수 있습니다..
그 명령어는 quota입니다..
이 명령은 당연히 root 이어야 겠죠...
다음의 단계대로 하면 됩니다..

==========================================================================================================================

# vi /etc/vfstab
파일시스템           K바이트    사용    가용   용량    설치지점
/dev/dsk/c0d0s0      1491822  912047  520103    64%    /
/dev/dsk/c0d0p0:boot   10484    1669    8815    16%    /boot
/proc                      0       0       0     0%    /proc
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0d0s1 -       -       swap    -       no      -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      -
/dev/dsk/c0d0p0:boot    -       /boot   pcfs    -       no      -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7        /export/home    ufs     2       yes     rq                       <--- 마지막 옵션에 rq(reuest quota)입력
swap    -       /tmp    tmpfs   -       yes     -
~
~
~
~
~
~
~
~
~
~
~
:wq
# touch /export/home/quotas                          -- quota를 설정할 파일 시스템에 quotas 파일을 만든다.
# chmod 600 /export/home/quotas                      -- root만의 읽기전용 파일을 만든다.
# quotaon -v /export/home                            -- quotaon 명령을 이용해서 디스크 사용 제한할 파일 시스템을 quota turn on한다.
/export/home: quotas turned on
# edquota yasi                                        -- edquota명령을 이용해서 각 사용자의 디스크 사용량을 할당(vi 편집기 열림)
fs /export/home blocks (soft = 50, hard = 60) inodes (soft = 90, hard = 100)
~
~
~
~
~
~
:wq
# quotacheck -av                                          -- quotacheck 명령을 이용해서 quota설정을 적용한다.
*** Checking quotas for /dev/rdsk/c0d0s7 (/export/home)
# quota -v yasi                                            -- 설정된 quota 확인
Disk quotas for yasi (uid 1002):
Filesystem     usage  quota  limit    timeleft  files  quota  limit    timeleft
/export/home       0     50     60                  0     90    100

==========================================================================================================================

다음은 edquota 명령을 했을때 나오는 각 필드의 의미이다..
fs /export/home blocks (soft = 0, hard = 0) inodes (soft = 0, hard = 0)

fs       :  제한할 파일 시스템 명시
blocks   : 사용을 제한할 블록수를 정의
soft = n : 블록수가 n에 도달하면 사용자에게 경고 메세지 보낸다.
hard = n : 블록수가 n에 도달하면 더 이상 사용자의 디스크 사용을 금지한다.
inode    : 사용자에게 제한한 inode수
soft = n : inode수가 n 에 도달하면 경고 메세지
hard = n : Inode수가 n에 도락하면 더이상 디스크의 사용을 금지한다.

다음은 swap에 대해서 알아봅시다...
swap 은 가상메모리 공간을 의미합니다...
swap 슬라이스는 현재 프로세스를 다루기에 실제 메모리가 충분치 않을때 사용하는 가상 메모리 영역입니다..
메모리 사용에 대한 야그는 생략하고...스왑영역을 추가하고 삭제하는 방법을 알아보겠습니다..

스왑 영역의 추가/삭제/조회등은 swap 유틸리티를 사용합니다...
옵션은 다음과 같습니다..

a : 추가
d : 삭제
l : 조회
s : 요약정보

이제..스왑을 추가하고...조회하고...제거하는 것을 직접 실습해 봅시다..

스왑의 추가
==========================================================================================================================

yasicom% su                              -- root 유저로 로긴
Password:
# mkdir /files                           -- 스왑파일이 속할 디렉토리 생성
# mkfile 24m /files/swapfile             -- mkfile 명령으로 스와 파일 생성(절대 경로명 적어준다... mkfile size[k|b|m] filename
# swap -a /files/swapfile                -- 반드시 절대 경로명을 적어주어야 한다..
# vi /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0d0s1 -       -       swap    -       no      -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      -
/dev/dsk/c0d0p0:boot    -       /boot   pcfs    -       no      -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7        /export/home    ufs     2       yes     rq
swap    -       /tmp    tmpfs   -       yes     -
/files/swapfile   -   -   swap   -   no   -                 <----------------------------- /etc/vfstab 화일에 지금 만든 파일을 swap이라고 명시하고 관련된 내용을 적어준다.
~
~
~
~
~
:wq
# swap -l                                          -- 스왑에 대한 조회
swapfile             dev  swaplo 블록   사용 가능
/dev/dsk/c0d0s1     102,1       8 1049320 887584
/files/swapfile       -        8  49144  49144
# swap -s
총: 96352k 바이트 할당 + 54380k 예약 = 150732k 사용, 461380k 사용 가능
==========================================================================================================================



스왑의 제거
==========================================================================================================================

yasicom% su                              -- root 유저로 로긴
Password:
# swap -d /files/swapfile
# vi /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0d0s1 -       -       swap    -       no      -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      -
/dev/dsk/c0d0p0:boot    -       /boot   pcfs    -       no      -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7        /export/home    ufs     2       yes     rq
swap    -       /tmp    tmpfs   -       yes     -
/files/swapfile   -   -   swap   -   no   -                 <----------------------------- /etc/vfstab 화일에서 추가한 엔트리 제거
~
~
~
~
~
:wq
# rm /files/swapfile                              -- 스왑으로 쓰던 파일 제거
# swap -l
swapfile             dev  swaplo 블록   사용 가능
/dev/dsk/c0d0s1     102,1       8 1049320 887584
# swap -s
총: 96344k 바이트 할당 + 54388k 예약 = 150732k 사용, 436808k 사용 가능
==========================================================================================================================

'Device & Language > Solaris 10' 카테고리의 다른 글

Hardware Diagnostics for Sun Systems  (0) 2010.09.01
manpages section 1M: System Administration Commands  (0) 2010.09.01
솔10 svcadm  (0) 2010.09.01
svcs– report service status  (0) 2010.09.01
fsck– check and repair file systems  (0) 2010.09.01
2010-09-01 14:20:46

Name

    svcs– report service status

Synopsis

    svcs [-aHpv?] [-o col[,col]]... [-R FMRI-instance]... 
         [-sS col]... [FMRI | pattern]...
    svcs {-d | -D} [-Hpv?] [-o col[,col]]... [-sS col]... 
         [FMRI | pattern] ...
    svcs -l [FMRI | pattern]...
    svcs -x [-v] [FMRI]...

Description

    The svcs command displays information about service instances as recorded in the service configuration repository.

    The first form of this command prints one-line status listings for service instances specified by the arguments. Each instance is listed only once. With no arguments, all enabled service instances, even if temporarily disabled, are listed with the columns indicated below.

    The second form prints one-line status listings for the dependencies or dependents of the service instances specified by the arguments.

    The third form prints detailed information about specific services and instances.

    The fourth form explains the states of service instances. For each argument, a block of human-readable text is displayed which explains what state the service is in, and why it is in that state. With no arguments, problematic services are described.

    Error messages are printed to the standard error stream.

    The output of this command can be used appropriately as input to the svcadm(1M) command.

Options

    The following options are supported:

    -?

    Displays an extended usage message, including column specifiers.

    -a

    Show all services, even disabled ones. This option has no effect if services are selected.

    -d

    Lists the services or service instances upon which the given service instances depend.

    -D

    Lists the service instances that depend on the given services or service instances.

    -H

    Omits the column headers.

    -l

    (The letter ell.) Displays all available information about the selected services and service instances, with one service attribute displayed for each line. Information for different instances are separated by blank lines.

    The following specific attributes require further explanation:

    dependency

    Information about a dependency. The grouping and restart_on properties are displayed first and are separated by a forward slash (/). Next, each entity and its state is listed. See smf(5) for information about states. In addition to the standard states, each service dependency can have the following state descriptions:

    absent

    No such service is defined on the system.

    invalid

    The fault management resource identifier (FMRI) is invalid (see smf(5)).

    multiple

    The entity is a service with multiple instances.

    File dependencies can only have one of the following state descriptions:

    absent

    No such file on the system.

    online

    The file exists.

    If the file did not exist the last time that svc.startd evaluated the service's dependencies, it can consider the dependency to be unsatisfied. svcadm refresh forces dependency re-evaluation.

    unknown

    stat(2) failed for a reason other than ENOENT.

    See smf(5) for additional details about dependencies, grouping, and restart_on values.

    enabled

    Whether the service is enabled or not, and whether it is enabled or disabled temporarily (until the next system reboot). The former is specified as either true or false, and the latter is designated by the presence of (temporary).

    A service might be temporarily disabled because an administrator has run svcadm disable -t, used svcadm milestone, or booted the system to a specific milestone. See svcadm(1M) for details.

    -o col[,col]...

    Prints the specified columns. Each col should be a column name. See COLUMNS below for available columns.

    -p

    Lists processes associated with each service instance. A service instance can have no associated processes. The process ID, start time, and command name (PID, STIME, and CMD fields from ps(1)) are displayed for each process.

    -R FMRI-instance

    Selects service instances that have the given service instance as their restarter.

    -s col

    Sorts output by column. col should be a column name. See COLUMNS below for available columns. Multiple -s options behave additively.

    -S col

    Sorts by col in the opposite order as option -s.

    -v

    Without -x, displays verbose columns: STATE, NSTATE, STIME, CTID, and FMRI.

    With -x, displays extra information for each explanation.

    -x

    Displays explanations for service states.

    Without arguments, the -x option explains the states of services which:

    • are enabled, but are not running.

    • are preventing another enabled service from running.

Operands

    The following operands are supported:

    FMRI

    A fault management resource identifier (FMRI) that specifies one or more instances (see smf(5)). FMRIs can be abbreviated by specifying the instance name, or the trailing portion of the service name. For example, given the FMRI:


    svc:/network/smtp:sendmail

    The following are valid abbreviations:


    sendmail
    :sendmail
    smtp
    smtp:sendmail
    network/smtp

    The following are invalid abbreviations:


    mail
    network
    network/smt

    If the FMRI specifies a service, then the command applies to all instances of that service, except when used with the -D option.

    Abbreviated forms of FMRIs are unstable, and should not be used in scripts or other permanent tools.

    pattern

    A pattern that is matched against the FMRIs of service instances according to the “globbing” rules described by fnmatch(5). If the pattern does not begin with svc:, then svc:/ is prepended. The following is a typical example of a glob pattern:


    qexample% svcs \*keyserv\*
    STATE          STIME     FMRI
    disabled       Aug_02    svc:/network/rpc/keyserv:default
    FMRI-instance

    An FMRI that specifies an instance.

COLUMNS

    Column names are case insensitive. The default output format is equivalent to “-o state,stime,fmri”. The default sorting columns are STATE, STIME, FMRI.

    CTID

    The primary contract ID for the service instance. Not all instances have valid primary contract IDs.

    DESC

    A brief description of the service, from its template element. A service might not have a description available, in which case a hyphen (-) is used to denote an empty value.

    FMRI

    The FMRI of the service instance.

    INST

    The instance name of the service instance.

    NSTA

    The abbreviated next state of the service instance, as given in the STA column description. A hyphen denotes that the instance is not transitioning. Same as STA otherwise.

    NSTATE

    The next state of the service. A hyphen is used to denote that the instance is not transitioning. Same as STATE otherwise.

    SCOPE

    The scope name of the service instance.

    SVC

    The service name of the service instance.

    STA

    The abbreviated state of the service instance (see smf(5)):

    DGD

    degraded

    DIS

    disabled

    LRC

    legacy rc*.d script-initiated instance

    MNT

    maintenance

    OFF

    offline

    ON

    online

    UN

    uninitialized

    Absent or unrecognized states are denoted by a question mark (?) character. An asterisk (*) is appended for instances in transition, unless the NSTA or NSTATE column is also being displayed.

    See smf(5) for an explanation of service states.

    STATE

    The state of the service instance. An asterisk is appended for instances in transition, unless the NSTA or NSTATE column is also being displayed.

    See smf(5) for an explanation of service states.

    STIME

    If the service instance entered the current state within the last 24 hours, this column indicates the time that it did so. Otherwise, this column indicates the date on which it did so, printed with underscores (_) in place of blanks.

Examples


    Example 1 Displaying the Default Output

    This example displays default output:


    example% svcs
    STATE          STIME    FMRI
    ...
    legacy_run     13:25:04 lrc:/etc/rc3_d/S42myscript
    ...
    online         13:21:50 svc:/system/svc/restarter:default
    ...
    online         13:25:03 svc:/milestone/multi-user:default
    ...
    online         13:25:07 svc:/milestone/multi-user-server:default
    ...


    Example 2 Listing All Local Instances

    This example lists all local instances of the service1 service.


    example% svcs -o state,nstate,fmri service1
    STATE        NSTATE        FMRI
    online       -             svc:/service1:instance1
    disabled     -             svc:/service1:instance2


    Example 3 Listing Verbose Information

    This example lists verbose information.


    example% svcs -v network/rpc/rstat:udp
    STATE          NSTATE        STIME    CTID   FMRI
    online         -             Aug_09        - svc:/network/rpc/rstat:udp


    Example 4 Listing Detailed Information

    This example lists detailed information about all instances of system/service3. Additional fields can be displayed, as appropriate to the managing restarter.


    example% svcs -l network/rpc/rstat:udp
    
    fmri         svc:/network/rpc/rstat:udp
    enabled      true
    state        online
    next_state   none
    restarter    svc:/network/inetd:default
    contract_id
    dependency   require_all/error svc:/network/rpc/bind (online)


    Example 5 Listing Processes


    example% svcs -p sendmail
    STATE          STIME    FMRI
    online         13:25:13 svc:/network/smtp:sendmail
                   13:25:15   100939 sendmail
    13:25:15   100940 sendmail  


    Example 6 Explaining Service States Using svcs -x

    (a) In this example, svcs -x has identified that the print/server service being disabled is the root cause of two services which are enabled but not online. svcs -xv shows that those services are print/rfc1179 and print/ipp-listener. This situation can be rectified by either enabling print/server or disabling rfc1179 and ipp-listener.


    example% svcs -x
    svc:/application/print/server:default (LP print server)
     State: disabled since Mon Feb 13 17:56:21 2006
    Reason: Disabled by an administrator.
       See: http://sun.com/msg/SMF-8000-05
       See: lpsched(1M)
    Impact: 2 dependent services are not running. (Use -v for list.)

    (b) In this example, NFS is not working:


    example$ svcs nfs/client
    STATE          STIME    FMRI
    offline        16:03:23 svc:/network/nfs/client:default

    (c) The following example shows that the problem is nfs/status. nfs/client is waiting because it depends on nfs/nlockmgr, which depends on nfs/status:


    example$ svcs -xv nfs/client
    svc:/network/nfs/client:default (NFS client)
     State: offline since Mon Feb 27 16:03:23 2006
    Reason: Service svc:/network/nfs/status:default
            is not running because a method failed repeatedly.
       See: http://sun.com/msg/SMF-8000-GE
      Path: svc:/network/nfs/client:default
              svc:/network/nfs/nlockmgr:default
                svc:/network/nfs/status:default
       See: man -M /usr/share/man -s 1M mount_nfs
       See: /var/svc/log/network-nfs-client:default.log
    Impact: This service is not running.

Exit Status

    The following exit values are returned:

    0

    Successful command invocation.

    1

    Fatal error.

    2

    Invalid command line options were specified.

Attributes

    See attributes(5) for descriptions of the following attributes:

    ATTRIBUTE TYPE 

    ATTRIBUTE VALUE 

    Availability 

    SUNWcsu 

    Interface Stability 

    See below. 

    Screen output is Uncommitted. The invocation is Committed.

See Also


'Device & Language > Solaris 10' 카테고리의 다른 글

Hardware Diagnostics for Sun Systems  (0) 2010.09.01
manpages section 1M: System Administration Commands  (0) 2010.09.01
솔10 svcadm  (0) 2010.09.01
fsck-spec  (0) 2010.09.01
fsck– check and repair file systems  (0) 2010.09.01
2010-09-01 01:34:15

출처 : Sun Microsystem

'Device & Language > Java' 카테고리의 다른 글

% 연산자 음수 적용시  (0) 2010.09.06
Java API  (0) 2010.09.02
jstl 1.0 spec  (0) 2010.09.01
servlet 2.4 spec  (0) 2010.09.01
ejb 3.0 spec simplified  (0) 2010.09.01
2010-09-01 01:33:06

출처 : Sun Microsystems

'Device & Language > Java' 카테고리의 다른 글

Java API  (0) 2010.09.02
jsp 2.0 spec  (0) 2010.09.01
servlet 2.4 spec  (0) 2010.09.01
ejb 3.0 spec simplified  (0) 2010.09.01
ejb 3.0 spec persistence  (0) 2010.09.01