요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
===================================
Berkshire Products PC Watchdog Card
===================================
Last reviewed: 10/05/2007
Support for ISA Cards Revision A and C
=======================================
Documentation and Driver by Ken Hollis <[email protected]>
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
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.
And that's all she wrote!
-- Ken Hollis
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`를 사용하거나 수정해 작성할 수 있습니다.
드라이버 발견부터 사용자 프로그램의 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 <[email protected]>
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합니다.
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
([email protected])
요약·해설
pcwd-watchdog.rst:1-71ISA PC Watchdog Revision A·C의 운용과 ioctl 인터페이스를 설명합니다.