こんなところか??
tswxl:/usr/local/sbin# cat lcdcontrol #!/bin/sh miconapl -a lcd_set_dispitem ipaddress date buffer0 buffer1 buffer2 buffer3 buffer4 buffer5 # buffer6 buffer7 miconapl -a lcd_changemode_auto while : do miconapl -a lcd_set_hostname `hostname` miconapl -a lcd_set_ipaddress `ifconfig eth0 | sed -n -e 's/^.*inet addr:\([1-9][0-9\.]*\).*$/\1/p'` # buffer0 load average # 07:58:38 up 1 min, 1 user, load average: 0.12, 0.04, 0.01 loadaverage=`uptime 2>/dev/null | sed -e 's/^.*load average: //'` # 1234567890123456 miconapl -a lcd_set_buffer0 "load average: $loadaverage" # buffer1 md0 # 012345678901234567890123456789012 # md0 : active raid1 sda1[0] sdb1[1] MD0=`sed -n -e 's/\[[01]\]//g' -e 's/active/active /' -e '/md0 /p' /proc/mdstat` miconapl -a lcd_set_buffer1 "$MD0" # buffer2 md1 MD1=`sed -n -e 's/\[[01]\]//g' -e 's/active/active /' -e '/md1 /p' /proc/mdstat` miconapl -a lcd_set_buffer2 "$MD1" # buffer3 md2 MD2=`sed -n -e 's/\[[01]\]//g' -e 's/active/active /' -e '/md2 /p' /proc/mdstat` miconapl -a lcd_set_buffer3 "$MD2" # buffer4 disk capacity # Filesystem 1K-blocks Used Available Use% Mounted on # /dev/md1 4921404 747916 3923492 17% / df | while read P T U A C M do case $M in /) # 1234567890123456789012 miconapl -a lcd_set_buffer4 "/dev/md1 $M $C" ;; /mnt) miconapl -a lcd_set_buffer5 "/dev/md2 $M $C" ;; *) ;; esac done #miconapl -a lcd_set_buffer0 sleep 60 done tswxl:/usr/local/sbin#
tswxl:/usr/local/sbin# crontab -e : : tswxl:/usr/local/sbin# crontab -l # m h dom mon dow command */5 * * * * nice /bin/sh /usr/local/sbin/fancontrol 2>/dev/null 1>/dev/null */10 * * * * nice /bin/sh /usr/local/sbin/lcdcontrol 2>/dev/null 1>/dev/null tswxl:/usr/local/sbin#
|
← LCD への表示(2) |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 〈スカパー! HD〉、東芝〈レグザ〉の録画に最適、残量メーター搭載、横置のテレビ用ネットワークHDD |