LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-10-2005, 02:12 PM   #1
Slum
Member
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Slackware w/ bleeding edge kernel.
Posts: 37

Rep: Reputation: 15
Torsmo Tips & Tricks


For those of you that don't know:

What is Torsmo?

Torsmo is a system monitor that sits in the corner of your desktop. It's very simple, customizable and it renders only text on the desktop (and percentagebars if you want it to and the only lib it uses is Xlib.
Torsmo can show various information about your system and it's peripherals, including:

* Kernel version
* Uptime
* System time
* Network interface information
* Memory and swap usage
* Hostname
* Machine, i686 for example
* System name, Linux for example
* Temperatures from i2c-sensors
* Temperature from ACPI
* Battery capacity from ACPI/APM
* Number of processes running or sleeping
* Local mails (unread and all)
* Filesystem stats

Let's post some tricks that we've either come across or figured out about the beloved Torsmo system monitor.

Action shot: http://slum3.tripod.com/images/shot.jpg
(copy and paste the url, tripod doesn't allow hotlinking.)

You can get Torsmo from http://torsmo.sourceforge.net

Last edited by Slum; 07-10-2005 at 02:31 PM.
 
Old 07-10-2005, 02:14 PM   #2
Slum
Member
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Slackware w/ bleeding edge kernel.
Posts: 37

Original Poster
Rep: Reputation: 15
My .torsmorc

Here's my ~/.torsmorc file:
Code:
# torsmo configuration

# set to yes if you want tormo to be forked in the background
background no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont verdana-11

# Text alpha when using Xft
xftalpha 0.8

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 2.0

# Create own window instead of using desktop (required in nautilus)
own_window no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 280 5

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color black

# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 12
gap_y 12

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# boinc (seti) dir
# seti_dir /opt/seti

# stuff after 'TEXT' will be formatted on screen

TEXT
${color grey}CPU Usage:$color
  $cpu% ${cpubar 6}
${color grey}RAM Usage:$color $mem/$memmax
  $memperc% ${membar 6}
${color grey}Swap Usage:$color $swap/$swapmax
  $swapperc%   ${swapbar 6}
${color grey}HDD: $color${fs_free /}/${fs_size /}
  $fs_free_perc% ${fs_bar 6 /}
${color grey}Networking:
   Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s
${color grey}Temperatures:
   CPU:$color ${exec .ctof.sh proc}F${color grey} :: MB:$color ${exec .ctof.sh mobo}F${color grey}
${color grey}Juice:
   Vcore:$color ${i2c 1-002d in 0}V
${color grey}CPU Fan:$color ${i2c 1-002d fan 1} rpm
${color grey}Uptime:$color $uptime
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}Weather :${color}
${execi 1800 .tweather.sh Today}
$hr
${color grey}Tomorrow :${color}
${execi 1800 .tweather.sh Tomorrow} 
$hr
 
Old 07-10-2005, 02:15 PM   #3
Slum
Member
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Slackware w/ bleeding edge kernel.
Posts: 37

Original Poster
Rep: Reputation: 15
Celcius to Fahrenheit conversion.

My i2c sensors were only outputting Celcius temperatures. Being that I live in the US and the Metric System is like Greek to me, I decided to write a bash script to work with Torsmo to convert those temperatures to Fahrenheit.

Here's my .torsmorc
Code:
${color grey}Temperatures:
   CPU:$color ${exec .ctof.sh proc}F${color grey} :: MB:$color ${exec .ctof.sh mobo}F${color grey}

Here's the .ctof.sh script:
Code:
#!/bin/bash

case $1 in
proc)
i=`cat /sys/bus/i2c/devices/1-002d/temp1_input`
echo "$i / 1000 * 1.8 + 32" | bc
;;
mobo)
d=`cat /sys/bus/i2c/devices/1-002d/temp2_input`
echo "$d / 1000 * 1.8 + 32" | bc
;;
*) exit;;
esac
You might have to edit the /sys/bus/i2c/devices line to match your configuration, afterwards you can test the script by running:

sh .ctof.sh mobo
sh .ctof.sh proc

Enjoy!
 
Old 12-27-2005, 07:04 PM   #4
Slum
Member
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Slackware w/ bleeding edge kernel.
Posts: 37

Original Poster
Rep: Reputation: 15
bump up...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IRC tips/tricks? ValidiusMaximus Linux - Software 8 07-25-2005 02:56 PM
Gentoo - Secutiry Tips & Tricks? CrapBag Linux - Security 3 07-10-2005 12:18 PM
Slackware tips and tricks monkeymartin Slackware 3 11-12-2003 04:17 AM
Tips and Tricks Westdog976 LQ Suggestions & Feedback 8 07-14-2003 12:24 PM
Tips and Tricks Section trickykid LQ Suggestions & Feedback 1 06-22-2001 01:14 PM


All times are GMT -5. The time now is 08:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration