← Documents Documentation/watchdog/pcwd-watchdog.rst GitHub 원문 ↗

Linux 6.18.37 · Watchdog / Hardware

Berkshire Products PC Watchdog Card

ISA PC Watchdog Revision A·C의 운용과 ioctl 인터페이스를 설명합니다.

Source pathDocumentation/watchdog/pcwd-watchdog.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

pcwd-watchdog.rst:1-71

ISA PC Watchdog Revision A·C의 운용과 ioctl 인터페이스를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ===================================
2 Berkshire Products PC Watchdog Card
3 ===================================
4
5 Last reviewed: 10/05/2007
6
7 Support for ISA Cards Revision A and C
8 =======================================
9
10 Documentation and Driver by Ken Hollis <kenji@bitgate.com>
11
12 The PC Watchdog is a card that offers the same type of functionality that
13 the WDT card does, only it doesn't require an IRQ to run. Furthermore,
14 the Revision C card allows you to monitor any IO Port to automatically
15 trigger the card into being reset. This way you can make the card
16 monitor hard drive status, or anything else you need.
17
18 The Watchdog Driver has one basic role: to talk to the card and send
19 signals to it so it doesn't reset your computer ... at least during
20 normal operation.
21
22 The Watchdog Driver will automatically find your watchdog card, and will
23 attach a running driver for use with that card. After the watchdog
24 drivers have initialized, you can then talk to the card using a PC
25 Watchdog program.
26
27 I suggest putting a "watchdog -d" before the beginning of an fsck, and
28 a "watchdog -e -t 1" immediately after the end of an fsck. (Remember
29 to run the program with an "&" to run it in the background!)
30
31 If you want to write a program to be compatible with the PC Watchdog
32 driver, simply use of modify the watchdog test program:
33 tools/testing/selftests/watchdog/watchdog-test.c
34
35
36 Other IOCTL functions include:
37
38 WDIOC_GETSUPPORT
39 This returns the support of the card itself. This
40 returns in structure "PCWDS" which returns:
41
42 options = WDIOS_TEMPPANIC
43 (This card supports temperature)
44 firmware_version = xxxx
45 (Firmware version of the card)
46
47 WDIOC_GETSTATUS
48 This returns the status of the card, with the bits of
49 WDIOF_* bitwise-anded into the value. (The comments
50 are in include/uapi/linux/watchdog.h)
51
52 WDIOC_GETBOOTSTATUS
53 This returns the status of the card that was reported
54 at bootup.
55
56 WDIOC_GETTEMP
57 This returns the temperature of the card. (You can also
58 read /dev/watchdog, which gives a temperature update
59 every second.)
60
61 WDIOC_SETOPTIONS
62 This lets you set the options of the card. You can either
63 enable or disable the card this way.
64
65 WDIOC_KEEPALIVE
66 This pings the card to tell it not to reset your computer.
67
68 And that's all she wrote!
69
70 -- Ken Hollis
71 (kenji@bitgate.com)
72

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

ISA Revision A·C 카드 운용

1-35

이 드라이버는 Berkshire Products PC Watchdog ISA card Revision A와 C를 지원합니다. 문서와 드라이버는 Ken Hollis가 작성했고 마지막 검토일은 2007-10-05입니다.

PC Watchdog은 WDT card와 같은 기능을 제공하지만 동작에 IRQ가 필요하지 않습니다. Revision C는 임의 I/O port를 감시해 card reset을 자동으로 유발할 수 있으므로 하드 디스크 상태 같은 외부 조건도 감시할 수 있습니다.

드라이버의 기본 역할은 정상 운용 중 컴퓨터를 reset하지 않도록 카드에 신호를 보내는 것입니다. 카드를 자동으로 찾아 드라이버를 연결한 뒤 PC Watchdog 프로그램으로 제어합니다.

문서는 `fsck` 전에 `watchdog -d`를 background로 시작하고 끝난 직후 `watchdog -e -t 1`을 실행하는 예를 권합니다. 호환 프로그램은 `tools/testing/selftests/watchdog/watchdog-test.c`를 사용하거나 수정해 작성할 수 있습니다.

PC Watchdog 운용
ISA Watchdog card 자동 검색드라이버 연결·초기화PC Watchdog 프로그램 실행정상 상태에서 keepalive 전송신호가 멈추면 card가 시스템 reset

드라이버 발견부터 사용자 프로그램의 keepalive까지입니다.

===================================
Berkshire Products PC Watchdog Card
===================================

Last reviewed: 10/05/2007

Support for ISA Cards  Revision A and C
=======================================

Documentation and Driver by Ken Hollis <kenji@bitgate.com>

 The PC Watchdog is a card that offers the same type of functionality that
 the WDT card does, only it doesn't require an IRQ to run.  Furthermore,
 the Revision C card allows you to monitor any IO Port to automatically
 trigger the card into being reset.  This way you can make the card
 monitor hard drive status, or anything else you need.

 The Watchdog Driver has one basic role: to talk to the card and send
 signals to it so it doesn't reset your computer ... at least during
 normal operation.

 The Watchdog Driver will automatically find your watchdog card, and will
 attach a running driver for use with that card.  After the watchdog
 drivers have initialized, you can then talk to the card using a PC
 Watchdog program.

 I suggest putting a "watchdog -d" before the beginning of an fsck, and
 a "watchdog -e -t 1" immediately after the end of an fsck.  (Remember
 to run the program with an "&" to run it in the background!)

 If you want to write a program to be compatible with the PC Watchdog
 driver, simply use of modify the watchdog test program:
 tools/testing/selftests/watchdog/watchdog-test.c

지원 ioctl

36-67

`WDIOC_GETSUPPORT`는 `PCWDS` 구조체로 카드 기능을 반환합니다. `options`의 `WDIOS_TEMPPANIC`은 온도 기능을 지원한다는 뜻이고 `firmware_version`은 카드 firmware 버전입니다.

`WDIOC_GETSTATUS`는 `WDIOF_*` 비트를 AND한 현재 카드 상태를 반환하고, `WDIOC_GETBOOTSTATUS`는 부팅 때 보고된 상태를 반환합니다.

`WDIOC_GETTEMP`는 카드 온도를 반환합니다. `/dev/watchdog`을 읽어도 매초 온도 갱신을 받을 수 있습니다.

`WDIOC_SETOPTIONS`는 카드를 켜거나 끄고, `WDIOC_KEEPALIVE`는 시스템을 reset하지 않도록 card를 ping합니다.

PC Watchdog ioctl
IOCTL결과
WDIOC_GETSUPPORTPCWDS 기능·firmware 정보
WDIOC_GETSTATUS현재 WDIOF_* 상태
WDIOC_GETBOOTSTATUS부팅 시 상태
WDIOC_GETTEMP카드 온도
WDIOC_SETOPTIONS카드 활성화·비활성화
WDIOC_KEEPALIVEwatchdog ping

Revision A·C 드라이버가 제공하는 주요 제어입니다.

 Other IOCTL functions include:

        WDIOC_GETSUPPORT
                This returns the support of the card itself.  This
                returns in structure "PCWDS" which returns:

                        options = WDIOS_TEMPPANIC
                                  (This card supports temperature)
                        firmware_version = xxxx
                                  (Firmware version of the card)

        WDIOC_GETSTATUS
                This returns the status of the card, with the bits of
                WDIOF_* bitwise-anded into the value.  (The comments
                are in include/uapi/linux/watchdog.h)

        WDIOC_GETBOOTSTATUS
                This returns the status of the card that was reported
                at bootup.

        WDIOC_GETTEMP
                This returns the temperature of the card.  (You can also
                read /dev/watchdog, which gives a temperature update
                every second.)

        WDIOC_SETOPTIONS
                This lets you set the options of the card.  You can either
                enable or disable the card this way.

        WDIOC_KEEPALIVE
                This pings the card to tell it not to reset your computer.

문서 작성자

68-71

문서는 지원 ioctl 목록으로 설명을 마무리하며 작성자 Ken Hollis의 이름과 이메일을 남깁니다.

 And that's all she wrote!

 -- Ken Hollis
    (kenji@bitgate.com)