| 
 | 
|  | 
| 
 | 
| This document is available in: English ChineseGB Deutsch Francais Italiano Nederlands Russian Turkce | 
| ![[Photo of the Author]](http://main.linuxfocus.org/common/images/Guido-S.gif)  by Guido Socher (homepage) 关于作者: Guido 喜欢Linux不但因为了解操作系统如何工作是一件有趣的事,而且也应为沉迷于它的设计的人们 目录: | 
![[Illustration]](http://main.linuxfocus.org/common/images/article239/final_circuit_th.gif) 
摘要:
制作LCD控制面板 中揭示了如何尽最大可能构建一个基于微处理器的LCD控制面板 通常情况下我们不需要所有的特点,我们所构建的硬件很廉价(这个LCD控制面板是市场上已经商品化)并且具有和其他LCD屏不同的两个重要特点.
    #!/bin/sh
    PATH=/bin:/usr/bin:/usr/local/bin
    export PATH
    #
    # Monitor the disk
    # ----------------
    # check if any of the partitions are more than 80% full.
    # (crontab will automatically send an e-mail if this script
    # produces some output)
    df | egrep ' (8.%|9.%|100%) '
    #
    # Monitor the swap
    # A server should normally be dimensioned such that it
    # does not swap. Swap space should therefore be constant
    # and limited.
    # ----------------
    # check if more than 6 Mb of swap are used
    swpfree=`free | awk '/Swap:/{ print $3 }'`
    if expr $swpfree \> 6000 > /dev/null ; then
        echo "$0 warning! swap usage is now $swpfree"
        echo " "
        free
        echo " "
        ps auxw
    fi
    #
    # Monitor the network
    # -------------------
    # your _own_ IP addr or hostname:
    hostn="linuxbox.your.supercomputer"
    #
    if ping -w 5 -qn -c 1 $hostn > /dev/null ; then
        # ok host is up
        echo "0" > /etc/pingfail
    else
        # no answer count up the ping failures
        if [ -r /etc/pingfail ]; then
           pingfail=`cat /etc/pingfail`
        else
           # we do not handle the case where the
           # pingfail file is missing
           exit 0
        fi
        pingfail=`expr "$pingfail" "+" 1`
        echo "$pingfail ping failures"
        echo "$pingfail" > /etc/pingfail
        if [ $pingfail -gt 10 ]; then
           echo "more than 10 ping failures. System reboot..."
           /sbin/shutdown -t2 -r now
        fi
    fi
    # --- end of monitor script ---
1,15,30,45 * * * * /where/the/script/is
![[120 Ohm relay]](../../common/images/article239/linuxpcwd120_schematic_th.gif) 
 ![[500 Ohm relay]](../../common/images/article239/linuxpcwd500_schematic_th.gif) 
 ![[ne555]](../../common/images/article239/ne555_schematic.gif) 
 linuxwd -t /dev/ttyS0
让 linuxwd 运行在测试模式 (使用 /dev/ttyS1 如果您的硬件连接在COM2上). 
    计算机方向的 9 针D型插头。
| 9 PIN-connector | 25 PIN-connector | Name | Dir | Description | 
|---|---|---|---|---|
| 1 | 8 | CD | input | Carrier Detect | 
| 2 | 3 | RXD | input | Receive Data | 
| 3 | 2 | TXD | output | Transmit Data | 
| 4 | 20 | DTR | output | Data Terminal Ready | 
| 5 | 7 | GND | -- | System Ground | 
| 6 | 6 | DSR | input | Data Set Ready | 
| 7 | 4 | RTS | output | Request to Send | 
| 8 | 5 | CTS | input | Clear to Send | 
| 9 | 22 | RI | input | Ring Indicator | 
| 
 | 
| 主页由LinuxFocus编辑组维护 © Guido Socher, FDL LinuxFocus.org 点击这里向LinuxFocus报告错误或提出意见 | 翻译信息: 
 | 
2002-07-24, generated by lfparser version 2.25