· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
torsmo

글쓴이 : 작은상자 (irc.hanirc.org #fluxbox)

잠시만요!!

torsmo는 현재 개발이 중단된 상태이며 포크버전인 conky가 나와있으니 conky를 쓰시는것을 적극 추천해드립니다. torsmo는 한글을 지원하지 않으며 conky는 지원합니다. 사용법은 똑같으니 밑에 글을 참고 하시면 됩니다!


torsmo란?

Torsmo는 가벼운 모니터링툴로 텍스트중심의 모니터링툴입니다. 배경화면에 글자가 오버레이 되는 방식입니다.




[http]스크린샷은 필자의 리눅스 스크린샷으로 이와 같이 떡칠해도 메모리는 1메가가량먹습니다.

설정파일 건들기 귀찮으신분은 [http]다운로드 하셔도 됩니다.

torsmo에서 제공되는 모니터링옵션은 다음과 같습니다.

  • 커널 버전
  • 업타임
  • 시스템 시간
  • 네트워크 정보
  • 메모리, 스왑 사용량
  • 호스트 이름
  • 머신
  • 시스템이름
  • i2c-센서
  • ACPI
  • 바데리 정보(ACPI/APM이용)
  • 프로세서정보
  • 로컬 메일
  • 파일시스템 사용률

이밖에 정보들은 쉘스크립트를 이용해서 확장이 가능합니다. (무선랜 수신율, Gmail확인, xmms, 날씨등)

파일 받는곳

설치법은 데비안,우분투, 젠투등에서는 소스리스트를 통해서 설치가 가능합니다.

소스포지에서 소스를 직접 다운로드하는 방법 [http]소스포지

Gentoo 리눅스 사용자 [http]젠투홈페이지 [http]젠투 포트에이지

Vector 리눅스 사용자 [http]패키지

최신버전의 개발용 버전 [http]CVS (모듈 'torsmo')

소스 설치법(직접 테스트는 안해봤습니다)

압축파일을 해제후에 해제한 디렉토리로 이동후에 다음 명령을 내립니다. 주의하실것은 소스설치시 옵션을 켜주어야만 설정파일에서 해당옵션을 사용하실수 있습니다.
./configure --enable-xft --enable-double-buffer --enable-proc-uptime --with-x --enable-seti
make
./torsmo

데비안 /우분투 의 설치

데비안 apt-get install torsmo 
우분투 sudo apt-get install torsmo

설정파일 수정

설치후 기본 설정파일이 없는 관계로 다음과 같이 셈플 설정파일을 복사해옵니다.
cp /usr/share/doc/torsmo/examples/torsmorc.sample.gz ~/
gunzip torsmorc.sample.gz
mv torsmorc.sample .torsmorc

기본설정파일에서 파일을 열어보면 테두리와 이것저것있기에 원하시는대로 수정하시면됩니다. 몇가지 옵션만 살펴보기록 하겠습니다.
nano ~/.torsmorc

font 9x15 		#폰트의 크기지정인듯한데 모르겠습니다~

use_xft yes		#xft를 사용여부 지정

xftfont eunjin-8	#사용하고자 하는 폰트명과 크기를 지정해줍니다.

Xftalpha 0.8		#폰트알파값 지정

gap_x 300		#torsmo가 찍히는 가로 좌표값을 정합니다.

gap_y 300		#torsmo가 찍히는 세로 좌표값을 정합니다.

update_interval 5.0	#업데이트 시간을 지정합니다.

own_window no	#torsmo가 창으로 표시될지 여부
그리고 제일 밑에 보시면 제일 중요한 모니터링할 항목들을 선택합니다. 제 설정파일 내용입니다. 참고하세요.
background no

font 9x15
font -artwiz-glisp-medium-r-normal--11-110-75-75-p-90-iso646.1991-irv

update_interval 5.0
own_window no

minimum_size 280 5

draw_shades yes

draw_outline yes

draw_borders no

stippled_borders 8

border_margin 4

border_width 1

default_color white
default_shade_color black
default_outline_color black

alignment top_right
gap_x 5
gap_y 5

no_buffers yes

uppercase no

TEXT
$nodename - $sysname $kernel on $machine
${color grey}UP Time:$color $uptime
${color grey}RAM Usage:$color $memperc% ${membar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
${color grey}Networking: Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s
${color grey}File systems:$color ${fs_bar 4 /}
${color grey}Battery:$color ${battery CMB1}

바데리 부분만 제외하면 다른 내용은 보통 주로 쓰이는내용입니다.

노트북을 사용하신다면 바데리 부분을 수정하셔야합니다.

일단 apmd 또는 acpid가 설치, 작동이 되어야합니다.

설치(데비안, 우분투기준) apt-get install apm 혹은 apt-get install acpi

실행은 기본적으로 실행되나 안되면 /etc/init.d/apmd start 혹은 /etc/init.d/acpid start

그리고 ${battery CMB1} 부분에 CMB1은 해당 노트북의 바데리 이름에 맞게 수정해주시면 됩니다.

일단 그냥 battery로 써주시고 안되면 /proc/acpi/battery/CMB1/처럼 battery디렉토리 밑에 디렉토리명을 써주시면 되겠습니다.

안타깝게도 한글은 지원하지 않고 영문으로만 써야합니다.

커맨드라인 옵션

torsmo를 터미널에서 실행할때 사용하는 옵션입니다.
 
torsmo -f Eunjin 
식으로 사용을 합니다.

V 버전을 확인합니다.
-a ALIGNMENT torsmo 위치지정, {top,bottom}_{left,right}
torsmo -a top_right 식으로 사용
-c FILE 설정파일 지정 기본적으로 $HOME/.torsmorc를 불러옵니다.
-d Daemonize, fork to background
-f FONT 해당폰트 지정
-h 커맨드라인 도움말 출력
-o 창으로 실행
-t TEXT Text to render, remember single quotes, like -t '$uptime'
-u SECS 모니터링 주기 지정
-w WIN_ID 원도우 아이디
-x X X 출력좌표 지정
-y Y Y 출력좌표 지정

torsmo 확장시키기

기본적으로 제공하지 않는 옵션을 쉘스크립팅을 이용 확장이 가능합니다.

IP주소 출력하기

1. 먼저 자신의 홈디렉토리에 .torsmo_ip 파일을 생성합니다.
nano .torsmo_ip

#!/bin/sh
/sbin/ifconfig eth0 | awk '/inet addr/ { split($2, x, /:/); print x[2]; exit; }'
2. .torsmo_ip의 권한을 수정합니다.
chmod 775 ~/.torsmo_ip
3. 자신의 설정파일에 다음줄을 추가합니다.
nano ~/.torsmorc
ip: ${execi 180 ~/.torsmo_ip}

날씨창 출력하기

1. http://weather.yahoo.com/forecast/ 들어가셔서 도시를 검색해주세요.

주요도시 검색결과 - [http]대구 [http]서울[http]부산[http]대전

이밖에 도시는 직접 영어로 도시명을 검색해주시면 되겠습니다.

검색방법은 Enter city or zip code: 란에 원하는 도시명을 영어로 칩니다.

at: 9:00 pm KST F° | C° 라고 검색결과가 나오는데

기본적으로 온도가 화씨로 나오니 C링크를 눌러서 섭씨로 바꾸어줍니다.

그리고 나서 lynx를 이용하기 위해서 Text Forecast버턴을 눌러줍니다.

이제 완성되었습니다. 해당페이지의 인터넷주소를 복사 또는 일단 기억해둡니다.


자신의 홈디렉토리에 tweather.sh 파일을 생성합니다. 여기서 주의를 하실점은 city= 부분을 자신의 도시명으로 바꾸어주시고 link= 부분을 아까 검색한 주소로 고쳐주시면 됩니다.(http://weather.yahoo.com/forecast/는 제외)

#!/bin/bash

   city="taegu"

   link=KSXX0026_c.html#text

   file=/tmp/weather.txt

   location=http://weather.yahoo.com/forecast/$link

   lynx -accept_all_cookies -dump $location > $file

   begin=`cat -n $file | grep "Currently" | cut -d ' ' -f5`

   end=`expr $begin + 40`


   head -n $end $file > tmp.t

   tail -n 41 tmp.t > $file

   case $1 in

      Today)  head -n 6 $file | sed '3d' ;;

      Tomorrow)

         begin=`cat -n $file | grep 'Today Tomorrow' | cut -d ' ' -f5`

         end=`cat -n $file | grep 'Extended' | cut -d ' ' -f5`

         num=`expr $end - $begin - 1`

         end2=`expr $begin + 7`

         head -n $end2 $file > tmp.t

         tail -n 3 tmp.t | sed 's/sky/\n sky/' | sed '4d' ;;
      *) exit ;;

   esac

   rm tmp.t

   rm $file
2. 자신의 .torsmorc파일에 다음줄을 추가합니다.
${color grey}Weather:
   $color${execi 1800 ~/tweather.sh Today}

   $color   Tomorrow:

   $color${execi 1800 ~/tweather.sh Tomorrow}
3. 실행가능하게 퍼미션을 바꾸어줍니다.
chmod 755 ~/tweather.sh

4. lynx를 이용하는 것이라서 설치가 안되어있으면 설치를 해주세요.
apt-get install lynx

로그인 유저명 출력하기

1. 자신의 홈디렉토리에 .torsmo_users파일을 생성합니다.
#!/bin/sh
who | awk '{print $1}' | uniq -c | wc -l
2. 실행가능하게 퍼미션을 바꾸어줍니다.
chmod 775 ~/.torsmo_users
3. .torsmorc파일에 다음줄을 추가합니다.
Current users: ${execi 8 ~/.torsmo_users}

무선인터넷 연결품질 출력

1. 홈디렉토리에 .torsmo_wifi 파일을 생성합니다.
#!/bin/bash

/usr/sbin/iwconfig ath0 | grep Link | sed  's/^[ \t]*//;s/[ \t]*$//'

# if the above doesn't work for you, try this (I guess it has something to do with the new baselayout):

#/usr/sbin/iwconfig ath0 | sed 's/ /\n/g' |grep Quality|sed 's/Quality=//g'

2. 퍼미션을 수정합니다.
chmod 775 ~/.torsmo_wifi 

3. .torsmorc파일에 다음을 추가합니다.
Link: ${exec ~/.torsmo_wifi} 

기타 참고 주소

XMMS 상태 출력하기, G메일 상태 출력하기 http://forums.gentoo.org/viewtopic-t-291835-highlight-torsmo tips.html

torsmo 공식홈페이지 http://torsmo.sourceforge.net/


torsmo 포크버전 (살짝보니 torsmo의 업그레이드버전이네요. 그래프도 지원을 하고 맘에드시는분 위키 좀 써주세요. 저는 torsmo가 맘에 들고 귀차나서 안쓸래요 >_<) http://conky.rty.ca/

우분투 torsmo 위키 DeleteMe [http]http://ubuntu.or.kr/wiki.php/Torsmo에 살짝 다듬은 버전이 있습니다. :) --디토

* 이 문서는 [http]kldp, [http]데비안유저스, [http]ubuntu위키, [http]fluxwiki에 있으며 kldp가 최신갱신일 가능성이 있습니다.

의견


captcha
Username:

ID
Password
Join
Of all forms of caution, caution in love is the most fatal.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-02-24 22:08:11
Processing time 0.0093 sec