old-www/LDP/LG/issue23/issue23.html

10624 lines
437 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> Linux Gazette Index Page </TITLE>
<META NAME="robots" CONTENT="noindex, nofollow">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000" >
<center><H2><IMG SRC="../gx/newlogo.jpg"
ALT="Linux Gazette... making Linux just a little more fun!">
</H2>
<H5>Copyright &copy; 1996-97 Specialized Systems Consultants, Inc.</H5>
</center>
<P> <HR> <P>
<!--==================================================================-->
<center>
<H1>Welcome to Linux Gazette!<img src="../gx/tm.gif" alt="(tm)"></H1>
</center>
<P> <HR> <P>
<!--==================================================================-->
<H1>Published by:</H1>
<center>
<H1><A HREF="http://www.ssc.com/lj/">
<img src="../gx/ljlogo.gif" alt="Linux Journal"></A></H1>
</center>
<P><HR> <P>
<H1>Sponsored by:</H1>
<table>
<tr>
<td><H1><A HREF="http://www.infomagic.com/"><img ALIGN="bottom" HSPACE="70"
src=../gx/infologo.gif alt="InfoMagic"></A></H1></td>
<td>
<H1><A HREF="http://www.suse.com/"><img ALIGN="bottom" src=../gx/suse.gif alt="S.u.S.E."></A></H1></td>
<td>
<H1><A HREF="http://www.redhat.com/"><img HSPACE="70" src=../gx/redhat.gif alt="Red Hat"></A></H1></td>
</tr>
</table>
<P>
Our sponsors make financial contributions toward the costs of
publishing <I>Linux Gazette</I>. If you would like to become a sponsor
of <I>LG</I>, e-mail us at <A
HREF="mailto:sponsor@ssc.com">sponsor@ssc.com</A>.
<P> <HR> <P>
<!--=================================================================-->
<H1 align="center">Table of Contents <BR>December 1997 Issue #23</H1>
<P> <HR> <P>
<table><tr>
<td rowspan=4>
<UL>
<LI><A HREF="../index.html">The Front Page</A>
<LI><A HREF="./lg_mail23.html">The MailBag</A>
<ul>
<li><a HREF="./lg_mail23.html#ideas">Article Ideas</a>
<li><a HREF="./lg_mail23.html#help">Help Wanted</a>
<li><a HREF="./lg_mail23.html#gen">General Mail</a>
</ul>
<LI><A HREF="./lg_tips23.html">More 2 Cent Tips</A>
<ul>
<li><a HREF="./lg_tips23.html#spin">Spinning Down Unused HDs</a>
<li><a HREF="./lg_tips23.html#find">Finding What You Want with find</a>
<li><a HREF="./lg_tips23.html#cutpaste">Cutting and Pasting Without a Mouse</a>
<li><a HREF="./lg_tips23.html#slow">Slow Modem</a>
<li><a HREF="./lg_tips23.html#string">Finding Strings with find</a>
<li><a HREF="./lg_tips23.html#calc">Another Calculator Tip</a>
<li><a HREF="./lg_tips23.html#laptop">Upgrading a Laptop Hard Disk</a>
<li><a HREF="./lg_tips23.html#wall">Wallpaper</a>
<li><a HREF="./lg_tips23.html#post">PostScript</a>
<li><a HREF="./lg_tips23.html#virtual">Linux Virtual Console Key Sequences</a>
<li><a HREF="./lg_tips23.html#hidden">Netscape Hidden "Easter Eggs"</a>
</ul>
<LI><A HREF="./lg_bytes23.html">News Bytes</A>
<ul>
<li><a HREF="./lg_bytes23.html#general">News in General</a>
<li><a HREF="./lg_bytes23.html#software">Software Announcements</a>
</ul>
<LI><A HREF="./lg_answer23.html">The Answer Guy</A>, by James T. Dennis
<ul>
<li><a HREF="./lg_answer23.html#monitor">Running Multiple Instances of X</a>
<li><a HREF="./lg_answer23.html#madness">VC Madness</a>
<li><a HREF="./lg_answer23.html#ospf">Linux and OSPF</a>
<li><a HREF="./lg_answer23.html#pop">Security Problems with pop3</a>
<li><a HREF="./lg_answer23.html#crypt">Cryptographic System</a>
<li><a HREF="./lg_answer23.html#ref">An Interesting De-Referencing Problem</a>
<li><a HREF="./lg_answer23.html#remind">Reminder!</a>
<li><a HREF="./lg_answer23.html#pcmcia">pcmcia ide Drives</a>
<li><a HREF="./lg_answer23.html#kde">KDE BETA 1</a>
<li><a HREF="./lg_answer23.html#program">Compression Program</a>
<li><a HREF="./lg_answer23.html#loadlin2">loadlin</a>
<li><a HREF="./lg_answer23.html#wipe">WipeOut</a>
</ul>
<LI><A HREF="./boulder.html">Boulder Linux Users Group</a>, by Wayde Allen
<LI><A HREF="./clue.html">Clueless At The Prompt</a>, by Mike List
<LI><A HREF="./comdex.html">COMDEX/Fall '97</a>, by Carlie Fairchild
<li><A HREF="./procmail.html">Configuring procmail with The Dotfile
Generator</A>, by Jesper Pedersen
<LI><A HREF="./gm.html">Graphics Muse</A>, by Michael J. Hammel
<LI><A HREF="./bench2.html">Linux Benchmarking: Part 2 -- Practical Concepts</a>,
by Andr&eacute; D. Balsa
<LI><A HREF="./cftp.html">New Release Reviews</A>, by Larry Ayers
<ul>
<li><A HREF="./cftp.html">Comfortable Ftp</a>
<li><A HREF="./tkman.html">TkMan</A>
</ul>
<li><A HREF="./flower/page1.html">Processes on Linux and Windows NT</A>, by Glen Flower
<li><A HREF="./shoham/drafth.html">Roll your own DBMS?!?</A>, by Idan Shoham
<li><A HREF="./successtory.html">Unioncamere Emilia-Romagna: an Italian
Public Administration Using Linux</A>, by Giamaolo Montaletti
<LI><A HREF="./wkndmech_dec97/wkndmech.html">Weekend Mechanic</A>, by John Fisk
<LI><A HREF="./x3270.html">x3270 and Linux</A>, by Chris Mason
<LI><A HREF="./lg_backpage23.html">The Back Page</A>
<ul>
<li><a HREF="./lg_backpage23.html#authors">About This Month's Authors</a>
<li><a HREF="./lg_backpage23.html#notlinux">Not Linux</a>
</UL>
</UL>
</td>
</tr><tr>
<td align=center>
<A HREF="lg_answer23.html">
<img src="../gx/wizard2.gif" border=0 alt="">
</a>
<A HREF="lg_answer23.html"><i>The Answer Guy</i></a>
</td>
</tr><tr>
<td align=center>
<A HREF="gm.html">
<IMG SRC="../gx/hammel/banner-3.gif" border=0 alt="">
</a>
</td>
</tr><tr>
<td align=center>
<img src="../gx/fisk/mechanic.gif" border=0 alt=""><BR>
<A HREF="./wkndmech_dec97/wkndmech.html"><I>The Weekend Mechanic</I></a>
</td>
</tr><tr>
</table>
<P> <HR><P>
<!--=============================================================-->
<A HREF="./issue23.txt">TWDT 1 (text)</A><BR>
<A HREF="./issue23.html">TWDT 2 (HTML)</A><BR>
are files containing the entire issue: one in text format, one in HTML.
They are provided
strictly as a way to save the contents as one file for later printing in
the format of your choice;
there is no guarantee of working links in the HTML version.
<!--=============================================================-->
<P> <HR><P>
Got any <I>great</I> ideas for improvements! Send your
<A HREF="mailto:gazette@ssc.com">comments, criticisms, suggestions
and ideas.</A>
<P><hr><p>
This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P><hr><p>
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<HR>
<center>
<table width="100%" cellpadding=7><tr><td>
<H2><a NAME="mail"><IMG SRC="../gx/mailbox.gif" ALIGN=MIDDLE ALT=" ">
The Mailbag!</a> </H2>
Write the Gazette at <A HREF="mailto:gazette@ssc.com"> gazette@ssc.com</A>
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_mail23.html#ideas">Article Ideas</a>
<li><a HREF="./lg_mail23.html#help">Help Wanted</a>
<li><a HREF="./lg_mail23.html#gen">General Mail</a>
</ul>
</td></tr></table>
</center>
<a name="ideas"></a>
<p><hr><p>
<!-- ===================================================================-->
<center><H3> Article Ideas </H3></center>
<P> <HR> <P>
<!--====================================================================-->
<center><IMG ALT=" " SRC="./gx/iwantyou.gif"></center>
<P>
We're back in business after a one month gap--no November issue--and we
need articles from you.
<P>
So, all you budding authors and Linux users out there,
send me your material. Don't depend on our regular authors to fill the gap. We
want to hear about all the neat tips and tricks you've found, as well as
all the neat applications you are writing or working with. We also like to
hear how you are using Linux as a workplace solution. --Editor
<P> <P> <P> <P>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 06 Oct 1997 01:40:46 +0100 <br>
From: Emmet Caulfield <a href="mailto:emmet@indigo.ie">emmet@indigo.ie </a><br>
Subject: Newbie Stuff
<p>
Hi,
<p>
I've noticed recently that there's an increasing volume of
questions on fairly elementary topics to your help page.
<p>
There's probably a fairly large volume of readers, like myself,
who correspond with the querants offering help, pointers, and
suggestions in the hope that they may be useful. I'm NOT an expert,
by any stretch of the imagination, being a recent "convert" of
only 10 months vintage.
<p>
I think that there is an argument for the Gazette running a
series of articles outlining a step-by-step setup procedure
specifically targetted at people setting up Linux on home
machines connected over the POTS in spite of the fact that
this would be duplicating efforts elsewhere (in HOWTOs and
such).
<p>
Just a suggestion.
<p>
I love the Gazette, you have struck a fine balance well - there
is something for everyone. I read 22 "cover to cover".
<p>
Keep up the good work,
<p>
Emmet
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 15 Oct 1997 18:28:05 -0700 <br>
From: Todd Martin <a href="mailto:zombie@ted.org">zombie@ted.org </a><br>
Subject: System Back up
<p>
I would love to see an article on backing up a Red Hat 4.2 system onto a
SCSI Tape drive.
<p>
I'm having trouble with it, and am finding information on it rare if not
impossible to find.
<p>
If anyone could point me in the right direction I would appreciate it.
<p>
Or contact me direct if its easy enough to explain.
<p>
Thanx
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 13 Oct 1997 21:13:24 -0500 <br>
From: "Cochran" <a href="mailto:scochran@shoalsnet.com">scochran@shoalsnet.com </a><br>
Subject: Article Idea
<p>
Hello,
I'm a Linux newbie so please forgive any inaccuracies. :) I think
someone should report on the Linux game scene. Different projects that are
dealing with game projects like GGI and the Linux GDK. Keep the good work
up everyone.
<p>
Micah
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 14 Oct 1997 18:54:41 -0500 <br>
From: Glenn Meuth <a href="mailto:manderflawaxe@Dynasty.Net">manderflawaxe@Dynasty.Net
</a><br>
Subject: LJ Howto get TECH Info for NEWBIES
<p>
I have been reading LJ recently, and I would like to request that an
article be written. I have recently had (2) problems which I
researched, and only seemed to find dead ends for. I purchased a new
computer recently :-) and, as is probably common with such, had some
unsupported hardware. This did not surprise me, having worked with
computers for some time. So I proceeded to search hardware listings,
currently active projects, etc in order to find an answer, and found
nothing. (My problem was with my UDMA harddrive controller card from
Promise.) I began to email news groups and Promise trying to get the
information I needed to write the code for the controller card myself.
I could not seem to dig up any help on the subject of support for new
hardware. My question: Could you please address an article on how to go
about attaining the information necessary to code this?
Q(2) Could you also address how to get involved in the linux project?
<p>
I have tried to get involved with projects (I am a relatively new C++
programmer (2 years)), in college, and there is little for me to do in
my area of the USA in order to exercise my C & C++ skills. If you could
help me out here I would appreciate it!
<p>
Glenn Meuth
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 5 Nov 1997 04:11:55 -0800 (PST) <br>
From: Ron Culver <a href="mailto:ronc@earthlink.net">ronc@earthlink.net </a><br>
Subject: COMMENTS/SUGGESTION
<p>
Hi Folks,
<p>
First want to say I'm really glad the Gazette is on line... what
a great source for finding out new things! Keep up the great
work - it's a real winner. Next, want to suggest some needs on
this end you might find useful as an idea for a feature. I run
a real tiny ISP biz in NM (my hometown, but live in CA) - and have
LOTS of questions related to running the system (do sysadmin via
telnet) - primarily system security issues, keeping the email
system running right, HTTPD (actually run Apache) questions,
and DNS issues. What has most plagued me is the lack of a fresh
source of info to keep the system on the 'cutting edge' of new
developements in software. One example is Java, something that
came along shortly after the server was first installed, which
I can not seem to get to run properly - and to date no one can
tell me why. What I would like to see you try is a column that
addresses the questions/concerns of small POP's or ISP's - actually
anyone who is running Linux as a server on line would have similar
questions/concerns.
<p>
Have a nice....
<p>
Ron Culver
<a name="help"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3> Help Wanted </H3></center>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sun, 12 Oct 1997 02:34:26 +0200 <br>
From: Guillermo S. Romero <a href="mailto:famrom@ran.es">famrom@ran.es </a><br>
Subject: Clipboard Ideas <br>
<p>
Hello:
<p>
I am a bit new to Linux and my programming skills are poor (time solves
everything), but I have brain (well, 2 overclocked neurons) and I think that
Linux (and Unix) have a problem with "cut & paste", aka clipboard. GPM is
fine, xclipboard too, some other systems also work, but its hard to move
from one system to another, and not all data can be copied.
<p>
I want to start a team to implement a clipboard in Unix, maybe using files
stored under something like /tmp/clip/ (or another /dev/foo?). :]
<p>
The main thing is that it should be able to work with text, graphics and
binary (archives, ie), like other OS do. I think that if we use a system
based in /dev/ , the system will support old apps (you only have to save to
the correct place emulating an app behaviour, and a demon will convert non
standard files to the ones supported by the clipboard). We can even made the
new clipboard a multiuser one. Or one with multiple buffers per user (like
Emacs, doesn't it?).
<p>
If someone is interested, just write. I have a draft so we can start the
discussion now. I must admit that my idea maybe look mad or too simple, but
that only demonstrates that I believe that usefullnes is directionaly
proportional to simplicity. :]
<p>
GSR
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 18 Nov 1997 11:10:08 -0500 <br>
From: Dan E. Collis <a
href="mailto:dcollis@marine.usf.edu">dcollis@marine.usf.edu </a><br>
Subject: Adaptec 2940 UW adapter
<p>
I am drowning! Have called Adaptec to no avail. They say they're not
supporting Linux. Have tried all the loc's on redhat.com that I can
find and have had no luck.
<p>
Is there a driver available for an Adaptec 2940UW that's good for RedHat
4.2? I'd sure appreciate some help on this one.
<p>
Many thanks,
<p>
dcollis@marine.usf.edu
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 10 Nov 1997 12:23:45 -0700 <br>
From: Chad Peyton <a
href="mailto:chadly@cs.WNMU.EDU">chadly@cs.WNMU.EDU</a><br>
Subject: PPP
<p>
I'm trying to configure a ppp connection. So far the program mgetty
has got most things working. I don't know much about Linux, but this is
what I think I need to do: get the shell to run the following command.
<p>
Puser - - /usr/sbin/pppd auth -chap +pap login kdebug 7 debug
<p>
But notice the message I get below when I call in:
<p>
Red Hat Linux release 4.2 (Biltmore)
Kernel 2.0.27 on an i486
<p>
login: chad <br>
Password: <br>
Last login: Fri Nov 7 15:36:54 on ttyS0 <br>
Warning: no access to tty (Not a typewriter).
<p>
Thus no job control in this shell.
It says that the shell isn't working or something. Do I need to get tty
working or what? How do I do that?
<p>
Also, after I logout the program quits on me. Is there a way to make
mgetty keep working after someone hangs up? Also is there a way to make
mgetty load at boot time?
<p>
Can you help me PLEASE,
<p>
Chad
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sun, 09 Nov 1997 00:46:33 -0200 (br>
From: Javier Salem <a
href="mailto:bbscom@totalnet.com.ar">bbscom@totalnet.com.ar </a><br>
Subject: I need some help
<p>
I'm new using Linux but I learn so quicky.
I just downloaded Communicator for Linux tar version and did all the
installation steps,
but I don't understand how to set the environment variable
setenv.
I think that it's my problem because I can't see Netscape when I open
xwin,
so I can't use it yet
<p>
My name is Javier from Argentina.
I 'll be pleased if somebody could give me a hand.
Really thanks.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sat, 08 Nov 1997 09:37:44 -0800 <br>
From: Ted Rolle <a
href="mailto:ted.rolle@usa.net">ted.rolle@usa.net</a><br>
Subject: Accessing Win95 vfat drive
<p>
I've compiled vfat support into my 2.0.31 kernel. How do I mount the
drives so Linux can "see" the Win95 partition?
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 08 Oct 1997 13:47:17 PDT <br>
From: "HoonChul Shin" <a
href="mailto:hoonchul@hotmail.com">hoonchul@hotmail.com</a><br>
Subject: Video woes
<p>
Greetings to every Linux lover!
<p>
When I run XFree86 ver. 3.2 with resolutions more than 640x340, and open
menus and move windows around, I see white lines or streaks in my
screen. It's very annoying. And when I exit Xwindows, and return to
text mode, screen becomes impossible to read. Fonts just become nasty.
Is there anyone out there with same problems that I am having now?
Video Card= Trident TGUI 9682 with 2 mb.
<p>
Thanks!
<p>
Hoon Chul
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 11 Nov 1997 12:51:25 +0200 <br>
From: Ihab Khoury <a
href="mailto:ikhoury@jrol.com">ikhoury@jrol.com</a><br>
Subject: NetFlex driver..
<p>
Greetings,
<p>
I am trying to install RH4.2 on a compaq Proliant 2500.
I have a NetFlex card built in and unable to read it..I saw that few
poeple have posted this before ..I was not able to find the driver.
Please e-mail me at ikhoury@jrol.com if you have any solutions.
Thank you in advance.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 11 Nov 1997 11:52:48 +0100 <br>
From: Sven Goersmann <a
href="mailto:goersman@student.uni-kassel.de">goersman@student.uni-kassel.de</a><br>
Subject: scanner driver or scanner codes for RELISYS Infinty/Scorpio VM3550
<p>
Hi everybody there!
<p>
I just want to ask you if you know there's a Linux scanner driver for
the RELISYS Scanner Scorpio VM3550 from the Infinity series, and if so
where can I get it.
<p>
Thanks in advance, Sven.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 11 Nov 1997 13:32:34 -0000 <br>
From: Roger Farrell <a href="mailto:rogerf@icon.co.za">rogerf@icon.co.za</a><br>
Subject: Emulators
<p>
Hi,
<p>
I am looking for emulators that support the 8088 and 80188 chips.
<p>
lf you can help please reply.
<p>
Regards
Roger Farrell
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Fri, 10 Oct 1997 02:08:44 PDT <br>
From: Gilberto Persico <a
href="mailto:g_persico@hotmail.com">g_persico@hotmail.com</a><br>
Subject: Transaction Processing
<p>
Have you ever heard of Transaction Processing systems (such as CICS or
Encina or Tuxedo) available (free or commercial) for Linux ???
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 03 Nov 1997 19:06:53 +0100 <br>
From: Fabrizio <a
href="mailto:fabrizio@euro2001.com">fabrizio@euro2001.com</a><br>
Subject: chat
<p>
HI!
<p>
I am looking for a chat program for Unix.
Can you send to me some tips about this?
<p>
Thank you and best regards.
<p>
Fabrizio Piccini
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Sun, 2 Nov 1997 02:04:28 +1100 (EST) <br>
From: Shao Ying Zhang <a
href="mailto:s2193893@cse.unsw.edu.au">s2193893@cse.unsw.edu.au</a><br>
Subject: Sorry! - RE: SB16 and MIDI
<p>
I am sorry for this second mail; I forgot to tell you what the problem
is. OK, the problem is that it plays without returning any errors, but simply
no sound comes out.
<p>
Thanks very much!
<p>
I am using Sound Blaster 16 for my system. My Linux version is
Redhat 4.2 with the kernel 2.0.30.
<p>
I recompiled the kernel properly (I think) to make my SB16 work. It
now can play wave, mod, CD but NOT MIDI.
<p>
I can only use timidity to convert them into wave and then play.
This means that /dev/sequencer does not work properly.
<p>
I have also noticed that a couple of other friends have the same
problem.
<p>
Could you help me PLEASE???
<p>
Thanks in advance!
<p>
Shao Zhang <br>
2/896 Anzac PDE <br>
Maroubra 2035 <br>
Australia
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 29 Oct 1997 19:51:44 +0900 <br>
From: "Chun, Sung Jin" <a
href="mailto:ninja@aerohel.snu.ac.kr">ninja@aerohel.snu.ac.kr</a><br>
Subject: [Q] PCMCIA IBM CD-400 Help me.
<p>
I want to access cd-rom using my IBM cd-400 PCMCIA
CDROM. But I don't know how can I do this.
Please help me.
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 27 Oct 1997 14:07:47 -0800 <br>
From: "Possanza, Christopher" <a
href="mailto:norvien@halcyon.com">norvien@halcyon.com</a><br>
Subject: HELP! Possible to use parallel port tape drives with linux?
<p>
Does anyone know if it's possible to use parallel port tape drives to
backup a Linux system?
I've got the HP Colorado T1000e drive, and I'd love to be able to use
it... Any suggestions?
<p>
Christopher Possanza
<a name="gen"></a>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3> General Mail </H3></center>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 06 Oct 1997 18:24:12 GMT <br>
From: Harry Baecker <a
href="mailto:hbaecker@island.net">hbaecker@island.net</a><br>
Subject: Word Processing & Text Processing
<p>
In his article in Issue 22, subject as above, Larry Ayers indulges in
the requisite Unixworld denigration of word processor software and
its users, as contrasted with the virtues of software "which allows
the writer to focus on content rather than appearance". I suggest that
there are some errors in this ritual obeisance to received wisdom.
<p>
The first is that all who yearn for the services of a word processor lust
to inflict another Gibbon, "The History of the Decline and Fall of the
Roman Empire", or Russell & Whitehead "Principia Mathematica" upon the
world. Were that so then the world would be more than hip deep in
rejected typescripts already. Rather, I, and I am sure most others,
wish to prepare snailmail with some attention to personalised format
and typography, which is exactly what a reasonable word processor
provides. I certainly do not look for the archetypal offense in Ayers'
universe of discourse, Microsoft Word for Windows. I have borrowed,
used, and rejected that, and I have owned, and given away AmiPro
(WordPro) and abhorred Word Perfect since its inception. What I would
like to use in Linux is some clone of Wordpad, of MS-Write, or of the
word processors included with MS-Works or ClarisWorks, wherein I can
govern not only the content but also the appearance of my message.
<p>
It is true that Lyx seems to be a reasonable compromise, unless you
find, as I do, that the assumptions built into its templates are
displeasing to the eye.
<p>
The second error is to assume as gospel the correctness of Unix
conventions for ASCII text. The ASCII encoding was officially adopted
by ISO in 1964. That included provision for the CR/LF pair, and a
functional backspace (not left-erase). Anyone familiar with hardcopy
terminals of the time, such as Flexowriters, will also remember the
joys of "line reconstruction" procedures, to encode, say, lines of
Algol 60 program text, in a useful internal representation. Tortuous,
but that's what we expect computers to do for us.
<p>
The text representation conventions of Unix were born together with
the limited representational capabilities of video terminals,
character generators with limited repertoires, no "backspace and
overtstrike" abilities, hence no way of effecting backspace or CR.
By the time proper graphic facilities, and hence font choices, became
available the Unix conventions for ASCII text had ossified, and the
flexibility actually made available by the original ASCII conventions
were treated with disdain. Had Unix embraced the full flexibility
offered by the ASCII encoding then things might have been otherwise.
<p>
Harry Baecker
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Tue, 14 Oct 1997 14:26:20 -0400 (EDT) <br>
From: Paul Lussier <a
href="mailto:plussier@baynetworks.com">plussier@baynetworks.com</a><br>
Subject: Thanks!
<p>
Hi,
<p>
I've been reading the LG since issue 1 when I first stumbled upon John
Fisk's web page from an Alta Vista search for Linux info. All of you at
SSC have done an unbelievably outstanding job with both LJ and LG, and I
just wanted to say thanks. I look forward to the first week of every
month when there is a new LG to grab off the net, and a new LJ waiting in
my mailbox. I read them both cover to cover each and every month.
<p>
I do Unix sysadmin for a living and still benefit from so much of what is
originally written with Linux in mind and am able to reuse it on other
"Unices" as well.
<p>
Also, I just checked out CANLUG On-line magazine. It's not bad. Maybe
you people (and the rest of us too) who have done such a terrific job with
LG, can give them a hand getting their's off the ground. After all,
the whole spirit of the Linux community is helping one another :) And we
can all benefit from another on-line, enjoyable source of Linux news and
info :)
<p>
Thanks again!
<p>
Happy Linuxing,
<p>
Seeya,<br>
Paul
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Fri, 07 Nov 1997 21:05:22 -0800 <br>
From: Andrew T. Young <a
href="mailto:aty@mintaka.sdsu.edu">aty@mintaka.sdsu.edu</a><br>
Subject: word vs. text processing
<p>
While reading Larry Ayres's comments (mostly quite sound) about TeX,
LOUT, groff, etc., I noticed he was sort of behind the curve on *roff.
<p>
First, there are several *good* books on this family of text processors.
I have <I>troff Typesetting for UNIX Systems</I> by Sandra L. Emerson and
Karen Paulsell (Prentice-Hall, 1987), as well as <I>UNIX Text
Processing</I>
by Dale Dougherty and Tim O'Reilly (Hayden Books, 1987). In addition
there is a rather specialized book on the tbl pre-processor called
something like "setting tables with tbl" -- I don't seem to be able to
lay hands on it right now. (I might add that I consider tbl to be
considerably superior to LaTeX's clumsy handling of tabular material.)
<p>
After you read these books, it's easy to make up a set of formatting
macros that do for the *roff family exactly what LaTeX does for TeX.
You can then invoke these very much the way the LaTeX macros are
invoked; indeed translation from the *roff to the *TeX markup is pretty
easy at that point (though there are a few subtleties that cause
problems). LaTeX has a very few advantages for very esoteric
mathematical equations; apart from that, the systems are very similar.
<p>
Yes, the underlying engine is opaque as hell to figure out;
nevertheless, it's powerful and effective. I still prefer *roff to
LaTeX, but have been forced to live with *TeX because the journals I use
all employ it.
<p>
One more historical item: Larry called nroff "newer" than troff, but
it's the other way around. Originally, there was some formatter called
roff (short for runoff); then came nroff for "new runoff" and then
*later* came troff for typesetting.
--
Andrew T. Young
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Mon, 3 Nov 1997 09:17:40 -0500 <br>
From: Jack Chaney <a href="mailto:jac14@chrysler.com">jac14@chrysler.com</a><br>
Subject: new_user_setup
<p>
Hi,
<p>
I too am a relative newbie (again) to Linux but am sold on a lot of the
conceptual aspects of the system (shareware, GNU, free downloads, world
wide support, etc.) I am also quite comfortable with the stability and
security of the OS. I'm not, however, satisfied with the quality of
support for new users or "non-experts."
<p>
My argument is this, if you are trying to compete in the world market
with the IBM's and Microsoft's you need to study what it is that made
them so popular in the first place. Availability of applications,
which Linux is doing a much better job addressing, is one of the
pieces that make them so prominent, but it's only one of the pieces.
The popularity of WIN95 in particular is due to the ease of installation of
the wanted systems and applications, and the focus on the end user.
<p>
In the world of computer users the highest percentage of computers are set
up as single user systems linked to a network, or some central server
and/or ISP. The majority of documentation material for Linux has done
an excellent job of describing how to create and maintain the system as
a central server, but very little copy is devoted to running Linux as a
client station. Red Hat and others have made great strides toward
making the install process as painless as possible (my first install
attempt was back in the 0.98 days). I am able to get most of the
systems up and running but any time I have questions about a particular
package, the files it accesses, and where the files reside, is always
viewed as a fishing expedition.
<p>
Also a great deal of software gets installed by the standard install
process with descriptive text about what the application is during the
install (I can't read that fast), with a memo at the end of
installation that a list of what was installed can be found in the log
directory. When I went to look at the log what I found was a listing
of the package titles that were installed (little more than the
filename of the RPM file) and no description about what the package
does. I found the HOWTO information, but I tend to work better when I
can read the instructions from hard copy while I work with the
application on the screen. I could (and do) print out the docs I am
working with but the expense of this one-of printing is tedious since I
spent extra money to get the documentation. It is also particularly
annoying because the documentation has highly detailed chapters on
how to recompile the kernel (which isn't broken and works just fine)
and little more than a paragraph making reference to creating a dial-up
client connection to an ISP (which is what most people want).
<p>
I am a computer professional who is quite familiar with OS systems and
embedded coding and would like to convince management that a Linux-based
development environment would be a good new direction for our
teams, but it is a hard sell when the response to on-line queries tends
to come off as the respondents turning up their nose saying "that
information is in the docs" and no clue as to which docs or where. If
the respondents know the answer but are tired of answering this
question "again" either reprint the old answer, point out where the old
answer can be looked up, or answer the question "again," not blow the
person off because the question isn't interesting enough. Microsoft
and IBM got where they are by taking special interest in always
answering the "elementary" questions. I realise the nature of Linux
precludes focusing any resources since it doesn't really have any. But
if the general Linux public would take a better attitude toward people
wanting to join up, and lend a helping hand when possible, Linux could
become a major force in the computer industry.
<p>
Jack Chaney
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Fri, 24 Oct 1997 17:16:04 -0700 <br>
From: Felix Liebau <a
href="mailto:fliebau@metronet.de">fliebau@metronet.de</a><br>
Subject: e mail subscribe?
<p>
Hi,
<p>
Thanks for that great journal, <I>Linux Gazette</I>, which I really like to
read.
Can I subscribe to have new issues mailed to me?
<p>
Felix Liebau
<p>
<blockquote><I>(No, it is impractical to use e-mail to send such large
files as those that make up LG--1 to 2 MB total for each issue. However, check out the
Front Page for information about our new notification mail
list. --Editor)</I></blockquote>
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">
Date: Wed, 12 Nov 1997 23:36:43 +0000 <br>
From: I.P. Robson <a href="mailto:p.wyrd@netcomuk.co.uk">
p.wyrd@netcomuk.co.uk</a><br>
Subject: More Praise
<p>
You probably get enough of it. But here's more praise.
I've just come accross this magazine and its the most useful
and interesting thing I've come across since Linux itself.
<p>
Sorry to hear about the November issue but this magazine must
be so fundamental to everything that isn't Gatesian that you
have to keep on going.
<p>
I wish I had a huge bundle of cash to send you, but you'll have
to make do with this E-mail instead.
<p>
You should have a logo ready to go on every Linux web page
everywhere.
<p>
I don't often gush with praise and I'd be embarassed if any
of my gum chewing friends read this. But you deserve it.
<p>
I.P. Robson <br>
-- <br>
The goal of Computer Science is to build something that will last at
least until we've finished building it.
<P> <hr> <P>
<!--================================================================-->
<center>Published in Linux Gazette Issue 23, December 1997</center>
<!--====================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT
PAGE ]"></A>
<A HREF="./lg_tips23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P>
<h5>This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5>
<P>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>
&quot;</H4>
<P> <hr> <P>
<!-- QUICK TIPS SECTION ================================================== -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.gif">
More 2&#162; Tips!</A></H1> <BR>
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">
gazette@ssc.com
</A></center>
<p><hr><p>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_tips23.html#spin">Spinning Down Unused HDs</a>
<li><a HREF="./lg_tips23.html#find">Finding What You Want with find</a>
<li><a HREF="./lg_tips23.html#cutpaste">Cutting and Pasting Without a Mouse</a>
<li><a HREF="./lg_tips23.html#slow">Slow Modem</a>
<li><a HREF="./lg_tips23.html#string">Finding Strings with find</a>
<li><a HREF="./lg_tips23.html#calc">Another Calculator Tip</a>
<li><a HREF="./lg_tips23.html#laptop">Upgrading a Laptop Hard Disk</a>
<li><a HREF="./lg_tips23.html#wall">Wallpaper</a>
<li><a HREF="./lg_tips23.html#post">PostScript</a>
<li><a HREF="./lg_tips23.html#virtual">Linux Virtual Console Key Sequences</a>
<li><a HREF="./lg_tips23.html#hidden">Netscape Hidden "Easter Eggs"</a>
</ul>
<P> <hr> <P>
<!--================================================================-->
<a name="spin"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Spinning Down Unused HDs
</H3><P>
Date: Sat, 8 Nov 1997 18:34:07 +0100 (MET)<br>
From: Philipp Braunbeck <a
href="mailto:100.182763@germany.net">100.182763@germany.net</a><br>
<P>I guess there's no more need to emphasize how much we all like
LG. Here's just my humble-newbie-one-and-a-half.
<P>If You're like me and You've been upgrading for a couple of years
now You're likely to have several HD's on Your IDE- or
SCSI-Interfaces. Now there's probably some GNU-Linux-partition and one
or more other partitions with M$-stuff on a separate disk. I've got a
120MB Conner (with actually nothing on it, I use it as a
backup-device; it used to be win3.1, but I don't need it anymore :-)
which is horribly loud. In the old days of DOS one friend of mine
wrote a little Pascal-program which would stop the disk after a period
of time, and it would only restart on some (hardware?)-interrupt.
Some modern BIOSes can do that job for You, but people told me, that
either it doesn't work on Linux (because the BIOS is only used on
bootup in order to get some basic configuration) or it is not
recommended to do so anyway.
<P>When I was on some adventure-trip through /usr/sbin, I discovered
some new species called "hdparm", which should be included on any
major distribution. The manual page says that you can use it to spin
down any drive on Your system! All You need to do now is putting a
line like "hdparm -S1 /dev/hdb" in some boot-startup-script (I guess
the filenames differ in different distributions) and You're done. What
a silence!
<P>However, You shouldn't do it with Your working /-partition, as it
syncs the disk every now and then and the disk will keep starting and
stopping, and this is definitely not good for any HD.
<P>If You like my 2-cent just go ahead and publish it. If not, there
will certainly be a good reason for this. As I am a newbie, i.e. I've
been using GNU/Linux for about one year now, I'm humble enough to
admit that this hint seems more than obvious to any experienced
user. But if You decide to publish it, I'd prefer that I can stay
anonymous, not because I got anything to hide, but because I don't
want to pretend to be someone I'm not, like a sysadmin or I dunno.
I've got too much respect for them guys who are lots more intelligent
than I am, but would they ever consider to mail something as primitive
as I suggest to LG? It really is a matter of getting started for
unexperienced users, finding that GNU/Linux gets even more powerful
while sorting it all out. So just put it in "Clueless at the prompt"
or where You like. Sign with Your name, You knew the trick anyway,
didn't You?
<P> <hr> <P>
<!--================================================================-->
<a name="find"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Finding What You Want with find
</H3>
<P>
Date: Wed, 12 Nov 1997 16:14:43 +0000 (GMT)<br>
From: Jon Rabone <a href="mailto:jkr@camcon.co.uk">jkr@camcon.co.uk</a><br>
<P>In the October 97 issue, Dave Nelson suggests using
<pre>find . -type f -exec grep "string" /dev/null {} \;</pre>
to persuade grep to print the filenames that it finds the search
expression in. This starts up a grep for each file, however. A shorter and
more efficient way of doing it uses backticks:
<pre>grep "string" `find . -type f`</pre>
<P>Note however, that if the find matches a large number of files you may
exceed a command line buffer in the shell and cause it to complain.
<P> <hr> <P>
<!--================================================================-->
<a name="cutpaste"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Cutting and Pasting without a Mouse
</H3>
<P>
From: <a
href="mailto:fk5a005@rrz.uni-hamburg.de">fk5a005@rrz.uni-hamburg.de</a><br>
Date: Wed, 5 Nov 1997 18:58:41 +0100<br>
<P>It is possible, I did think there was no way but there is a way to cut
and paste without any mouse.
Just use screen-3.6x to achieve what you may have wanted for a long time.
you use screen already but did you know how to use this cut-and-paste tool?
<ul>
<li>Use control-a and ESC to switch on Copy-mode.
<li>"Drive" thru your screen with j,k and all the other well known vi-movements.
<li>Mark the area to copy with the space-key.
<li>Mark the end of the area with a space-key.
<li>Go to another window with e.g. control-a n .
<li>Press control-] where you want the pasting to happen.
ready!
</ul>
<P>This was pasting without leaving your keyboard for a while!
<P>Control-a can be any key to achieve a screen-3.6 command.
There are many more very useful features with screen but i guess
that like me there are people out there who may not know this very
useful feature.
Another hint: It is really worth printing the Manual.
If like me you are going by train you can read the Manual x.
I found out there are so many important features in so many programs I
did not know and that did help me a lot after discovering.
<P>About vim and completion:
there is a feature that lets you complete words which you did write
before which is very, very useful.
press control-n in Insert-mode and vim will complete your word if you
typed it before.
It is even better:
You can get vim to complete words that are in a different file.
Just tell vim what the name of the file is with
:set dictionary=file
Then complete the word with control-x-control-k.
Now imagine how much easier it may be to get a list of words with
a grep command than to write down all kinds of abbreviations and put
them into a file.
This is a Killer-feature IMO!
<P>About emacs and completion:
<P>Emacs was first with completion or at least this kind of completion
mentioned for vim goes back to 1992.
What you need is hippie-exp.el which can perform all kinds of
completion.
<P>About atchange
<P>There is a very nice script out there written in perl.
I like it very much because it lets you perform an action whenever
you change the date of a file. The action can be almost anything
like calling another program and executing things or whatever you want.
The idea came from Tom Schneider who has a page about atchange out there:
<a
href="http://www-lmmb.ncifcrf.gov/~toms/atchange.html">http://www-lmmb.ncifcrf.gov/~toms/atchange.html</a>
<P>I strongly encourage you to read it, this is an idea, that can really
save your time. The perl-script itself is only 68 lines of code.
almost one half is explanation, the most important thing is the idea
itself but Tom has a good page. So I don't tell you more right now :)
<P> <hr> <P>
<!--================================================================-->
<a name="slow"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Slow Modem
</H3>
<P>
Date: Mon, 3 Nov 1997 17:45:13 -0600 (CST)<br>
From:Michael J. Hammel<a
href="mailto:mjhammel@long.emass.com">mjhammel@long.emass.com</a><br>
To: Larry E Scheib <a
href="mailto:scheib@tenet.edu">scheib@tenet.edu</a><br>
<P>In a previous message, Larry E Scheib says:
<P><I>When I access a remote site with Linux my screens paint painfully slowly;
a problem I don't experience with Windows95. When my modem connects under
Linux it replys "Connected at 38,400", the actual speed of my modem.
The modem runs off of cua1, IRQ 3.</I>
<P>I'm not very good at debugging modem connections. I've never really had
any problems with my dial-ups except when the network itself is bogged
down. To be honest, I have no idea how fast my modem connections are
actually running. I just know they're tolerable (they actually seem to run
quite fast - I have a 33.6 modem).
<P>Things that might affect this would be:
<ol>
<li>some other process sitting on cua0 - perhaps a getty?
<li>You didn't run setserial, a command to setup your serial ports for use
with modems. I've never run this myself, but I know others have had to do
so in order to get better throughput. Perhaps its because I don't use MS
so my ports are not switched back and forth between MS and Linux settings.
</ol>
<P> <hr> <P>
<!--================================================================-->
<a name="string"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Finding Strings with find
</H3>
<P>
Date: Tue, 28 Oct 1997 16:31:47 +0100<br>
From: Gordon Walker <a
href="mailto:hellcat@easynet.fr">hellcat@easynet.fr</a><br>
<P>Being new to Linux I find the Tips section very useful in general and
the tip about searching for a string with find inspired me to write my
first conditional Bash script. It finds a string in the current or given
directory
<pre>#!/bin/sh
## Recursively finds all strings in given or current directory
## Usage string_search &lt;dir&gt; &lt;string&gt; (dir is optional)
## For example: "string_search fish " finds string "fish" in current
directory
## and "string_search /water fish " finds string "fish" in directory
/water
if [ "$2" = "" ]; then
find . -type f -exec grep "$1" /dev/null {} \;
else
find $1 -type f -exec grep "$2" /dev/null {} \;
fi
</pre>
<P> <hr> <P>
<!--================================================================-->
<a name="calc"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Another Calculator Tip
</H3>
<P>
From: Frank Damgaard <a href="mailto:frank@diku.dk">frank@diku.dk</a><br>
Date: Thu, 23 Oct 1997 22:05:14 +0200 (METDST)
<P>In issue 21 there was a smart perl based command line calculator,
here is another one.
<P>I have for some years used a simple alias for the calculator command.
The alias only requires awk, and that tcsh (or csh) is the running shell.
This alias will not work with bash/sh/ksh since these shells do not allow
arguments in aliases.
<P>Just place the following line in your ~/.tcshrc or type at the prompt:
<pre>alias calc 'awk "BEGIN{ print \!* }" '
# When calling calc do not escape "*":
# Example: calc (3+5)*4/5</pre>
<P> <hr> <P>
<!--================================================================-->
<a name="laptop"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Upgrading a Laptop Hard Disk
</H3>
<P>
Date: Fri, 24 Oct 1997 14:38:58 -0400<br>
From: Peter Teuben <a
href="mailto:teuben@astro.umd.edu">teuben@astro.umd.edu</a><br>
<P>I wanted to upgrade the harddisk of my laptop, which had gotten
a bit tight with 800Mb and maintaining both linux and W95 (don't
ask).
<P>I got a new 2Gb drive, and of course wanted to install W95 as well as
linux. I decided, despite my die-hard Slackware, to try RedHat4.2 for
linux and basically "copying" W95. Since the laptop is on a local
ethernet at home, I could make a backup of W95 on the desktop, and after
linux was braught up, restore W95 back over the network. Indeed this
worked quite nice, but you have to remember a few tricks. Here were my
basic steps:
<ol>
<li>backup, using tar, the old /DOS partition accross the network
<li>replace drive, partitioned as dos on /dev/hda1, swap on hda2,
ext2 on hda3 and hda4.
Don't forget to toggle the bootable flags of hda1.
<li>installed linux on hda3, and did 'mkdosfs /dev/hda1' to format
the dos partition from within linux (using DOS bootfloppy
and FORMAT should work just as well, see my FAT32 caveat below)
LILO was installed at this stage to boot linux as well as W95.
<li>by default RedHat mounts hda1 as 'dos', but you need to
re-mount this still empty partition as 'vfat':
<pre>umount /DOS
insmod vfat
mount -t vfat /dev/hda1 /DOS</pre>
<li>untar the previously saved dos.tar back to /DOS, via the network
from the desktop machine. Since /DOS is vfat, it will properly
keep the long names.
<li>reboot the machine with a previously made 'emergency W95
bootfloppy' and run "SYS C:" to restore the bootimage
<li>reboot and select W95 from the LILO prompt, and it should all
work nicely now (it did for me).
</ol>
<P>Caveat: For FAT32 versions of W95 (from OSR2 or W98) you may need to
patch the 2.1.x kernels to include this.
<P> <hr> <P>
<!--================================================================-->
<a name="wall"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Wallpaper
</H3>
<P>
Date: Mon, 27 Oct 1997 14:38:35 +0100<br>
From: Roger Irwin <a href="mailto:irwin@mail.com">irwin@mail.com</a><br>
<P>Use netscape, got xv?
<P>Try running this script in your home directory:
<pre>rm -f XVbaa
for foo in .netscape/cache/*
do
for baa in $foo/*.gif
do
echo $baa >>XVbaa
done
done
xv -root -quit -random -flist XVbaa</pre>
<P>This will make you a custom wallpaper on the fly by fishing in netscapes
cache.
<P>I mapped this to my fvwm2 button bar by using the following lines in
.fvwm2rc95:
<pre>*FvwmButtons(Title Mood, Icon exit.xpm, \
Action 'Exec XVchange ')</pre>
<P>This goes in the FVWM buttons section in the middle of the other lines
that define the other buttons....
When I hit the Mood button, the wallpaper changes.
I suppose a lazier person might use crontab....
<P> <hr> <P>
<!--================================================================-->
<a name="post"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
PostScript
</H3>
<P>
Date: Sun, 9 Nov 1997 22:00:31 +0000 (GMT)<br>
From: Ivan Griffin <a
href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a><br>
<P>Counting the Number of Pages in a file
<P>To count the number of pages in a PostScript file, you are relying on the
creator of the file to have been a sociable application and to have followed
the Adobe Document Structuring Conventions (ADSC).
These conventions entail the automatic placement of comments (%%) in the
PostScript source so that additional applications will find it easier
(and indeed, possible!) to post-process the PostScript without having
to interpret it. They are generally ignored by PostScript interpreters
and printers.
The comment '%%Page:' delimits each new page. So to count the number of pages
in a DSC compliant PostScript file, all you have to do is grep for the
number of '%%Page:' markers:
<pre>grep -c '%%Page:' filename.ps</pre>
I generally tend to alias this to pspage in my .cshrc
<pre>alias pspage 'grep -c %%Page:'</pre>
<P>Printing 2up
<P>The utility pstops, part of the psutils package, allows you to process
a PostScript file to enable 2up printing. I find the following works
for A4 (European) paper -- the measurements will need to be tweaked
for US Letter:
<pre>alias psdouble 'pstops "2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)"'</pre>
<P>To use it, it is as simple as:
<pre>psdouble &lt; 1up.ps &gt; 2up.ps</pre>
<P>Microsoft Ugly PostScript
<P>Quite often in PostScript generated by the Microsoft Windows driver, it
requires the interpreter to have 30MB of memory, and refuses to print
otherwise!! This is quite incredible, and I have found that it always
seems to print perfectly well if this artifical limit is removed. The
PostScript in question is:
<P>/VM? {vmstatus exch sub exch pop gt { [
(This job requires more memory than is available in this printer.) 100 500
(Try one or more of the following, and then print again:) 100 485
(In the PostScript dialog box, click Optimize For Portability.) 115 470
(In the Device Options dialog box, make sure the Available Printer Memory is accurate.) 115 455
(Reduce the number of fonts in the document.) 115 440
(Print the document in parts.) 115 425
12 /Times-Roman showpage
(%%[ PrinterError: Low Printer VM ]%%) =
true FatalErrorIf}if} bind def
30000 VM?
<P>The line "30000 VM?" checks that (roughly) 30MB of memory is available
in the printer. Deleting this line is sufficient to ensure that the
check is not performed, and that the job will now print (or be interpreted
successfully in ghostview for example).
<P> <hr> <P>
<!--================================================================-->
<a name="virtual"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Linux Virtual Console Key Sequences
</H3>
<P>
Date: Sun, 9 Nov 1997 22:00:31 +0000 (GMT)<br>
From: Ivan Griffin <a
href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a><br>
<P>Pressing these key sequences on a VC will dump information to the screen.
<P>Displaying task information:
<P>Ctrl-Scroll Lock gives:
<pre> free sibling
task PC stack pid father child younger older
swapper 0 R current 4096 0 0 1
init 1 S FFFFFFFF 2676 1 0 706
kflushd 2 S 00000000 3984 2 1 3
kswapd 3 S 00000000 3976 3 1 4 2
nfsiod 4 S 00000000 3520 4 1 5 3
nfsiod 5 S 00000000 3520 5 1 6 4
nfsiod 6 S 00000000 3520 6 1 7 5
nfsiod 7 S 00000000 3520 7 1 21 6
bash 8 S 00000000 3012 172 164 711
login 9 S 00000000 2820 164 1 172 166 135
kerneld 10 S 00000000 3224 21 1 76 7
login 11 S 00000000 3012 706 1 712 571
syslogd 12 S FFFFFFFF 3192 76 1 85 21
klogd 13 R 00000000 3404 85 1 96 76
crond 14 S 00000000 3480 96 1 108 85
inetd 15 S FFFFFFFF 3464 108 1 119 96
lpd 16 S FFFFFFFF 3376 119 1 135 108
gpm 17 S 000B206C 3368 135 1 164 119
vi 18 S FFFFFFFF 3012 711 172
mingetty 19 S FFFFFFFF 3012 166 1 167 164
bash 20 S 00000000 3012 712 706 724
httpd 21 S 00000000 3460 573 571 574
httpd 22 S 00000000 3600 574 571 575 573
httpd 23 S 00000000 3308 571 1 579 706 171
httpd 24 S 00000000 3600 575 571 576 574
mingetty 25 S FFFFFFFF 3012 167 1 168 166
mingetty 26 S FFFFFFFF 3012 168 1 169 167
mingetty 27 S FFFFFFFF 3012 169 1 171 168
httpd 28 S 00000000 3600 576 571 577 575
update 29 S 00000000 3460 171 1 571 169
httpd 30 S 00000000 3600 577 571 579 576
vi 31 S FFFFFFFF 3012 724 712
httpd 32 S 00000000 3600 579 571 577
</pre>
<P>Displaying Memory Information
<P>Shift-Scroll Lock gives:
<pre>Mem-info:
Free pages: 3136kB
( 4*4kB 0*8kB 1*16kB 1*32kB 0*64kB 24*128kB = 3136kB)
Swap cache: add 0/0, delete 231912/0, find 0/0
Free swap: 16596kB
5120 pages of RAM
789 free pages
449 reserved pages
2572 pages shared
Buffer memory: 2324kB
Buffer heads: 2340
Buffer blocks: 2324
Buffer[0] mem: 1953 buffers, 10 used (last=1953), 0 locked, 0 protected, 0 dirty 0 shrd
Buffer[2] mem: 337 buffers, 25 used (last=337), 0 locked, 0 protected, 0 dirty 0 shrd
Buffer[4] mem: 3 buffers, 3 used (last=3), 0 locked, 0 protected, 3 dirty 0 shrdSize [LAV] Free Clean Unshar Lck Lck1 Dirty Shared
512 [ 0]: 0 0 0 0 0 0 0
1024 [ 186]: 31 1953 0 337 0 3 0
2048 [ 0]: 0 0 0 0 0 0 0
4096 [ 0]: 0 0 0 0 0 0 0
8192 [ 0]: 0 0 0 0 0 0
0</pre>
<P> <hr> <P>
<!--================================================================-->
<a name="hidden"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Netscape Hidden "Easter Eggs"
</H3>
<P>
Date: Sun, 9 Nov 1997 22:00:31 +0000 (GMT)<br>
From: Ivan Griffin <a
href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a><br>
<P>These special URLs do interesting things in Netscape Navigator and
Communicator.
<pre>about:cache gives details on your cache
about:global gives details about global history
about:memory-cache
about:image-cache
about:document
about:hype
about:plugins
about:editfilenew
view-source:URL opens source window of the URL</pre>
<P>Ctrl-Alt-F take you to an interesting site :-)
<P> <hr> <P>
<!--================================================================-->
<center>Published in Linux Gazette Issue 23, December 1997</center>
<P> <hr> <P>
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A> <A HREF="./lg_mail23.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./lg_bytes23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<h5>This page maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5>
<P>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;</H4>
<HR>
<center>
<table cellpadding=7><tr><td>
<IMG SRC="../gx/bytes.gif" border=1 ALT="News Bytes">
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_bytes23.html#general">News in General</a>
<li><a HREF="./lg_bytes23.html#software">Software Announcements</a>
</ul>
</td></tr></table>
</center>
<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3> News in General </H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
New URL for LG
</H3>
<P>
<i>Linux Gazette</i> now has its own domain name! Check out <a
href="http://www.linuxgazette.com/">http://www.linuxgazette.com/</a> as
another way to get to <i>LG</i>.
<P>
<B>Other <I>LG</I> News</B>
While we do not mail issues of <I>LG</I> to our readers--it's just too
big--we do have an announcement service. Write <A
HREF="mailto:lg-announce-request@ssc.com">lg-announce-request@ssc.com</A> with the
wordsubscribe in the body, and each month you will receive an e-mail notice
when we post <I>Linux Gazette</I>.
<P>
Our <A HREF="ftp://ftp.ssc.com/pub/lg/">ftp site</A>
will now contain each issue after Issue 9 in its own gzipped
tar file. Issues 1 through 8 will be together in one gzipped tar file.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Cool Linux Sites of December!
</H3>
<P>
<P>Check out the two cool Linux sites of the month!
<P><a href="http://128.229.72.241/">The Rat Pack Underground
Network</a> is a must-see. This URL has some practical stories about using
Linux to solve "real-life" problems and much more.
<P><a href="http://www.hooked.net/~tvs/eyes/">The Eyes on the Skies Robotic
Solar Obsevatory and BBS page</a> contains an internet-accessable robotic
solar telescope and BBS system built by Mike Rushford. You can actually
control your view of the sun by controlling a telescope from your browser!
The telescope control pages are served by a Linux system that is called
<I>Eyes on the Skies</I>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Stand Up and Be Counted
</H3>
<P>
<P>The Linux Counter is a serious attempt
to count users in the Linux universe.
At the moment, more than 53.000 people are registered with the
counter, coming from more than 130 different countries.
The counter has been recently updated and given a new Web interface
and forms design, and is now able to give you the ultimate Linux
counter gimmick: The Linux REGISTRATION CERTIFICATE!
This little GIF image, with your personal registration number on it,
ready for insertion in your Web page, is available for you at the price
of filling out the registration form.
Older, registered users can go to <a
href="http://counter.li.org/update.html">http://counter.li.org/update.html</a>,
enter their registration key, and get it there.
<P>Come on folks--STAND UP AND BE COUNTED!!!!
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Virtual Services HOWTO
</H3>
<P>
Check out the new HOWTO on virtual services which includes a section on
virtual mail services as a whole. Go to <a
href="http://sunsite.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html">http://sunsite.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html</a>
The author would like your comments on the HOWTO in order to keep it on
track, you can reach him at <a
href="mailto:brian@nycrc.net">brian@nycrc.net</a>
<a name="software"></a>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3> Software Announcements </H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Eiffel Special
</H3>
<P>
<P>In celebration of the 200,000th Eiffel Professional license, ISE is
making available special limited time offers for new purchases of
the Eiffel Professional Licence and upgrades from Personal Eiffel.
<P>FREE Upgrade to Eiffel Professional license with NEW Java Interface
(see offer for full details)
<P>Eiffel Professional Suite $495
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
</ul>
<P>Eiffel Client-Server Suite $795
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
<li>EiffelWeb
<li>EiffelNet
</ul>
<P>Eiffel Cross-Platform Suite $895
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
<li>EiffelWeb
<li>MEL
</ul>
<P>Eiffel Enterprise Suite $1195
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
<li>EiffelWeb
<li>EiffelNet
<li>MEL
<li>EiffelCase
</ul>
<P>A special bonus runs with each of the above which includes a free upgrade
to the next release, a free O-O book and 15% off any ISE training session
up to June 1998. The Enterprise Suite also includes a free year of
maintenance and support from the date of purchase.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
O'Reilly "Animal Book" Contest
</H3>
<P>
Readers of the "Animal Books" by O'Reilly now have a
chance to see some wild animals close up, courtesy of computer book
publisher O'Reilly & Associates. O'Reilly has launched the In a
Nutshell contest, with the prize being a trip for two to the San Diego
Zoo and Wild Animal Park. Readers of O'Reilly's bestselling In a
Nutshell quick-reference books can find entry forms at their favorite
bookstores. Completed entry forms must be received by December 31,
1997, and the winner will be chosen on January 30, 1998.
<P>Official In a Nutshell Contest Rules:
<ul>
<li>Completed entry forms must be received by December 31, 1997, in order
to qualify.
<li>No purchase necessary to enter. (However, please include original
cash register receipt or a legible copy if purchase is made.)
<li>Offer good in USA and Canada.
<li>Not responsible for lost, late, misdirected, or illegible entry forms.
<li>Void where prohibited, taxed, or restricted by law.
</ul>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Help with JWP
</H3>
<P>
<P>There is a Windows application, called JWP -- a Japanese Word Processor.
This package was written by Stephen Chung, and as a GNU product it is freely
distributable.
JWP comes with its own fonts and its own Front End Processor (FEP) which
means it is useful on English-only computing systems. It is also
integrated with Jim Breen's EDICT Japanese-English dictionary.
Unfortunately, JWP is only available for Windows right now, which is
locking out a lot of people under other platforms who might benefit from
it. As Stephen is quite busy with full-time work and maintaining the
Windows versions (he's developing version 2.00 now), there is an attempt
being made to go ahead and port to X-Windows.
<P>This project will never get off the ground without volunteers.
any interested X-Windows developer who wants to make
a contribution both to the GNU and Japanese-speaking communities is invited
lend a hand with this exciting project.
<P>The JWP-Port Project home page contains more information on the JWP
package as well as the JWP-Port project itself. If you are interested,
please visit the page at <a
href="http://qlink.queensu.ca/~3srf/jwp-port">http://qlink.queensu.ca/~3srf/jwp-port</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Perfect Backup+ Personal Edition
</H3>
<P>
<P>Unisource Systems, Inc. announced today the release of the famous
PerfectBACKUP+ Personal Edition, a fully functional version of their
best-selling PerfectBACKUP+ V5.5. Having received continued and
tremendous support from the LINUX community, and in recognition of LINUX
becoming our #1 best-selling platform we are giving something back. The
PerfectBACKUP+ Personal Edition is unrestricted and free to anyone. Its
freely redistributable and can be use for either private or commercial
use.
<P>Information about, and the program itself can be obtained from
<a href="http://www.unisrc.com">http://www.unisrc.com</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
86Open Project
</H3>
<P>
<P>A group which includes some of the key developers of Unix operating
systems on Intel architecture computers have agreed to work on a
common programming and binary interface.
At a meeting held mid-August at the head office of SCO, participants
achieved consensus on a way to create software applications which would
run, without modification or emulation, on the Intel-based versions of:
<ul>
<li>BSDI
<li>FreeBSD
<li>Linux
<li>NetBSD
<li>SCO OpenServer
<li>Sunsoft SolarisX86
<li>SCO UnixWare
</ul>
<P>The goal of this effort is to encourage software developers to port
to the Unix-Intel platform by reducing the effort needed to support
the diverse mix of operating systems of this kind currently available.
The specification, called "86open", will be published and freely
available to any environment wishing compliance. It involves the use of a
standardized 'libc' shared library of basic functions to be provided on
all systems. This library will provide a consistent interface to
programmers, hiding the differences between the various operating systems
and allowing the resulting binary programs to run unaltered on any
compliant system. Whenever possible, it will be consistent with The
Open Group's Single Unix Specification.
<P>Each participating operating system will be free to implement the 86open
library specification on its own. However, the reference implementation
will be based upon GNU's 'glibc' version 2, ensuring that it will remain
open and freely available. The actual list and behavior of the 86open
functions is presently being determined.
<P>Participants in the meeting, who will be involved with the ongoing
evolution of the 86open specification, include people deeply involved
with the operating systems mentioned in this project. The 86open
steering committee, a core of this group which will assemble
the work and produce the final specification, comprises:
Marc Ewing, Dion Johnson, Evan Leibovitch, Bruce Perens,
Andrew Roach, Bryan Sparks and Linus Torvalds
<P>For more information, contact <a href="mailto:86open@telly.org">
86open@telly.org</a> or check <a
href="http://www.telly.org/86open">http://www.telly.org/86open</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Clobberd 3.2
</H3>
<P>
Clobberd 3.2 (Clobberd-3.2-RELEASED.tgz) has been
released on to the following sites:
<UL>
<LI><a
href="ftp://ftp.funet.fi/pub/linux/incoming">ftp://ftp.funet.fi/pub/linux/incoming</a>
<LI><a
href="ftp://sunsite.unc.edu/incoming/Linux">ftp://sunsite.unc.edu/incoming/Linux</a>
<LI><a
href="http://dayworld.net.au/~jsno/rel/1997">http://dayworld.net.au/~jsno/rel/1997</a>
</UL>
<P>Clobberd is a user/resource regulator that allows Operators to monitor and
track users Total Time, Daily Time, Expiration time, Total network usage
and Daily network usage (to name a few) in an effort to limit or cost
resources that the user uses. Clobberd effectively "meters" resources,
and compares them to any limits/conditions you impose.
The third version now has the ability to monitor users on a network rather
than a single host.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
Corel Video Network Computer News
</H3>
<P>
When Corel Computer Corp. formally unveils its Video Network
Computer later this month, the machine will be running Linux, an
operating system that is becoming an increasingly prominent force in
workstations linked to corporate intranets.
<p>
Linux is a compact, efficient, easier-to-use and free version of
Unix. A growing number of corporate MIS groups, as well as software
developers and systems integrators, are choosing Linux over 32-bit
Windows platforms, especially for Internet applications. At some
sites, Linux actually is displacing Windows.
<p>
That is what happened at Unique Systems, Inc., a software developer in
Sylvania, Ohio. The company, which puts together accounting systems
for small and midsize companies, was using Microsoft Corp.'s Office 95
internally but was plagued by software crashes and other problems. "It
really irked me," Unique President Glenn Jackson said.
<p>
The company tested Applix, Inc.'s ApplixWare office suite on Intel
Corp. computers running Linux. Users got nearly all the functionality
of Microsoft Office and were able to import all Office files easily
into ApplixWare - at much lower cost and with far greater reliability
than with Office, Jackson said.
<p>
"Linux is the true competitor to Windows NT in the long term," said
Dave Madden, senior product manager at Corel Computer, a subsidiary of
Corel Corp., based here.
<p>
Linux has a number of key features NT lacks. For example, Linux is a
multiuser system and runs on a wide range of processors _ from Intel
386 to 64-bit Reduced Instruction Set Computing chips _ and on
multiprocessor computers. The Linux kernel is less than 2M bytes.
<p>
Linux has other key attractions, according to Jon Hall, executive
director of Linux International, a trade group that promotes the
software. Linux is free, and users have access to all the Linux source
code, which means they can make whatever changes they need.
Commercial Linux versions from companies such as Caldera, Inc., of
Provo, Utah, and Red Hat Software, Inc., of Research Triangle Park,
N.C., range from $49.95 to $399 and usually come with additional
software and technical support.
<p>
The free version of Linux is crammed with utilities and connectivity
software. "One of the things that makes Linux so attractive is how
much software you get with it," said Dave Parker, a senior software
engineer at Frontier Information Technologies, a division of Frontier
Corp., a Rochester, N.Y., telecommunications company. "Linux will
connect to anything."
<p>
Much of the free software is available under the "GNU public license,"
which is administered by the Free Software Foundation.
<p>
For example, TCP/IP and a Web server are built in, and Linux can run
DOS applications. It includes X.11 support, so it can host or access
Unix applications.
<p>
Linux supports the Microsoft Server Message Block protocol, so it can
serve Windows files.
<p>
It also supports AppleTalk for Macintoshes. Using optional software,
it can even run Windows applications. Cal-dera's commercial OpenLinux
adds Novell, Inc. NetWare connectivity.
<p>
Frontier Information Technologies' Green Bay, Wis., site is using
several Caldera Open- Linux servers as specialized gateways, directory
or naming servers and firewalls.
<p>
This seems to be an increasingly common practice at big corporate
sites, said Dan Kusnetzky, director of operating system research at
International Data Corp. in Framingham, Mass.
<p>
Unknown to senior MIS executives, operations staff are deploying Linux
servers in a range of intranet applications, he said.
<P> <hr> <P>
<!--================================================================-->
<center>Published in Linux Gazette Issue 23, December 1997</center>
<P> <HR> <P>
<!-- =================================================================== -->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT
PAGE ]"></A>
<A HREF="./lg_tips23.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./lg_answer23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P><HR><P>
<h5>This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5>
<P>
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <hr> <P>
<!-- =============================================================== -->
<center>
<H1><A NAME="answer">
<img src="../gx/ans.gif" alt="" border=0 align=middle>
The Answer Guy
<img src="../gx/ans.gif" alt="" border=0 align=middle>
</A></H1> <BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
Starshine Technical Services, <A HREF="http://www.starshine.org/">
http://www.starshine.org/</A> </H4>
</center>
<p><hr><p>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_answer23.html#monitor">Running Multiple Instances of X</a>
<li><a HREF="./lg_answer23.html#madness">VC Madness</a>
<li><a HREF="./lg_answer23.html#ospf">Linux and OSPF</a>
<li><a HREF="./lg_answer23.html#pop">Security Problems with pop3</a>
<li><a HREF="./lg_answer23.html#crypt">Cryptographic System</a>
<li><a HREF="./lg_answer23.html#ref">An Interesting De-Referencing Problem</a>
<li><a HREF="./lg_answer23.html#remind">Reminder!</a>
<li><a HREF="./lg_answer23.html#pcmcia">pcmcia ide Drives</a>
<li><a HREF="./lg_answer23.html#kde">KDE BETA 1</a>
<li><a HREF="./lg_answer23.html#program">Compression Program</a>
<li><a HREF="./lg_answer23.html#loadlin2">loadlin</a>
<li><a HREF="./lg_answer23.html#wipe">WipeOut</a>
</ul>
<p><hr><p>
<!--================================================================-->
<a name="monitor"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Running Multiple Instances of X on One Video/Monitor (VCs)
</h3>
<P> <B>
From: Guillermo S. Romero <a href="mailto:famrom@ran.es">famrom@ran.es</a><br>
</B><P><B>
Hello,<br>
I have tried to run multiple X servers with only one card and one monitor.
Is this possible, or is it normal that the second X server does not
run?
I used <tt>startx display :0</tt> the first time, and <tt>:1</tt> the second.
I have a 1024K video board (#9GXE64 PCI, S3 864), and normal config is 8
bpp, 1024*768 virtual desktop, running on a remix of RedHat 4.0, 4.1 and
4.2, with XFree86 as server.
Maybe I did not understand the man page (English is not my first languaje).
Any suggestion?
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
The normal way this is done is using the form:
<pre> startx -- :0 &
startx -- :1 &</pre>
<P> ... The -- is used by startx and xinit to separate an optional
set of client parameters from the set of display/server
options and parameters.
<P> If you ran the command:
<pre> startx xterm -e myprog -- :1 &</pre>
<P> ... it would start X Windows with a copy of xterm which
would be running 'myprog' (whatever that might be). The
remainder of the line informs the X server to use display
number one (which would be VC -- virtual console -- number
eight on most Linux systems).
<P> (On my systems it would start on VC#14 -- accessed with the
{Right Alt}+{F2} key combination. I routinely configure
mine with 24 VC's -- the first twelve of which have
"getty's" (login prompts) and the next eleven of which are
available for X (xdm's or otherwise), using 'open' commands,
or for dumping status output from a process (like 'make' or
'tail -f').
<P> Read the man pages for startx and xinit one more time.
I'm pretty sure that the man pages have all been translated
into Spanish -- so you might want to hunt those down.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
Thanks!!!
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Read the man pages for startx and xinit one more time.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
Sure, and with a dictonary. ;]
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
I'm pretty sure that the man pages have all been translated
into Spanish -- so you might want to hunt those down.
<P>Try:
<P>man-pages-es-0.2-1.src.rpm:
<a href="ftp://ftp.redhat.com/pub/contrib/SRPMS/man-pages-es-0.2-1.src.rpm">ftp://ftp.redhat.com/pub/contrib/SRPMS/man-pages-es-0.2-1.src.rpm</a>
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
The Spanish Howto is small, too global, sure it does not cover that.
And I still have problems with my ntilde chars and acents, Spanish is not
supported a lot (Linux or another OS, always late and bad)... The system
explained in that howto does not work (but thats another question, whose
solution maybe... magic? real support?).
GSR
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
I'm afraid I'm completely ignorant of internationalization
issues with Linux. I do know that there is quite a bit of
work done on Linux boxes in Japan, Germany, Italy and,
naturally enough, Finland (where Linus comes from).
<P> As bad as it seems -- Linux' support for other languages is
probably the best in the world. Unfortunately I don't have
the skill or resources to point you to the support and
resources you need.
<P> Since your English is clearly adequate to discuss these issues
with me -- you might consider contributing some of your time
to a translation effort (get the LIGS, NAG, and SAG portions
of the Linux Documentation project translated, and "beef up"
(improve) the Spanish-HOWTO.
<P> I highly recommend that you find or start a Linux user's group
in your area. This is the best way to help yourself and to
improve the situation for all of your compatriots.
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="madness"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
VC Madness
</h3>
<P> <B>
From: <a href="mailto:frees@technologist.com">frees@technologist.com</a><br>
</B><P><B>
Hi<br>
I have an application that uses its own .cshrc and .bashrc to fire up
and this is done by using its own login account.
Now what I would really like is for this to say select VC8 to run on
and then have my normal X on VC7 as usual.
Can this be done? and if so how?
<br>
--Phil
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
<pre> open -c 8 -- su - $PSUEDOUSER</pre>
<P> ... where PSUEDOUSER is the psuedo users whose .*shrc
you want to run. Naturally you can convert the .*shrc
into a normal shell script and do whatever you like with
it. You have to run this as root -- (so 'su' doesn't prompt
for a password) though there are ways to get around that
'runas' is available at the sunsite.unc.edu archive site and
its mirrors). If launch this from another UID you'll need to
ensure that this users (the launching user, not necessarily the
psuedo-user) has write access to /dev/tty8 (group +w should be
sufficient).
<P> If you want to have the console visually switch to this
application's VC you can just add the -s switch like so:
<pre> open -c 8 -s -- ....</pre>
<P> ... where the "--" marks the end of 'open's' arguments
so that the command that follows it can unambigously get
its own arguments.
<P> Without the -c switch the 'open' command will select the
next available VC. Any subsequent 'startx' commands or
other 'open' commands would then pick later ones (unless
the others were freed back up).
<P> You can have two or more copies of X running on different
VC's as well. For example the command:
<pre> startx -- :1</pre>
<P> ... will create a second X session on the localhost:1
display (the first one is addressed as localhost:0 or
simply :0). These X sessions can be run under different
UID's and have completely different client configurations
(colors, window managers, etc). There is also an 'Xnest'
command that works similarly -- allowing one X session to
run "within" (as through a window on) one of your existing
X sessions.
<P> You can also set the terminal settings and colors using
normal redirection of the form:
<pre>stty erase ^? > /dev/tty8</pre>
<P>... and:
<pre>setterm -background blue -foreground yellow -bold on -store \
> /dev/tty8</pre>
<P> This last command would set and store a new set of default
screen colors for the VC. The setterm command can also be
used to control the Linux VC screen blanker's timeout
(a value of 0 means "never blank").
<P> Naturally you may want to read the man pages for all of these.
<P> If you want to ensure that a given process will *always*
be running (and will automatically be respawned when it
dies) you can add it to your /etc/inittab -- so that the
init process will watch over it. This is how new 'getty'
processes are spawned on your first six (or so) VC's when
you boot and are respawned when you logout. Likewise if
you use 'xdm' to keep a graphical (X based) login prompt
on one or more of your VC's.
<P> As you can see, its possible to do quite a bit with Linux
VC's. I run 12 VC's with getty (as login consoles), have
one 'xdm', one devoted to syslog, and ten more available for
other purposes (such as 'startx' and 'open' commands and to
to use for 'tail -f' commands when need to monitor the
end of a status or log file -- from a 'make' or whatever.
<P> The second set of 12 VC's is accessed with the *right*
{Alt} key. (In case you'd never noticed, the default
keyboard settings of Linux only allow you to use the
*left* {Alt} key for switching VC's). I set syslog to
use VC number 24 with an entry in the /etc/syslog.conf
file that reads:
<pre> *.* /dev/tty24</pre>
<P> This puts a copy of *every* syslog message on to that
VC -- which is what I switch to for a quick glance and
try to switch to when I leave any of my systems unattended.
(That way when one does lock -- as rare as that is -- I have
some idea of what the last throes of the system were).
<P> I set that to bright red on black with the following command
in my rc.local file:
<pre>setterm -foreground red -bold on -store > /dev/tty24</pre>
<P> (I also do the same to /dev/tty12 which I customarily use
only for root login's).
<P> Hope all of that helps.
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="ospf"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Linux and OSPF
</h3>
<P> <B>
From: Jose Manuel Cordova-Villanueva <a
href="mailto:jcordova@amoxcalli.leon.uia.mx">jcordova@amoxcalli.leon.uia.mx</a>
</B> <P><B>
Dear Sr.<br>
Recenty I had my first contact with the Linux G. and is a big source of
information, can you inform me if there are a program that can talk ospf
because our ISP, is changing from RIP to OSPF and we have a linux box
in one of our links, for our cisco no problem but for our Linux box??
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
The software you want is called 'gated' (for "gateway daemon").
This is a Unix multi-protocol router package for Linux which
includes support for OSPF and other routing protocols (BGP4,
IGRP, etc).
<P> Here's a link to the top level 'gated' pages
<a href="http://www.gated.merit.edu/">Cornell Gated Consortium
Information</a>
<P> I've heard that compiling 'gated' for Linux is not
quite trivial so here is some other links that might help:
Here's a link to a source RPM in the Red Hat contrib
directory:
<a
href="ftp://ftp.redhat.com/pub/contrib/SRPMS/gated-R3_6Alpha_2-1.src.rpm">gated-R3_6Alpha_2-1.src.rpm</a>
<P> Here's a threaded archive of the 'gated' users mailing list:
<a
href="http://nic.merit.edu/mail.archives/html/gated-people/threads.html">Gated-People
Archive</a>
Here's an odd note about an alternative routing software
package/project:
<a href="http://www.ra.net/route.server.html"> Route Servers -- RA.net:
routing arbiter project</a>
<P> Hope that helps.
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="pop"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Security Problems with pop3 of Linux 2.1.29
</h3>
<P> <B>
From: Sam Hillman <a href="mailto:hillman@easyway.net">hillman@easyway.net</a><br>
</B><P><B>
Well I hope I'm posting to the right person. I have two questions, which
I hope you can answer.
1. How do I setup my linux machine as a POP3 server? I can't find any
FAQs or Howtos.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Usually you don't have to do anything extra to allow access
to POP services. Most Linux distributions include a pop server
pre-installed and appearing in the /etc/inetd.conf and /etc/services
files.
<P> A quick test is to login to the system in question and type
the command:
<pre>telnet localhost pop-3</pre>
... it should respond with something like:
<pre>+OK your.hostname .... (some copyright info)</pre>
... and you can type QUIT to get out of that.
<p> If that doesn't work you'll want to make sure that the
appropriate lines appear in your /etc/services and /etc/inetd.conf
files like so:
<pre>
/etc/services:
pop-3 110/tcp # PostOffice V.3
pop 110/tcp # PostOffice V.3
/etc/inetd.conf:
pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d</pre>
<P> If they appear commented out -- remove the leading hash
sign(s) (or paste these samples in) and restart your
inetd with a command like:
<pre>kill -HUP `cat /var/run/inetd.pid`</pre>
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
2. When I log on to my ISP, I download my mail and it gets dumped to the
sendmail, this creates a situation where the mail is bounced back and
forth until it passes the hop limit and is dumped as an error message in
the postmaster box, and a nasty letter is send to the originator from
MAILER-DEMON... I think this maybe because I'm running a local area
network between my two machines, the IP address of the local net is
162.blah.blah... But I also have the IP address the ISP gave me in the
host file.
If the ISP's IP address is the problem can I remove it from the host
file, and just get a duynamic IP when I connect?
Thanks in advance!
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
This is a bigger problem. First the 162.*.*.* is probably
not what you want to use for you disconnected LAN. There is
an RFC 1918 (originally RFC 1597) which describes and reserves
a set of addresses for "non-Internet" use. These are guaranteed
not to collide with any valid (routable) hosts on the 'net.
Here's the list of those addresses:
<pre> 192.168.*.* (255 class C address blocks)
172.16.*.* through 172.31.*.* (15 class B address blocks)
10.*.*.* (one class A address block)</pre>
... use those however you like. Be sure to keep them behind your
own routers (make any hosts with those go through an IP masquerading
or NAT -- network address translation -- router, or through a
SOCKS or other proxy server).
<P> The next problem is configuring sendmail for use on a
disconnected system. You probably need to define your
hostname (or an alias to your hostname) to match what your
ISP has named you. Each ISP seems to use a different way to
manage these "disconnected sendmail subdomains" -- with no
standardization in site (which is why I use UUCP).
I gather that some people use a scheme where they only run
sendmail when they are connected. The rest of the time
their MUA (mail user agents like elm, pine, mh-e, exmh, etc)
just drop outgoing mail into the mqueue directory where
'sendmail' will get to it later.
One problem I have with these configurations is that
sendmail wants to look up these remote hosts. This
seems to cause various problems for users of "disconnected"
or "periodically connected" (dial-up) systems.
So far the only solutions I've found are:
recompile sendmail without DNS support (there used to
be a sendmail.cf switch that disabled DNS and reverse DNS
activity in sendmail -- but that doesn't seem to work any more)
use UUCP. UUCP was designed for disconnected (dial-up)
and polling systems. It's what I use. The disadvantage
to UUCP is that it's a bit hard to set up the first time
-- and you have to find a provider that's willing to
be your MX/SMTP to UUCP gateway. There are still some
people out there where will do this for free or at only
a nominal fee. But they are increasingly hard to find.
I use a2i Communications in San Jose. You could use
a non-local provider if you want to use UUCP over TCP
as the transport mechanism (UUCP is pretty flexible
about the underlying transports -- you could probably
use tin cans and string as far as its concerned).
<P> There are several HOWTO's that try to cover this topic.
Try browsing through some of these:
<UL>
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html">ISP Hookup HOWTO</a>: Basic introduction to hooking up to an ISP.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/Mail-HOWTO.html">Electronic Mail HOWTO</a>: Information on Linux-based mail servers and clients.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Mail-Queue">Mail Queue mini-HOWTO</a>: How to queue remote mail and deliver local mail.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Offline-Mailing">Offline Mailing mini-HOWTO</a>: How to set up email addresses without a dedicated Internet connection.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/UUCP-HOWTO.html">UUCP HOWTO</a>: Information on UUCP software for Linux.
<LI><a
href="http://sunsite.unc.edu/LDP/HOWTO/mini/Sendmail+UUCP">Sendmail+UUCP
mini-HOWTO</a>: How to use sendmail and UUCP together.
</UL><P>
--
Jim
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
Thanks so much for the detailed suggestions. We have installed a newer version of pop3 on our server for now and we will look into the feasibility of implementing some of your suggestions for a final cure.
Thanks again, James, we really appreciate it.
<br>-Sam Hillman, Service Manager, Easyway Communications.
</B>
<p><hr><p>
<!--================================================================-->
<a name="crypt"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Cryptographic System
</h3>
<P> <B>
From:Emil Laurentiu <a href="mailto:emil@interlog.com">emil@interlog.com</a>
</B><P><B>
Hello Jim,
</B><P><B>Sorry for bothering you but I would apreciate a lot an answer
even a short one like 'no' :)
I am (desperately) searching a crypographic system for my Linux box.
I am already using TCFS but I'm not very happy with it for several
reasons: it is slow, I experienced some data loss, must use the
login password, cannot share encypted files with other users,
NFS - increses security riscs.
And the people in Italy seemed to have stoped work on this project
(latest version is dated february).
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
February doesn't seem that old.
<P> Are you sure you're using the latest TCFS (v 2.0.1)?
You can find that at: <a
href="http://pegaso.globenet.it/~ermmau/tcfs/">http://pegaso.globenet.it</a>
(which is a web form leading to an HTTPS page -- so use
and SSL capable browser to get there).
<P> If you find it slow than any other decent encryption
is also likely to be too slow for you.
<P> You could look at <a
href="http://www.replay.com">http://www.replay.com</a> (in the Netherlands).
This has the best collection of cryptography software I've
seen anywhere.
<P> The two fs level alternatives to TCFS are CFS (Matt Blaze's
work, on which TCFS was based) and userfs (which support a
few different user-level filesystem types including an
experimental cryptographic one.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
I am wondering if you know anything about an encryption at the
file system level. Something like SecureDrive (from DOS :) which
did IDEA encryption on the fly at sector level for a partition and
was very fast.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Are you sure SecureDrive is using IDEA? I rather doubt
that.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
As an (almost) single user on my linux machine something like this
would be more apropriate.
Of course if I would not find one I'll finish by writing it by myself.
My only concern is that I've been a Linux user only for half a year
and I did not get the chance to study the kernel to well (this will
be a good opportunity :)
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Why not pick up on the TCFS or CFS work? Why not
build on the userfs work (plugging in whatever encryption
you like)?
<P> Why write it "by yourself" when you can collaborate with
other members of the Linux community as they have done
to bring you Linux itself, and as the FSF and others have
done to bring you the GNU packages which turn Linux into a
full OS?
<P> What you asking for doesn't need any support at the kernel
level. userfs and CFS already have shown that. The Linux
kernel already support a robust and open filesystems interface
(which support more different filesystem types than any other
-- with read-only support for HPFS, NTFS, BSD and Sun UFS/FFS,
and support for HFS (Mac), ext2fs, xiafs, Minix, and many others.
<P> If you're a competant programmer (which I am not, BTW) you
should be able to trivially take the sources for any of the
existing filesystem modules and hack together your own
with the encryption support of your choice. How secure the
result will be will be a matter of your skills -- and should
be greatly improved by peer review (by publishing your work
for all to see).
<P> Naturally if you are in a free country you can share your
work on cryptography with the world. However the USA doesn't
appear to currently be free in this particular respect --
please find a congress critter to vote out of office if this
oppresses you.
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="ref"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
An Interesting De-Referencing Problem
</h3>
<P> <B>
From: Kevbo <a href="mailto:simitar@lvnworth.com">simitar@lvnworth.com</a><br>
</B><P><B>Here's the brain teaser I read about and promptly forgot the solution
(because I thought it would never happen to me). How does one delete
a FILE named ".."
I have the following at the root directory.
</B><ul>
<li>/. a dir (which is normal)
<li>/.. a dir (which is normal)
<li>/.. a file (which is not normal)
</ul>
<P><B>How this happened I don't know. How to remove this not-bothering-me file
has me stumped. Got an answer?
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
I suspect that this file is actually named something
like: "/.. " (note the trailing space!).
<P> In any event you can remove this with a command like
<pre> find / -type f -maxdepth 1 -name '..*' -print0 | xargs -0 rm
-i</pre>
<P> Note: you must use the GNU versions of find, xargs, and rm
to ensure that these features (-print0, -0, and -i) are
available. (They may be available in other implmentations --
but you must check first).
<P> The find parameters here specify files (not directories,
symlinks, device nodes, sockets, or FIFO's) and force it
to only search the named directory (or directories if you
list more than just /). The -print0 force it to be written
as a null-terminated strings (thus the receive process on
the other end of the pipe must be able to properly interpret
null-terminated arguments -- which is what the -0 to xargs
accomplishes).
<P> As far as I know there is no way to legally get a NUL character
into a Unix filename. (Using a hex editor might get one in there
-- but fsck would probably complain on its next pass).
<P> The <tt>-i</tt> on rm is just a little extra protection to prevent
any other unexpected side effects. It forces rm to interactively
inquire about each argument before removing it.
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="remind"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Reminder!
</h3>
<P> <B>
From: George Read <a
href="mailto:gread-berkeley@worldnet.att.net">gread-berkeley@worldnet.att.net</a><br>
</B><P><B>
I am a subscriber to caldera-users, but as a rank newbie, 99% of what
gets posted is irrelevant to my situation and over my head. In fact,
I'm looking for some real basic, preliminary information:
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Perhaps you should consider some avenue of paid support.
there are a number of consultants and even a 900 support
line.
<P> Also, if you have access to IRC there are a few #Linux
"channels." (If you've never heard of IRC -- or Internet
Relay Chat -- then think of it as an online CB system --
similar to the "chatboards" and "chat lines" on various
BBS' and online services (like CompuServe and AOL)). Granted
IRC is a bear to figure out -- and 99.9% of what's written there
is even less relevant or comprehensible than the traffic on
this list. However the feedback is immediate and there are
some people who will take time out from their usual chat
aggenda to help.
<P> There's also that pesky "Answer Guy" from Linux Gazette ;)
(but he's too ornery and doesn't help with X Windows stuff
at all).
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
1. A way to create a primary Linux partition on a drive that is entirely
occupied by a dos active and a dos extended partition. The extended
partition has 400MB available that does not have any data on it, but LISA
2.3 does not wish to give it a primary partition.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
You have three choices here. You can repartition the drive
using traditional methods (backup your data, reformat, re-install
DOS and all applications, restore data). You can repartition
using FIPS (a non-destructives partitioning program for DOS --
written by Linux or FreeBSD users from what I gather). If you
use FIPS the process goes something like: do a backup, verify
your backup, unfragment you DOS partitions, run CHKDSK and/or
Norton Disk Doctor and/or SCANDISK, then run FIPS.
<P> Another approach -- and the only one I know of that doesn't
involve repartitioning -- is to use MiniLinux or DOSLinux or
XDenu. These distributions (of which DOSLinux is the most
recent and must up-to-date) are designed to run on a UMSDOS
partition (an MSDOS partition mounted under Linux with
support for some Unix semantics). You would be running COL
-- but you would be running Linux.
<P> You can find information about DOSLinux at Kent Robotti's
home page:
<a
href="ftp://wauug.erols.com/pub/people/kent-robotti/doslinux/index.html">ftp://wauug.erols.com/pub/people/kent-robotti/doslinux/index.html</a>
(Kent is the creator and maintainer of DOSLinux).
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
2. a workaround to a problem with RAWRITE3: I can't see my COL Base cdrom
on a Nakamichi MDR7 jukebox that is controlled by a BusLogic 946C, because
Autoprobe can't find anything and I can't get RAWRITE3 to write MODULES.IMG
to a floppy on A:.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Have you tried supplying the "max_scsi_luns=7" parameter
to the kernel during the bootup sequence (at the LILO prompt).
<P> Normal SCSI controllers support up to 7 devices. It is
possible for these controllers to refer to "Logical Units"
on any/all of these devices. These "logical unit numbers"
or LUN's aren't very common -- but are used by CD changers
(which is why most of them are limited to 6 or 7 CD's) and
some tape changes (though those usually use a different
mechanism to control tape changes and ejections) and some
RAID subsystems and CD-ROM "towers."
<P> I have a NEC 7 platter CD changer which requires this parameter.
This suggestion assumes that the problem is isolated to the
CD drive -- and that your kernel (LISA's) is seeing the BusLogic
card. If the problem is that you can't even see the SCSI controller
-- then you probably want to look for an alternative boot/root
diskette set and boot from that.
<P> One of the nice things about user's groups is that you can
often have the phone numbers of some local Linux users that
will cut you a custom kernel on request and let you pick up
the floppy. I'd highly recommend finding (or starting)
a local LUG. I've occasionally had people come over to my
place where we could plug them onto my ethernet and suck
all the free software they want across from one of my systems.
<P> (Which reminds me -- I've been meaning to get PLIP working
for a couple of years now -- I should really get around to
that).
<P<B><img align=bottom alt=" " src="../gx/ques.gif">
For these reasons, I ask: Is there any way to ask caldera-user users for
some help on these two questions, sent to my own email address, and not have
to read 20 or 30 messages that I can't profit from, at least until I get COL
up and running. I had hoped from the name that Post-Only might be such an
address, but I see that it is something very different.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Caldera has some support options. I think some of them are
extra cost items. Have you called them about your Caldera
specific questions?
<P> At first blush it doesn't look like Caldera's COL is the
best Linux distribution for your needs. If you're intent
on using COL -- and particularly if you have a business
need for Linux -- I'd recommend going out and buying an
additional drive. For a couple hundred bucks (US) you can
get a 2Gig external SCSI drive (www.corpsys.com if you don't
have a suitable vendor handy).
<P> Even if you're just experimenting with Linux and don't want
to "commit" to it -- an extra external SCSI drive with
a couple of Gig of space is a handy investment for just about
ANY operating system. It's pretty convenient to connect
the extra drive, and just make a copy of everything from your
main system.
<P> If your time is worth more than $20/hr you can easily make
the case for buying a $200 to $300 hard drive. Doing full
system and data backups, and verifying them prior to
repartitioning can be pretty time consuming. Even if you
already have a scheduled backup habit (let's face it --
most don't) and even if you have a regular recovery test
plan (which almost nobody bothers with -- often to their
detriment!) -- doing a major system change (like repartitioning)
almost requires an extra "full" backup and test cycle.
<P> (I have customers who've run the cost vs. time numbers
for their situations and justified buying a full system and
hired me to do the configuration on the same basis. The
"extra" system becomes part of the recovery plan for major
system disasters).
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="pcmcia"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
pcmcia ide Drives
</h3>
<P> <B>
From: Alan C. Sklar <a href="mailto:CS266446@wcupa.edu">CS266446@wcupa.edu</a><br>
</B><P><B>
I am trying to install a pcmcia drive through a kit I purchased.. I got
the drive all ready I formatted it with a desktop machine and bot my win
95 and linux partitions are defiend... But now when I go and boot linux
I send the commad ide2=0x170 and it loads it identifies the right drive
but I get all sort of errors... Can you help? <br>
C. Alan Sklar
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
I don't have enough information to help with this one.
Is this a laptop or a desktop with a PCMCIA adapter
installed? In either event what is the make/model
of the system?
<P> Do you have PCMCIA support installed and built into the
kernel? What modules do you have loaded? What does your
/etc/pcmcia/config.opts file look like? What type of
hard drive is this (make and model)?
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="kde"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
KDE BETA 1
</h3>
<P> <B>
From: Eric Wood <a
href="mailto:eric@interplas.com>eric@interplas.com">eric@interplas.com</a><br>
</B><P><B>
This should be the most handy tip known to man!
If a certain application (I don't care what it is) complains about
missing a library and you know that
the library it's wanting is in a certain directory THEN:
</B>
<ol>
<li>Add *that* directory to the /etc/ld.so.conf file.
<li>Rerun /sbin/ldconfig
</ol>
<P><B>That's it. What is does is it tells Linux to search the directories
specified in /etc/ld.so.conf
for library files. Forget about the stupid LD_LIBRARY_PATH variable.
Everyone: Please read the
ld.so man page for further knowledge.
<br>
Eric Wood
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
I recently trashed my /etc/ld.so.cache file and
had forgotten how to fix it (since the last time
I'd had a damaged ld.so.cache was on an old Sun
a couple of years ago -- and I've never had one on
a Linux box before.
<P> Post that to your tech support archives:
<P> System hangs on boot -- even with -b and
single switches -- or it gives messages
like "unable to open ls.so.cache" in a
seemingly endless stream:
<pre> Run /sbin/ldconfig!</pre>
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="program"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Compression Program
</h3>
<P> <B>
From: Cygnus <a
href="mailto:caldera-users@rim.caldera.com">caldera-users@rim.caldera.com</a><br>
</B><P><B>
Anyone know of any programs for linux that decompress multi-part
(multi-disk) .zip archives? I can't find a one.
<br>-Cygnus
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Most Linux distributions come with the free zip/unzip
package. Here's the -L (license) notice from my Red Hat
4.2
<P>"Copyright (C) 1990-1996 Mark Adler, Richard B. Wales, Jean-loup Gailly
Onno van der Linden and Kai Uwe Rommel. Type 'zip -L' for the software License.
<P>Permission is granted to any individual or institution to use, copy, or
redistribute this executable so long as it is not modified and that it is
not sold for profit."
<P> I think there's a source package for "Info-zip" also floating
around. I don't know if this is Info-zip or an independent
version -- looking in /usr/doc/unzip*/COPYING I find Mr. Rommel
listed -- and that document is definitely about Info-zip.
<P> For the future you might try the 'locate' command -- which is
fairly common among Linux distributions. The command:
<pre> locate zip</pre>
<P> ... will quickly find every file with "zip" in the name or path
that was on your system during the last "updatedb" run
(which is typically a cron job that's run nightly).
<P>
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="loadlin2"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
loadlin
</h3>
<P> <B>
From: Scott Williams<a href="mailto:scott@gyst.net">scott@gyst.net</a><br>
</B><P><B>
Answer guy,
To run LOADLIN I need to have a copy of the LINUX kernel on one of my
dos partitions, and an initial swap space. No where can I find an
actual explaination on how to do this correctly.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
You don't need an initial swap space to run LOADLIN or
to load the kernel. If you have 8Mb or more of RAM you
don't "need" to have a swap space at all -- but you'll
probably want one.
You can swap to a file or a partition -- or even several
of each. Assuming that you don't have Linux installed
yet you can view man pages for most Linux/GNU commands,
functions, packages, and configuration files at:
<a href="http://www.ssc.com/linux/man.html">http://www.ssc.com/linux/man.html</a>
<P> ... in particular you want to read the mkswap(1) and the
swapon(8). The man pages there are accessed via a
CGI script so you have to post data to a form to access
the individual pages. Thus I can't give URL's directly
to the pages in question. That's an unfortunate design
decision by the web master at SSC -- it would be more
convenient to access (and cause less server load and
latency) if they used a cron job to periodically update
a tree of static HTML pages and saved the CGI just for
searching them.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
Every time I try to copy the kernel to a dos diskette, Linux overwrites
the formatting. DOS then cannot recognize the file from the LOADLIN
command.
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
It sounds like you're using 'dd' or RAWRITE.EXE to prepare
these diskettes. That's fine for transferring boot/root images
-- but has nothing to do with LOADLIN. To use LOADLIN.EXE
you copy the kernel image to a plain old DOS file.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">
I haven't even gotten far enough to think about creating an initial swap
space...
Any advice on the subject?
<br>Scott
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
I'd consider getting a copy of DOSLinux from
ftp://ftp.waaug.erols.com/pub/people/kent-robotti/doslinux.html
(Yes there are still some people out there serving HTML
pages via FTP -- nothing in the HTML spec *requires* that
HTTP be used as the transport mechanism).
<P> Kent Robotti has been working on this distribution for
awhile. It takes about 32Mb of space on a DOS partition
-- and comes as a set of six 1.44Mb files (so if fits on a
half dozen diskettes). You then add a kernel for SCSI or
IDE use.
<P> Basically DOSLinux works like this. You get all the
RAR files (RAR is a Russian Archiving Program like
PKZIP, SEA ARC, ARJ, LHARC, ZOO, or whatever). The first
image is a self-extracting file (an archive which is linked
with a DOS binary of the decompression program -- a common
DOS technique among archiving programs). You put these
all in a given directory and run the self-extractor
(DOSLNX49.EXE as I write this -- it was at "48" a couple
weeks ago) from C:\. It thenn extracts all of these images
to C:\LINUX directory.
<P> This provides a complete (though minimal) Linux distribution.
It also shows how to configure a system to use LOADLIN with
a UMSDOS root partition.
<P> I realize that you may be intending on use something like
Red Hat, Slackware, or Debian on a third hard drive, or a
removable drive or some other device that LILO just can't
see (because you BIOS can't "see" it). You can do that --
and I've done in many times (I first used LOADLIN in about
1994 for exactly that purpose -- with the magneto optical
drive I still use). However, if the README's and examples
that come out of the LOADLIN package aren't helping you
use if for that purpose -- than installing DOSLinux may
help get you rolling and serve as a vang DOSLinux may
help get you rolling and serve as a valuable example.
--
Jim
<p><hr><p>
<!--================================================================-->
<a name="wipe"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
WipeOut
</h3>
<P> <B>
From: Falko Braeutigam <a
href="mailto:falko@softwarebuero.de">falko@softwarebuero.de</a>
</B><P><B>
Hi,
in Linux Gazette Issue 22 there was a question about the WipeOut IDE.
Your answer was that you never heard about WipeOut :-( Please check
ShortBytes of Issue #19 - there is an announcement of WipeOut.
WipeOut has nothing to do with xwpe. It _is_ an IDE for C++ and Java.
There is just a new release ->
<a
href="http://www.softwarebuero.de/index-eng.html">http://www.softwarebuero.de/index-eng.html</a>.
<br>Regards,<br>
Falko
</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
This definitely counts as my biggest flub in the
10 months that I've been writing this column. I've
gotten about 10 messages correcting me on this point.
<P>
--
Jim
<!--================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, James T. Dennis <BR>
Published in Issue 23 of the Linux Gazette December 1997</H5></center>
<P> <hr> <P>
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="lg_bytes23.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./boulder.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <HR> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>Boulder Linux Users Group -- Best of Luck to Michael Hammel</H2>
<H4>By <a href="mailto:allen@boulder.Nist.gov">Wayde Allen</a></H4>
</center>
<P> <HR> <P>
<P>Well since Michael Hammel was our featured speaker for the evening we had
our obligatory snow storm (grin). It is amazing that every time he
attends one of our meetings this happens. Nevertheless, we still had 24
people in attendance.
<P>For those of you who don't know Michael, he writes the <a
href="./gm.html">Graphic Muse</a> column
for <i>Linux Gazette</i>, maintains the Linux Graphics mini-HowTO, helps
administer the internet <a href="http://irtc.org">Ray Tracing Competition</a>,
coauthored the UNIX Web Server book, designed the magazine cover for the
November issue of <i>Linux Journal</i>, and is also the author of a four part
article "The Quick Start Guide to the GIMP" now running in <i>Linux
Journal</i>.
<P>His presentation started out with a demo of the GNU Image Manipulation
Program (GIMP) showcasing many of its features, and perhaps more
importantly giving us all an idea of what it could do. The discussion
then turned to GUI builders. The group discussed their experiences,
likes, dislikes, advantages, disadvantages, and general opinions of many
different GUI design software packages. Supporting this discussion,
Michael showed us examples of GUI building using XForms (I hope I've got
this right) and Visual TCL.
<P>After this discussion, Michael showed a 10 minute video tape of Toy Story
animated shorts done by Pixar. I think that everyone got a few good
laughs from this. We then held a drawing for two CD's from the Internet
Ray Tracing competition, and a copy of the November <i>Linux Journal</i>.
As usual, we wrapped up the evening with a general discussion
of Linux related topics.
<P>Since Michael is moving to Dallas next week, I particularly want to thank
him for his support of our group!!! I have appreciated him taking the
time to talk to us, and have always enjoyed his presentations. I want to
wish him the best of luck at his new job. It might be a good idea to warn
the North Texas Linux User's Group of an impending change in their weather
though (very big grin). Perhaps he can continue to participate in our
discussions on the mailing list?
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Wayde Allen<BR>
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./lg_answer23.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./clue.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h2>CLUELESS at the Prompt: A Column for New Users</h2>
<H4> By
<a href="mailto:troll@net-link.net">Mike List</a></H4> </center>
<P><HR><P>
<center><IMG ALIGN=MIDDLE SRC = "../gx/list/gnub.jpg" ></center><p>
<h4>Welcome to installment 8 of Clueless at the Prompt:
a column for new users.</h4>
<P><HR><P>
<b>.bashrc and .bash_profile</b>
Well, I found out why the bash dotfiles I talked about last month didn't work, and
there were a couple things I did wrong. First I didn't recognize the difference
between instances of bash and how they differ.
<ul>
<li> bash as a login shell reads instructions from .bash_profile
<li> bash as used in any other instance is a non-login shell and will either use
.bashrc or no .dotfile depending on what -option you assign to it.
<li> presumably the same could go for any preferred shellrc files
<li> the correct way to specify an alias is <pre> alias xx=whatever -options.</pre>
notice that there is no white space between the alias name, the equal
sign, and the command that the alias represents
</ul><p>
Besides aliases you can do also change the color of your console screen
with your .bashrc or .bash_profile, by using commands like:
<pre>
"/dev/tty1") setterm -background green -foreground black -store;;</pre><BR>
By the way
I found this out by reading back issues of the Linux Gazette, and you might find
some other little gems, just by digging into past issues.
<hr><p>
<b>Installing Software</b><p>
One very tricky procedure for new linuxers is installing software. Several months ago I
touched on this subject, apparently not in enough depth, so I'm going to give it another go this
time with a little more experience under my belt.
The best advice I can give you if you are using debian, redhat, or caldera distributions is to
look for the software you would like in a compatible package format, ie. RPM for redhat-caldera,
and deb for debian. These are most commonly binaries and don't require much to get
running.Slackware has packages in tgz format, but this can be misleading, as some source
packages are inexplicably given a .tgz extension. If you get your software from the CDROM you
should be set, with packages for a given distribution on that CD. Ifg you got your distribution
from an ftp site, try using the most appropriate software found on that site, to see if it fits
your needs. If not, you should check out the Linux Software Map, to see what kind of
alternatives there are for the kind of applications you want. if you have disk space, I
recommend that you choose a couple that seem to be close to what you are looking for, install
them and use them for a short period to see which is more suitable for your uses. Sad but true,
some software compiles easily, but you will probably find that many others take some hacking,
and some doesn't seem to compile at all. You are at a distinct advantage if your Linux
distribution conforms to the Linux FSSTND, which tends to assure that paths to libraries are the
same in your distribution as they were in the distribution that they were written for/in.
With enough hacking however, all of the software that has been compiled on one distribution can
be compiled on any other.<ul>
<li>Use Midnight commander or similar filemanager to look at the contents of the compressed
archive for clues. look at files called README, README.elf, INSTALL or other similarly named
files for information on how to compile or install them. This isn't always easy as it sounds,
but often directions are specific enough to get you on your way.
<li>before unpacking a tarball create a directory to unpack it in and cd to it before using
<pre> tar -zxvf filename </pre>
to unpack it, since sometimes the untarring doesn't create a
separate directory and if you just unpack it in an existing directory you could get a real
ugly situation when you get a bunch of disjointed files cluttering up your directory. you can
also use tar -cxvf or similar combination to get a listing of the files that would be unleashed
when you use the -z option. This will tell you if the files have a designated pathname which
means that it will create its own directories and subdirectories that will keep the parent
directory nice and tidy.
<li> It's a very good idea to print out the README, INSTALL or similar files before you start to
compile the software, so you can refer to the documentation as you go. If you don't have lpr
configured properly yet, you can use
<pre>cat README |pr -l 56 >/dev/lp0</pre>
(or lp1, or whatever). Using the -l 56 option should paginate the file so
that page breaks occur where they should.
<li> When you read the documentation, keep an eye out for any indication that you need, say
Motif or Xforms or other libraries or toolkits that you don't have installed,if you don't have
them you won't have a compiled application either.
<li> Alternatively to printing the documentation out to paper, if you have X installed use
separate xterms to view the docs and configure, and make the application.
<li>Remember, most Linux archive maintainers keep a close eye on their sites so it's safe to
download and install a binary if it's available.</ul>
<hr><p>I'm not really a Linux guru, and I'm starting to get into more
advanced (??) stuff, and my intent was and still is to present information
that a new user can implement now and research at his/her convenience, I'm
not trying to be the Weekend Mechanic OR the Answer Guy, although I aspire
to their level of Linux prowess. Briefly put, although it's a little late
to be brief, I may not be appearing monthly after this issue, since I
don't want to write just to hear myself type, I'll likely post a column
when I can nail down a column's worth of information.
<hr>
<p> I still invite questions, suggestions, reasonable criticism and just
plain e-mail:
<center><a href="mailto:troll@net-link.net">troll@net-link.net</a><p>
<b>Don't M$ out, try Linux!!</b></center>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Mike List<BR>
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./boulder.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./comdex.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>COMDEX/Fall '97</H2>
<H4>By <a href="mailto:mktg@ssc.com">Carlie Fairchild</a></H4>
</center>
<P> <HR> <P>
Las Vegas, Nevada is host each year to one of the
largest technology trade shows in the U.S.--COMDEX/Fall.
This year nearly 220,000 industry
professionals lined up to find, test and research the latest
technologies from the leading industry vendors.
<P>
Earlier in the year the staff of <I>Linux Journal</I> volunteered to
coordinate the COMDEX/Fall
Linux Pavilion. Coordinating the event turned out to mean hours of
preparation,
and, luckily, vendors were quick to lend a hand. Kit Cosper of Linux
Hardware Solutions managed to talk the spirit of Linux into
Softbank, the sponsor of the COMDEX show. As a result, COMDEX personnel
were very cooperative and worked with us to ensure that the floor space
for the pavilion was in the best possible site; that is, we weren't hidden
away in a back corner.
<P>
Attendees seemed pleased to find many of their favorite
Linux vendors in one convenient and easy-to-find area.
Vendors present
included Caldera, Linux Hardware Solutions, Enhanced Software Technologies,
S.u.S.E., Red Hat Software, Hard Data, Quant-X, Infomagic, LinuxMall, Linux
International and, of course, <I>Linux Journal</I>.
<P>
Jon "maddog" Hall barely held his own against the hordes of Linux
enthusiasts visiting the Linux International booth. Several
members of the Linux community kindly volunteered their time to
staff the Linux International booth, answering questions and
spreading the word about Linux. Volunteers included Marc Merlin,
Ira Abramov, Dan Peri and Richard Demanowski.
<P>
Red Hat Software announced the December 1 release of Red Hat Linux 5.0.
To mark the event, Red Hat balloons filled the Linux Pavilion area of
the convention center. The Linux mascot, Tux the penguin, was carried away
in all of the excitement (see photo).
<P>
S.u.S.E., a popular European Linux vendor, also announced the latest
release of their Linux distribution, S.u.S.E. 5.1. This was S.u.S.E.'s
first appearance at COMDEX, and considering their rapid growth in the
U.S. market,
it will most likely not be their last. Their distribution demonstrations
proved to be great crowd pleasers, compliments of Bodo, Rolf, Michael and
James Gray, the President of S.u.S.E. U.S. (See review of S.u.S.E. in this
issue.)
<P>
Clarica Grove, Britta Kuybus and I staffed the <I>Linux Journal</I> booth.
We were quite pleased with the turnout of this year's show.
During last year's COMDEX, we were kept busy explaining what Linux is
to all comers.
We were pleased to find that this year's COMDEX attendees had remembered
and done their
homework from last year. Not only did most people we
spoke with know about Linux, but many of them are using it and very
excited with their results.
It goes to show that the popularity of Linux is indeed growing.
Linux is being looked at more than ever as a cost-effective, viable
operating system. Thanks to years of dedicated work by all of the Linux
vendors, Linux International and the Linux community, we are now able to
begin enjoying the success of Linux. This year's COMDEX Linux Pavilion
was a showcase of this success.
<P>
Linux Journal would like to thank everyone involved with this year's
show--look forward to seeing you there next year.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Carlie Fairchild <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./clue.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./procmail.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>Configuring procmail with The Dotfile Generator</h1>
<H4>By <a href="mailto:blackie@imada.ou.dk">Jesper Pedersen</a></H4>
</center>
<P> <HR> <P>
<a href="http://www.imada.ou.dk/~blackie/dotfile/"><img width=100 height=94
align=right border=0 src=./gx/pedersen/gray-g3.gif></a>
In this article, I'll describe how to configure procmail using The Dotfile
Generator (TDG for short). This will include:
<ul>
<li> How to sort mails coming from different mailing list
<li> How to setup an auto reply filter, when you are on vacation
<li> How to change some part of a letter, i.e. remove the signature
<li> How to avoid that mail get lost!
</ul>
It might be a good idea to download the program. To do that, please go to
the <a href="http://www.imada.ou.dk/~blackie/dotfile/">home page of
TDG</a>, to find the nearest mirror. You might also be interesting in
reading <a href="http://www.imada.ou.dk/~blackie/dotfile/TDG/">the
article</a> I've written about TDG for <a href="http://www.linuxjournal.com">Linux
Journal</a>.
<p><hr><center><h1>Starting TDG</h1></center>
To start TDG with the procmail module, type <tt>dotfile procmail</tt>. Now
a window should appear like in figure 1. As you can see, the module is split
up in three pages, the first two are very simple, so lets start with the page
called <tt>General Setup</tt>. This page can be seen in figure 2.<p>
<table CELLSPACING=1 CELLPADDING=4 WIDTH=100% COLS=2>
<tr>
<td align=top>
<center><img width=203 height=193 src="./gx/pedersen/main.jpg"><p>Figure 1</center>
<td align=top>
<center><img width=414 height=277 src="./gx/pedersen/general.jpg"><p>Figure 2</center>
</table>
On this page there are four things, to configure:
<ol>
<li> The directory to use as prefix for all file operations. This is just
for ease, since all file operations may be with full prefix.
<li> Your email address, will be used in preventing loop-backs.
<li> Configuration of log files. These are very
useful, when you wish to investigate where
the different mail went. If you turn on <i>abstract logging</i>, you
may find the program mailstat very useful. (See <a
href="#aboutlog">The log file</a> below)
<li> The search path, in which procmail may find the programs which it
needs. Note this is only the programs, that you specify in filters etc.
</ol>
<p><hr><center><h1>Avoiding lost mail</h1></center>
Since procmail handles your incoming mail, the security is very important
to this module. This means that you may backup your incoming mail in three
different ways. To do this, go to the page called <tt>Backup</tt>. Part of
it can be seen in figure 3.<p>
<center>
<img width=442 height=418 src="./gx/pedersen/backup.jpg"><br>
figure 3
</center><p>
The first category of backup is to back up all incoming mail. The code, which
must be generated to the procmailrc file for this, will be written as the
very first line. This is to avoid that any errors in the generated procmail
file will throw away any of your mails. This sort of backup is only a
good idea when you at first start using the generated procmail file. The main
drawback is that all incoming mail is saved in <b>one</b>
file, and this file may become huge very fast.<p>
<a name="method2">The</a> second method is to backup all incoming mail, which are delivered by
procmail. This may be a good idea to use, to verify that mail are
sorted into the right places.<p>
The third method is to backup all mail, which makes it to your incoming
mailbox. This mail are often mails, which do not come from a mailing list,
and which are not junk mail to thrown away.<p>
In the first method, you have to specify the full filename. This is because
this method has to be 100% full prof. In the next two methods you may build
the file names from the current date and time. This makes it
possible to save this sort of mail to folders, for the current
year/month/week etc. E.g. a folder called backup-delivered-1997-July<p>
As an additional feature, you may keep the files as gziped files.<p>
The backup of delivered mail may be specified for each individual recipe,
or for all recipes at once. (see figure 4 check box 9)
To learn how to use the FillOut elements, which configures the file to save
to, please see <a href="http://www.imada.ou.dk/~blackie/dotfile/TDG/">the
Dotfile Generator article</a> in Linux Journal.
<p><hr><center><h1>Setting up the recipes</h1></center>
In procmail a central concept is a <i>recipe</i>. A recipe is a set of
conditions, and a set of actions. All the actions are executed, if all of
the conditions is fulfilled. Below is a few examples of conditions:
<ul>
<li> The letter comes from president@white.house.com
<li> The subject is <i>subscribe</i>
<li> The size of the letter is greater than 1Mb
<li> The letter contain the text ...
</ul>
A list of actions may include:
<ul>
<li> Reply to the sender, that you are on holiday
<li> forward the letter to another person
<li> save the letter to a file
<li> change some part of the letter (i.e. add a new header field, add some
text to it etc.)
</ul>
A procmail configuration is a sequence of recipes. When a letter arrive,
each recipe is checked to see if all its conditions are fulfilled. If they
are, the actions of the recipe is executed.<p>
Procmail will finish testing recipes when one is matched, unless a flag is
set to tell it, that this recipe should not stop the deliverment (see
figure 4 check box 8). This means that the order of the recipes are
important, since only the first recipe, which match will process the letter.<p>
If none of the recipes are fulfilled, or if the ones which are fulfills
have check box 8 in figure 4 set, the letter is delivered to the incoming
mailbox as if the procmail filter haven't been there at all.<p>
You configure the recipes on the page called ``Recipes''. This page can be
seen in figure 4.<p>
<center>
<img width=477 height=553 src="./gx/pedersen/recipes-with-numbers.jpg"><br>
figure 4
</center><p>
What you see here is an ExtEntry. An ExtEntry is a widget, which repeats it
elements as many times as necessary (just like a list box repeats the
labels.) All what you see on this page, is one single recipe. To see a new
recipe, you have to scroll the outer scroll bar (1). To add a new
recipe, you have to press the button below the scroll bar.<p>
As described above, a recipe is a set of conditions. This set is also
represented with an ExtEntry (2). To scroll to another condition in a
recipe, you have to use scroll bar (2), and to add a new condition, you have to
use the button below scroll bar (2).<p>
You may give each recipe a unique name, which will make it easier to find a
given recipe. This name will also be written to the file with mail delivered by recipes (<a href="#method2">method 2 above</a>), so you can
see which recipe matched the actual letter. To give a recipe a name, use
entry (3). At the right side of the entry, a button labeled <tt>Idx</tt> is
located. This is a quick index to the outer ExtEntry (i.e. the recipes). If
you press this button a list box will drop down, where you may select one
of the recipes to scroll to, by its name.
<h2>The conditions of a recipe</h2>
The most common condition one wishes to set up, is that one of the header
fields matches a given regular expression, or that the body of the letter
matches a given regular expression. To explain how to do that, lets first
see what a header may look like.
<pre>
From procmail-request@Informatik.RWTH-Aachen.DE Tue Jan 28 16:30:46 1997
Date: Tue, 28 Jan 1997 10:06:28 -0500 (EST)
From: Rick Troxel &lt;rick@helix.nih.gov&gt;
Subject: Re: Lynx as an external viewer for pine
In-reply-to: &lt;Pine.LNX.3.95.970128011626.3854C-100000@sushi.uni-bonn.de&gt;
To: procmail mailing list &lt;procmail@Informatik.RWTH-Aachen.DE&gt;
Cc: "Robin S. Socha" &lt;uzs8kb@uni-bonn.de&gt;
</pre>
The very first line of the letter is special. This line has been
written by the program sending the letter (often called sendmail). This
header field is often always the same for a given mailing list, so to sort
mail from a mailing list, it might be a good idea to read the letter with an
ordinary file reader (<b>NOT</b> a mail reader, as it will seldom show this
line). And copy this information to the pattern field (figure 4, label
(6) ). As the element to match, you have to select <tt>Sendmail from</tt>
in entry (5). <p>
Three special macros exists in procmail. These may be used, when matching
header fields:
<dl>
<dt> TO
<dd> This macro matches every destination specifications.
<dt> FROM_DAEMON
<dd> This should match when the letter comes from a daemon (which
includes mailing lists). This is useful, to avoid creating a mail
loop with some mailing list.
<dt> FROM_MAILER
<dd> An other regular expression, which matches that the letter comes
from mail daemon.
</dl>
To see what these macros stand for, please refer to the manual page called
procmailrc.<p>
There is a lot of header fields to chose between in the pull down menu
(5), but if the one you wish to select isn't located there, you may type it
yourself.<p>
The check box (4) may be used to negate the condition, i.e. the pattern
shall not match to fulfill the condition.
<h2>Regular expressions</h2>
So far, I have mentioned that you may type a regular expression in (6). In
most cases, it may not be necessary to know anything about regular
expressions, since the procmail module will take care of most of it for
you. One thing may be worth to know anyway, and that is that you may match
``anything'' with <tt>.*</tt> This means that <tt>abc.*def</tt> will match
anything which start with abc and ends with def, eg. <tt>abcdef</tt> or
<tt>abcXXXXdef</tt>. To see a more detailed description of the set of regular
expression, that procmail uses, you may press the button labeled
<tt>Description</tt><p>
One common pitfall is to forget to match everything at the start of the
line. I.E. If you wish to set up a regular expression for the <tt>From:</tt>
field above, it is not enough to give the pattern:
<tt>rick@helix.nih.gov</tt>, since this is not at the start of the line,
you have to tell procmail that every mail messages, which includes the text
<tt>rick@helix.nih.gov</tt> is to be handled, I.E. insert <tt>.*</tt> in
front of the email address.
<h2>Letting an external program decide whether a condition is
fulfilled</h2>
A final way to set up a condition is by using an external program to verify
some conditions. This is done by pressing button (7). This will bring up a
window with a FillOut like the one you can see in figure 3. This time,
however, the entry has been replaced with a text box. In this text box you
may type some commands, which reads either the header or the body on
standard input. These command may refer to some header fields from the
letter. The line (separated with a newline) will be joined together with a
separating semicolon. This makes each line a separate command.<p>
Procmail will consider the condition fulfilled if the exit code from the
program is 0 and not otherwise. This behavior may be changed with the
check button (4) in figure 4.
<p><hr><center><h1>Actions</h1></center>
The actions, that this module can handle is split up in six parts. These
are described in detail below. To activate an action, you first have to
select the check box, which is located next to it. This is, to make it clear
which actions are enabled for a given recipe.
<h2>Predesigned filters</h2>
In the window which appear, when you press the button
labeled <tt>Predesigned Filters</tt>, you may set up a filter. This filter
may change the header fields, add new header fields and/or remove existing
header fields.<p>
On this page you will find one custom-made filter: <tt>Remove
signatures</tt>. With this filter, you may specify a signature for each
email address. If the text you specify is found (exactly!) it will be
removed from the letter. My intention is that more custom-made filters will
be added, as users send me their ideas and filters.
<h2>Handmade filters</h2>
If you wish to create your own filter, you have to go the page <tt>Handmade
filters</tt>. On this page, you may send the header and/or the body of a
letter through a command.<p>
As an example, you may remove the header with the command <tt>cat - >>
/dev/null</tt>, or add a message to the body of a message with the command
<tt>echo This letter has been resent to you, by my procmail filter!; cat -</tt><p>
If only the filter actions is selected, the
filter will change the letter permanently, i.e. the changes will have effect
on the subsequent recipes (even on the delivered letter, if no recipe
match!) This may be useful if you e.g. uses a mail reader, which does not
support mime, and you have a filter, which can convert mime encoded text to
7 bit ascii.<p>
If however one of the other actions are enabled, the changes will only have
effect within this recipe!
<h2>The reply action</h2>
With the reply action, you may set up a reply mechanism, which sends a
letter back to the sender, with a message you specify. One feature of this
mechanism is that you may specify how often a reply should be send, you
have the following possibilities.
<ul>
<li> Send a reply to each letter
<li> Send a reply only once
<li> Send only a reply if it is more than a given number of days since
the last reply was send.
</ul>
This is useful, if you leave on vacation, and wish to send a message that
you will not read your letter at once.<p>
The reply is only sent, if the letter does not come from a daemon, to avoid
that you sent a reply to every message on a mailing list.
<h2>The forward action</h2>
With the forward action, you may forward letters to other email
accounts.
<h2>The save to file action</h2>
With this action, you may save the letter to a file. The file name is
specified with a FillOut widget, just like you specified the name of a file
to save backups to. This time, however, you have two additional features:
you may use the content of a header field, or you may use the output from a
command. In figure 5, you can see how to select a header field to extract
as part of the file name.<p>
<center>
<img width=361 height=194 src="./gx/pedersen/header.jpg"><br>
figure 5
</center><p>
Email addresses may be given in three ways:
<ul>
<li> real name &lt;email&gt;
<li> email (real name)
<li> email
</ul>
If you select that the field is an email address, you may specify that you
wish to extract the user name with or without the domain part.<p>
Finally, you may pipe the header field though a command you specify
yourself. This command may read the value of the header field on standard
input, and write to standard output.
<h2>The pipe action</h2>
With the pipe action, you may specify a command, which takes care of the
letter. This command may read the letter on standard input, and may not write
anything (it will be ignored!).
<p><hr><center><h1><a name="aboutlog">The log file</a></h1></center>
The procmail file generated from TDG, contain lots of
comments, which should make it easy for you to find a specific recipe, in
case you wish to see what it look like.<p>
Should something go wrong, you may turn on extended diagnostic, this will
write additional lines to the log file, which lets you see what it does. To
debug this, you have to read both the log file and the procmail
file.<p>
If you use the <em>log abstract</em> options, you will find the program
mailstat very useful. This will tell you how many letters have been
delivered where. One line in the output from the mailstat programs is fake,
and that is the line, which says: <tt>/bin/false</tt>. This
line is due to the way that the generated code look. When you wish to throw
away a letter, in a way so you can explicit see that is has been dumped,
you should deliver it to the file called <tt>/dev/null</tt>. Please note
that you can only use the mailstat program, if extended diagnostic is
turned off.
<p><hr><center><h1>The End</h1></center>
Before procmail start filtering all your incoming mail, you have to add
the following line to the file called <tt>~/.forward</tt>:
<pre>
"|IFS=' ' &&exec /usr/local/bin/procmail -f-||exit 75 #YOUR_USERNAME"
</pre>
With the correct pathname for procmail, and your email address replaced
with <tt>YOUR_USERNAME</tt><p>
Here's a few link, which you may find interesting:
<dl>
<dt> The procmail mailing list
<dd> To subscribe to the procmail mailing list, send a letter to <a
href="mailto:procmail-request@informatik.rwth-aachen.de">procmail-request@informatik.rwth-aachen.de</a>. Letters to it should be send to <a href="mailto:procmail@informatik.rwth-aachen.de">procmail@informatik.rwth-aachen.de</a>
<dt> <a href="http://www.imada.ou.dk/LG/issue14/procmail.html">Procmail Mini-Tutorial in Linux Gazette</a>
<dd> In The Linux Gazette issue 14, Jim Dennis has written a mini howto
on procmail
<dt> <a href="http://www.ling.helsinki.fi/~reriksso/procmail/mini-faq.html">Procmail Mini-FAQ</a>
<dd> <a href="http://www.iki.fi/~era/">Era Eriksson</a> Has created an excellent FAQ for procmail, which may be worth visiting before you ask anything on the mailing list
<dt> <a href="http://www.imada.ou.dk/~blackie/dotfile/">The home page of
the Dotfile Generator</a>
<dd> At the home page of The Dotfile Generator, you may find additional
information about the other modules, which TDG contains (at the
moment this include: Bash, Elm, Emacs, ipfwadm, Fvwm1, Fvwm2, Tcsh
and Rtin).
</dl>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Jesper Pedersen <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./comdex.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./gm.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
&nbsp;<!-- =============================================================
This Page Designed by Michael J. Hammel.
Permission to use all graphics and other content for private,
non-commerical use is granted provided you give me (or the
original authors/artists) credit for the work.
CD-ROM distributors and commercial ventures interested in
providing the Graphics Muse for a fee must contact me,
Michael J. Hammel (mjhammel@csn.net), for permission.
============================================================= !--><!-- The Button box as a client side imagemap -->
<MAP NAME="nav-main"><AREA SHAPE="rect" HREF="#mews" coords="20,18 185,40"><AREA SHAPE="rect" HREF="#webwonderings" coords="10,60 185,83"><AREA SHAPE="rect" HREF="#musings" coords="90,102 185,130"><AREA SHAPE="rect" HREF="#resources" coords="70,152 185,180"></MAP>
<TABLE BORDER=0 COLS=2 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/gm3.gif" ALT="Welcome to the Graphics Muse" NOSAVE HEIGHT=216 WIDTH=441 ALIGN=LEFT></TD>
<TD VALIGN=BOTTOM>
<CENTER><FONT SIZE=-1>Set your browser as wide as you'd like now.&nbsp;
I've fixed the Muse to expand to fill the aviailable space!</FONT></CENTER>
<CENTER><FONT SIZE=-2>&copy; 1997 by <A HREF="mailto:mjhammel@csn.net">mjh</A>&nbsp;</FONT></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<HR WIDTH="100%">
<TABLE BORDER=0 COLS=2 WIDTH="100%" >
<TR>
<TD WIDTH="185"><IMG SRC="../gx/hammel/muse-image-map.gif" ALT="Button Bar"
BORDER=0 USEMAP="#nav-main" HEIGHT=200 WIDTH=185 ALIGN=LEFT></TD>
<TD VALIGN=TOP><B><FONT SIZE=+1>muse:</FONT></B>&nbsp;
<OL>
<LI>
<I>v;</I> to become absorbed in thought&nbsp;</LI>
<LI>
<I>n;</I> [ fr. Any of the nine sister goddesses of learning and the arts
in Greek Mythology ]: a source of inspiration&nbsp;</LI>
</OL>
&nbsp;<IMG SRC="../gx/hammel/w.gif" ALT="W" HEIGHT=28 WIDTH=36 ALIGN=BOTTOM>elcome
to the Graphics Muse! Why a "muse"? Well, except for the sisters aspect,
the above definitions are pretty much the way I'd describe my own interest
in computer graphics: it keeps me deep in thought and it is a daily source
of inspiration.&nbsp;
<CENTER><FONT SIZE=-1>[<A HREF="#mews">Graphics Mews</A>][<A HREF="#webwonderings">WebWonderings</A>][<A HREF="#musings">Musings</A>]
[<A HREF="#resources">Resources</A>]</FONT></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<BR><IMG SRC="../gx/hammel/t.gif" ALT="T" HEIGHT=28 WIDTH=26 ALIGN=LEFT>his column
is dedicated to the use, creation, distribution, and discussion of computer
graphics tools for Linux systems.
<BR>&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can it be true?&nbsp; Has it really
been a whole year for the Muse?&nbsp; Time surely travels more quickly
as we grow older.&nbsp; The lazy days of youth have left me forever, replaced
by the hectic life of adulthood and responsibility.&nbsp; I love it.&nbsp;
No wonder life was so confusing for me as a youth.&nbsp; I was bored.
<P>So, another busy month gone by.&nbsp; I'm still in the throws of pre-shipment
testing at work but fortunately my code seems to be pretty stable now.&nbsp;
I've even managed to get far enough ahead that I've been able to work at
home on other projects while the rest of the gang catches up.&nbsp; To
their credit, their stuff was harder to work on than mine.&nbsp; I got
to design and write my code from scratch.&nbsp; No legacy code for me.
<P>One of the things I've been working on is getting deeper into the GIMP.&nbsp;
If you haven't seen it yet, take a look at the November Linux Journal.&nbsp;
The first of a 4 part series I wrote on the GIMP was published in that
issue.&nbsp; I also have started to learn much more about how to create
interesting effects.&nbsp; If you have some free time and online-money
to burn, check out my <A HREF="http://www.csn.net/~mjhammel/gimp/gallery.html">GIMP
Gallery.</A>&nbsp; I've put most of my more interesting images there.
<P>This month I'm going to talk a little about how to use the GIMP to create
a frame with a 3D metallic or plastic look.&nbsp; The process turns out
to be fairly simply and is one you will probably get to know by heart if
you use the GIMP very often.
<P>I'll also cover my notes from SIGGRAPH '97.&nbsp; I wish I could have
done this right after I got back when the conference was still fresh in
my mind, but things didn't work out that way.
<P>Finally, I'll be covering JavaScript image rollovers - those cute little
image swapping thingies that many people have added to their Web pages.&nbsp;
You can do these using a number of different techniques, but I'm only familiar
with JavaScript right now so thats what we'll talk about.
<P>As usual, feel free to <A HREF="mailto:mjhammel@csn.net">send me comments</A>
on any of this.
<BR><A NAME="mews"></A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/mews.gif" ALT="Graphics Mews" HEIGHT=53 WIDTH=242 ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disclaimer: Before I get too far into this
I should note that any of the news items I post in this section are just
that - news. Either I happened to run across them via some mailing list
I was on, via some Usenet newsgroup, or via email from someone. I'm not
necessarily endorsing these products (some of which may be commercial),
I'm just letting you know I'd heard about them in the past month.
<BR>&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=30 VSPACE=2 HEIGHT=1 WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
<TR NOSAVE>
<TD WIDTH="50%" NOSAVE>
<H2>
CurveSoft announces release of FontScope.</H2>
CurveSoft(tm) is pleased to announce the availability of <B><I><FONT COLOR="#CC6600">FontScope</FONT></I></B>(tm):
A commercial, high-performance portable rasterizer ibrary for Type 1 scalable
fonts sometimes also called PostScript(tm) fonts.&nbsp;
<P>FontScope allows developers and programmers to build Type 1 scalable
font support directly into their applications thus roviding a fast, efficient,
high quality platform-independent solution to the problem of providing
scalable font support.&nbsp;
<P>See <A HREF="http://www.curvesoft.com">http://www.curvesoft.com</A>
for further details about the product.&nbsp;
<P>FREE DEMO&nbsp;
<BR>You can download a free demo for the Linux(x86) and SunOS(SPARC) platforms
from the web page at <A HREF="http://www.curvesoft.com">http://www.curvesoft.com</A>
. The demo lets you arbitrarily scale, skew or rotate characters from any
Type 1 font you may have and view either the bitmap or the outline on the
screen. If you have Multiple Master fonts, it lets you create instances
and then view characters from those instances.&nbsp;
<P>If you have access to a Linux(x86) or a SunOS(SPARC) machine, we strongly
suggest downloading the demo program since that allows you to test FontScope
on your own Type 1 fonts as well as get an idea of thespeed and quality.
If unanswered questions still remain, please email them to info@curvesoft.com</TD>
<TD ROWSPAN="3" WIDTH="2" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
<TD VALIGN=TOP WIDTH="49%" NOSAVE>
<TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<H2>
The GRASP Environment for Ada 95, C, Java, VHDL</H2>
<B><I><FONT COLOR="#CC6600">GRASP</FONT></I></B> is commercial grade GUI
front-end for GNAT, gcc, and JDK. Users can compile, edit, and run programs
directly from GRASP. The editor provides complete syntax coloring with
user selected colors and fonts.&nbsp;
<P>GRASP provides complete support for generating, editing, and printing
Control Structure Diagrams (CSDs) from Ada 95, C, Java, and VHDL source
code. The CSD is a diagram intended to increase the comprehension efficiency
of source code.&nbsp;
<P>GRASP runs under SunOS/Solaris, IRIX, Linux, and WinNT. It is freely
available via the GRASP homepage at&nbsp;
<BR><A HREF="http://www.eng.auburn.edu/grasp">http://www.eng.auburn.edu/grasp</A>
<BR>&nbsp;
<BR>&nbsp;</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=3></TD>
</TR>
<TR NOSAVE>
<TD VALIGN=CENTER NOSAVE>
<BR>&nbsp;
<P>The Texture Library-mirror in Vienna has changed. Please update your
bookmarks and links from:&nbsp;
<CENTER>http://klein.htu.tuwien.ac.at/~rs/</CENTER>
<CENTER>to</CENTER>
<CENTER><A HREF="http://freibier.ml.org/texlib/">http://freibier.ml.org/texlib/</A></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>
<TR NOSAVE>
<TD NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
<TD NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
</TR>
<TR NOSAVE>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000" NOSAVE><IMG
SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>
</TABLE>
&nbsp;
<BR><!--
-- Did You Know Section
-->
<H4>
Did You Know?</H4>
... Adobe Acrobat contains some nice fonts you can use with your X Windows
environment? You get these scalable PostScript fonts:
<BR>&nbsp;
<CENTER><TABLE BORDER=0 COLS=4 WIDTH="70%" NOSAVE >
<TR>
<TD>Courier-Bold</TD>
<TD>Courier-BoldOblique</TD>
<TD>Courier-Oblique</TD>
<TD>Courier</TD>
</TR>
<TR NOSAVE>
<TD>Helvetica-Bold</TD>
<TD NOSAVE>Helvetica-BoldOblique</TD>
<TD>&nbsp;Helvetica-Oblique</TD>
<TD>Helvetica</TD>
</TR>
<TR NOSAVE>
<TD>Times-Bold</TD>
<TD>Times-BoldItalic</TD>
<TD NOSAVE>Times-Italic</TD>
<TD>Times-Roman</TD>
</TR>
<TR>
<TD>AdobeSansMM</TD>
<TD>AdobeSerifMM</TD>
<TD>Symbol</TD>
<TD>ZapfDingbats</TD>
</TR>
</TABLE></CENTER>
I checked the License file and there doesn't appear to be anything against
using these for general use on your system, but you should read the License
yourself to be certain. Then search all the old CD-ROMs you can find for
*.pfa and *.pfb files. For example, Lotus 123 v1.1 for Windows has these:
<BR>&nbsp;
<CENTER><TABLE BORDER=0 COLS=4 WIDTH="70%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>ArialMT</TD>
<TD NOSAVE>Bodoni-BoldCondensed</TD>
<TD>BrushScript</TD>
<TD>Courier</TD>
</TR>
<TR NOSAVE>
<TD>DomCasual</TD>
<TD>LetterGothic</TD>
<TD>NewsGothic</TD>
<TD NOSAVE>Perpetua</TD>
</TR>
<TR>
<TD>Symbol</TD>
<TD>TimesNewRomanPS</TD>
<TD>TimesNewRomanPS-Bold</TD>
<TD>TimesNewRomanPS-BoldItalic</TD>
</TR>
<TR NOSAVE>
<TD ALIGN=CENTER VALIGN=CENTER COLSPAN="4" NOSAVE>TimesNewRomanPS-Italic</TD>
</TR>
</TABLE></CENTER>
You can then use the <A HREF="http://goblet.anu.edu.au/~m9305357/type1inst.html">Type1Inst</A>
script to set up the directories with the new files. Don't forget to run
<B><I><FONT COLOR="#CC6600">xset</FONT></I></B> to tell your X server about
the new directories!
<P><!--
-- Q and A Section
-->
<H4>
<B><FONT SIZE=+0>Q and A</FONT></B></H4>
<I>Q:</I>&nbsp; Whats the latest on VRML?
<P>A:&nbsp; Check out the VRML update on BUILDER.COM:
<CENTER><A HREF="http://www.cnet.com/Content/Builder/Authoring/Vrml/index.html?dd">http://www.cnet.com/Content/Builder/Authoring/Vrml/index.html?dd</A></CENTER>
<P><I>Q</I>:&nbsp; Whats the latest news on commercial game development
for Linux?
<P>A:&nbsp; There was an important announcement from Crack.com recently.&nbsp;
Check out
<CENTER><A HREF="http://www.gamecenter.com/News/Item/0,3,1190,00.html">http://www.gamecenter.com/News/Item/0,3,1190,00.html</A></CENTER>
&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>
<H2>
Reader Mail</H2>
Dr. Norman Fahrer &lt;<A HREF="mailto:fano@norcov.com">fano@norcov.com</A>>
wrote:&nbsp;<IMG SRC="./gx/hammel/nolimits.jpg" HSPACE=10 VSPACE=10 BORDER=3 HEIGHT=235 WIDTH=356 ALIGN=RIGHT>
<UL>I read your article in the Linux journal. I was running the older version
of gimp (0.5..) and yesterday I wanted to get the new gimp version running.</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; The 0.5 is quite
old.&nbsp; 0.61 was the last publicly released Motif version.
<UL>I configured + compiled + installed.&nbsp; Everything built fine. Now
when I type 'gimp' it says :
<UL><B>gimp: can't load library 'libgtk.so.1'</B></UL>
I have that library built and installed into /usr/local/lib where it is
symboliclly linked to 'libgtk.so.1.0.0'. Do you have any idea what I can
do to get the Gimp running ? Thanks for your help,</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; After installing
the GTK library, be sure the loader knows about it.&nbsp; First run "ldconfig
-p | grep gtk" to see if it already does know about the GTK library.&nbsp;
If you get no output from this then run "ldconfig" again, but without the
-p option.&nbsp; When that completes, run "ldconfig -p | grep gtk" to verify
the library can be found.&nbsp; You'll need to run ldconfig as the root
user if you've installed the library in /usr/local/lib.
<P>ldconfig generally looks in /usr/local/lib, along with a few other places,
for libraries.&nbsp; To make sure it does, check /etc/ld.so.conf and make
sure that directoy is listed there.&nbsp; Check the man pages for ldconfig
if you have any further problems.
<P>If ldconfig -p shows gtk is already installed then the other possibility
is to add the following to your .profile:
<UL><B>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib</B>
<BR><B>export LD_LIBRARY_PATH</B></UL>
This may help the loader find the library at run time too.
<P><A HREF="mailto:kar@webline.dk">kar@webline.dk </A>wrote:
<UL>Do you know of a tool that can convert Corel's cdr and wpg formats
into a more commonly accessibly format?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; Image Alchemy supports
wpg.&nbsp; It may also support cdr by now although the version I have doesn't
list it (I know there are a number of formats it supports that aren't listed,
however).&nbsp; Check out my Graphics Muse column in the August 1997 Linux
Gazette.&nbsp; There are links there to their web site. The Linux Gazette
is at http://www.ssc.com/lg.
<UL>It's a little much to buy a package just for that - perhaps you could
ask in your column if anybody knows other programs that can?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; Ok.&nbsp; So readers,
anyone know of a cheaper method?&nbsp; If so send it to him.&nbsp; I'm
satisfied with knowing there is a commercial solution.
<P>Tethys &lt;<A HREF="mailto:tethys@ml.com">tethys@ml.com</A>> wrote in
respose to a Musing last month about NetPBM not having JPEG conversion
tools:
<UL>Yes, you're right. Netpbm doesn't come with tools to convert to and
from JPEG. Maybe it should. However, this is probably because the libjpeg
distribution that it would use already comes with cjpeg and djpeg. By default,
these already act like ppmtojpg and jpgtoppm. They also accept other formats
like GIF, BMP, TGA etc.</UL>
David Maha &lt;<A HREF="mailto:cmulator@pacific.net.sg">cmulator@pacific.net.sg</A>>
wrote:
<UL>My installation diskette for my image256 software was destroyed by
coffee, and I've been looking for the software for quite some time now.
I have a A4 Tech A4Color AC 4096 hand-held scanner. Do you know of which
software can be used to operate the scanner and if possible in Windows
environment? Can you tell me where I could download it or get it on the
net?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; I'm not familiar
with MS platforms.&nbsp; I don't use them.&nbsp; However, there are apparently
some Linux drivers for this scanner on the Sunsite Linux archives. Take
a look at: <A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/scanners">ftp://sunsite.unc.edu/pub/Linux/apps/graphics/scanners</A>.
<P>I did a review of all the Linux scanner information I could find in
my Graphics Muse column in March of this year.&nbsp; You can take a look
at it starting at the Linux Gazette's (which is the online magazine that
carries my Graphics Muse column) table of contents at <A HREF="http://www.ssc.com/lg">http://www.ssc.com/lg</A>.
<P>Gregory Gardener &lt;<A HREF="mailto:GardenerG@code20nl.npt.nuwc.navy.mil">GardenerG@code20nl.npt.nuwc.navy.mil</A>>
wrote:
<UL>I work for the DOD.&nbsp; From reading your column in Linux Journal
it appears that you have expertise in the area of PC graphics...so I'm
directing my question to you. If I wanted to develop a PC software product--an
interactive educational system--what PC graphics package is "state of the
art" for Linux or Windows?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; Good question.
<P>Don't choose a platform, choose a technology:&nbsp; Java and/or VRML.&nbsp;
Why?&nbsp; By doing so you remove the need for your end users to be required
to have a particular platform to use your software.&nbsp; Second, you can
more easily fit into any organization no matter what platforms they might
already have.
<P>Problems:
<OL>
<LI>
Java is not quite standard on all platforms yet.</LI>
<LI>
VRML is very new and has the traditional problems with new technologies
(acceptance, standards, etc).</LI>
<LI>
VRML requires the availability of a VRML browser on your end-users platforms.</LI>
</OL>
#1 is not going to be a problem by the middle of next year (my guess).
Depending on your roll-out date it might be worth starting with Java right
from the start.&nbsp; In fact, I'm investing my own time in learning Java.&nbsp;
I do GUI development for a living and feel my skills in X may not be enough
for the long run.&nbsp; Java GUI is the next big thing for people like
me.
<P>#3 is a problem.&nbsp; There are only a few VRML browsers for Linux
right now and I don't know much abou them.&nbsp; Liquid Reality is one
- it requires you have the Java runtime environment installed and working.&nbsp;
VRML on non-Linux is actually better supported right now, but thats probably
a situation that will be fixed within the next year (again, my guess).
<P>Now, assume you go with these two.&nbsp; Now you can choose your *own*
development platform.&nbsp; I'd pick Linux.&nbsp; Why?&nbsp; Because MS
is not being very forthcoming about their support of Java - Linux has embraced
it quite happily.&nbsp; I'm just getting started with Java development
so I can't tell you how to use the tools, but the Java Development Kit
(JDK), all the way up to version 1.1.3, has been ported to Linux.&nbsp;
There is a commercial Java IDE kit, Vibe, for Linux already.
<P>VRML is like HTML and you can write it using vi or EMACS or whatever
text editor you'd like.&nbsp; Eventually there will be WYSIWYG editors
for VRML, but for now it shouldn't be difficult to do by hand.&nbsp; In
fact, many of the current VRML texts are written from the point of view
that you <I>are</I> writing it by hand.
<P>Alternatives:&nbsp; OpenGL/Motif/C.&nbsp; This is the way I'd do it
<I>right</I> now simply because I already now Motif and C and OpenGL is
something I've been studying off and on for a few months now.&nbsp; I really
like OpenGL, but if you use Motif/C your application is less portable across
platforms (ie its not very easy to port to MS or Macs).&nbsp; OpenGL has
been ported to lots of platforms, but it doesn't provide a windowing toolkit
so you have to use it with a toolkit native to your platforms (Motif/X,
MS Windows, etc).
<P>Now, this still might not address your problem because "an interactive
educational system" can encompass all sorts of display data so its hard
to say if Java/VRML will work for you.&nbsp; What sort of graphics do you
need to display?&nbsp; How do they need to be displayed?&nbsp; User Interfaces
(UI's) is a big area of study that few people hear about because the hype
from the technologies you use for them gets more attention.&nbsp; The problem
still exists - which technology do you use?&nbsp; The answer - whatever
one you're most comfortable with for now.&nbsp; Eventually, you need to
get familiar with Java and VRML.
<P>
<HR WIDTH="100%">
<BR><A NAME="webwonderings"></A>
<BR><IMG SRC="../gx/hammel/webwonderings.jpg" HEIGHT=57 WIDTH=246>
<H2>
Adding JavaScript rollovers to Web pages.</H2>
Last month I talked about browser detection with JavaScript.&nbsp; Like
most Web technologies, JavaScript is new and prone to problems, even within
the applications for which it was developed - the Netscape Navigator Web
browser.&nbsp; In order to make the best use of JavaScript with Netscape
Browsers you'll want to make sure you understand what versions of the browser
support which JavaScript constructs.&nbsp; Browser detection helps you
do this.
<P>This month we'll talk about a common trick many people are using in
their Web pages today:&nbsp; image rollovers.&nbsp; An image rolllover
is an image that changes based on user input.&nbsp; For example, if you
look at my <A HREF="http://www.csn.net/~mjhammel/gimp/gimp.html">GIMP pages</A>
(you'll need Netscape 3.x or later for this) you'll see image rollovers
in the menus.&nbsp; When you place the mouse over the text for one of the
menu items, the Gallery for example, the text background changes to a light
blue or cyan color.&nbsp; The text is actually an image, not ordinary HTML
text.&nbsp; When you place the mouse over the image it is swapped out for
another image, the cyan colored version.&nbsp; Thats a rollover.
<P>Adding rollovers is actually fairly easy.&nbsp; First, you need to make
two copies of an image (we're taking a very basic approach to this - you
can actually create multiple versions of the image to be displayed based
on different types of user input).&nbsp; The first copy is the original,
the image to be displayed initially or when no user input is being applied.&nbsp;
The second is the image to be swapped in when the user moves the mouse
over the original or clicks on the image.&nbsp; Creating these images can
be done in any number of ways.&nbsp; Personally, I use t<A HREF="http://www.gimp.org">he
GIMP.</A>&nbsp; Its well designed for these kind of image processing tasks.
<P>Next you need to understand how JavaScript interprets user input.&nbsp;
These are called events.&nbsp; There are number of different events that
JavaScript can recognize&nbsp; Not all are applicable to images, however,
nor to use with rollovers.&nbsp; The ones of interest are:
<BR>&nbsp;
<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 COLS=3 WIDTH="70%" BGCOLOR="#FFCC00" NOSAVE >
<TR NOSAVE>
<TD BGCOLOR="#66FFFF" NOSAVE><B>Event Name</B></TD>
<TD BGCOLOR="#66FFFF" NOSAVE><B>Meaning</B></TD>
<TD BGCOLOR="#66FFFF" NOSAVE><B>JavaScript and Netscape versions</B></TD>
</TR>
<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onclick</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User clicks on an image.</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.0 (Navigator pre-3.x)</TD>
</TR>
<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmouseover</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User moves the mouse over the image</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.0 (Navigator pre-3.x)</TD>
</TR>
<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmouseout</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User moves cursor out from link or image
map.</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.1 (Navigator 3.x)</TD>
</TR>
<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmousedown</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User presses a mouse key down but doesn't
release it.</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.2 (Navigator 4.x)</TD>
</TR>
<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmouseup</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User releases the mouse button.</TD>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.2 (Navigator 4.x)</TD>
</TR>
<CAPTION ALIGN=BOTTOM><B>JavaScript Events useful for rollovers</B></CAPTION>
</TABLE></CENTER>
These are all fairly self explanatory.&nbsp; They are all associated with
the way a user handles the mouse in relation to the image. Note also that
the event name is case insensitive.&nbsp; You will often see examples where
the evens are written like onMouseOver or onClick.
<P>Finally, you need to understand how JavaScript references images on
a Web page.&nbsp; The trick to rollovers is to update the correct image
- in some cases the image to update is not the image over which the mouse
currently rests.&nbsp; For example, see my <A HREF="http://www.csn.net/~mjhammel/nav-top.html">contents
page</A> where I update a central image when the mouse is placed over images
that surround the central image.&nbsp; That page doesn't do a good job
checking which browser is being used and as a result it doesn't work well
with non-Netscape 3.x browsers, or even 3.x browsers on non-Unix platforms.&nbsp;
Still, the rollovers do work right on the Linux Netscape browser.
<P>JavaScript references images as objects and as such treats them just
like any other object.&nbsp; Images in a document (documents are HTML pages)
are referenced using names, such as
<BR>&nbsp;
<CENTER><TABLE BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=1 WIDTH="350" NOSAVE >
<TR NOSAVE>
<TD ALIGN=CENTER VALIGN=CENTER NOSAVE><A HREF="javascript:void(null)" onmouseover="navInfo('Happy Dog, eh?', 1); return true;" onMouseout="clearInfo(0);return true"><IMG SRC="./gx/hammel/dog-1.jpg" NAME="dog" BORDER=0 HEIGHT=240 WIDTH=320></A></TD>
</TR>
<TR NOSAVE>
<TD ALIGN=CENTER VALIGN=CENTER NOSAVE><B>document.dog.src</B></TD>
</TR>
</TABLE></CENTER>
The <I>document</I> name means the current document (page), the <I>dog</I>
name references the NAME= tag given to the above image, and the <I>src</I>
name refers to the name of the image, such as "dog-1.gif".&nbsp;&nbsp;
You'll notice, if you have an appropriate browser (I was lazy - there is
no browser detection code included!), that the above image changes when
you place the mouse over the dog.&nbsp; So does the text in the status
bar at the bottom of the document.&nbsp; Lets look at the code that handles
this.
<P>First, lets look at the image's HTML definition:
<UL><B>&lt;A <FONT COLOR="#009900">HREF="javascript:void(null)"</FONT></B>
<UL><B><FONT COLOR="#009900">onMouseOver</FONT>="mouseIn('Happy Dog, eh?',);
return true;"</B>
<BR><B><FONT COLOR="#009900">onMouseOut</FONT>="mouseOut(); return true"></B></UL>
<B>&lt;IMG SRC="./gx/hammel/dog-1.jpg" <FONT COLOR="#009900">NAME</FONT>="dog"
<FONT COLOR="#009900">BORDER</FONT>=0 HEIGHT=240 WIDTH=320></B>
<BR><B>&lt;/A></B></UL>
Notice the name of the image:&nbsp; NAME="dog".&nbsp; This gives JavaScript
the object reference it needs to access the correct image.&nbsp; You can
also access images using a documents <I>images</I> index, but thats a somewhat
haphazard method (one I use with my contents page) and a bit harder to
use.&nbsp; I recommend using NAME tags for rollovers.
<P>A few other things we should note about this bit of HTML:
<OL>
<LI>
There are event handlers for when the mouse enters the image area (<B>onMouseOver</B>)
and for when the mouse leaves the image area (<B>onMouseOut</B>). We'll
discuss the values we associate with each of these in a moment.</LI>
<LI>
The event handlers are placed in an anchor with an HREF tag.&nbsp; The
HREF points to a JavaScript function called "void", which is a simple method
for doing nothing.&nbsp; In this case we want only the event handlers to
do anything and the anchor to do nothing.</LI>
<LI>
We've set the border width to 0 for the image so that no border will be
placed around the image.&nbsp; If we didn't do this a border would be added
that used the link and visited-link colors because the image is wrapped
in an anchor tag. This way, the image doesn't really look like a link.&nbsp;
Thats good, since its not really a link to anything.</LI>
</OL>
Before we talk about the event handlers, we should take a look at the JavaScript
code:
<UL><B>&lt;SCRIPT LANGUAGE="JavaScript"></B>
<P><B>&lt;!-- Hide script from older browsers</B>
<P><B>numitems=2;</B>
<BR><B>SampleImages = new Array(numitems);</B>
<P><B>SampleImages[0] = new Image();</B>
<BR><B>SampleImages[1] = new Image();</B>
<P><B>// Establish the two image objects we want to use.</B>
<BR><B>SampleImages[0].src="./gx/hammel/dog-1.jpg";</B>
<BR><B>SampleImages[1].src="./gx/hammel/dog-2.jpg";</B>
<P><B>// Event handler called for onMouseOver event</B>
<BR><B>function mouseIn(input_status)</B>
<BR><B>{</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = input_status;</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.dog.src = SampleImages[1].src;</B>
<BR><B>}</B>
<P><B>// Event handler called for onMouseOut event</B>
<BR><B>function mouseOut()</B>
<BR><B>{</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status="";</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.dog.src = SampleImages[0].src;</B>
<BR><B>}</B>
<P><B>// End of hidden script --></B>
<P><B>&lt;/SCRIPT></B></UL>
For this example you are safe in placing this bit of code inside the &lt;HEAD>
&lt;/HEAD> section of your HTML.
<P>The two event handlers call JavaScript functions.&nbsp; The mouseIn()
function is called to change the image when the mouse enters the image
area.&nbsp; As you see in the HREF tag the event handler associated with
this function is the onMouseOver event.&nbsp; This function has two lines.&nbsp;
The first takes the text passed as an argument and places it on the status
bar at the bottom of the browser.&nbsp; The second line replaces the image
referenced as "dog" by the second image in the SampleImages array. Pretty
straight forward, don't you think?
<P>The second function, mouseOut(), is called when the mouse is moved out
of the image area.&nbsp; It, too, has two lines.&nbsp; The first clears
the status bar and the second places the image in the first element of
the SampleImages array over the image currently in the object called "dog".&nbsp;
In this case, the SampleImages array's first element holds the same image
source as the original image displayed in the IMG tag in our HTML source.
<P>A few things to note about the code: I used an array to hold the images
I wanted to use for my rollover.&nbsp; In this simple example I could just
have easily used
<CENTER><B>document.dog.src = "./gx/hammel/dog-1.jpg"</B></CENTER>
instead.&nbsp; If you use an array be sure to define the storage for the
array objects.&nbsp; I first defined the array with
<CENTER><B>SampleImages = new Array(numitems);</B></CENTER>
I then defined the image storage for each element of the array with
<CENTER><B>SampleImages[0] = new Image();</B></CENTER>
Of course this could be done in a loop, like with a for() statement.&nbsp;
The definition of these objects with the "new" keyword causes JavaScript
to load the image but not actually display it.&nbsp; You could use these
scripts to preload images to a page so that when subsequent pages were
accessed the images could be pulled from cache immediately.
<P>The image object also contains a number of other properties, such as
the BORDER width, image HEIGHT and WIDTH, and the VSPACE attribute for
setting the vertical space around the image.&nbsp; By not specifying the
HEIGHT and WIDTH for the document.dog object in the functions I have assumed
the new image has the same dimensions as the old.&nbsp; If this were not
the case you might want to update the image dimensions in your functions
as well.
<P>Well, that should get you started.&nbsp; Image rollovers are kinda cool
to play with and can add a little pizazz to an otherwise drap Web page,
but be careful.&nbsp; Like most of the neat toys on the Web, too much of
anything can be annoying.
<P>
<HR WIDTH="100%">
<P><A NAME="musings"></A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/musings.gif" ALT="Musings" HEIGHT=52 WIDTH=247 ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR>
<TD ALIGN=LEFT VALIGN=TOP COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG
SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1 ALIGN=LEFT></TD>
<TD></TD>
</TR>
<TR>
<TD ALIGN=LEFT VALIGN=TOP ROWSPAN="3" WIDTH="50%">
<H2>
SIGGRAPH 97 Notes</H2>
For those that don't know, SIGGRAPH is the yearly conference on computer
graphics sponsored by the ACM.&nbsp; To be exact, SIGGRAPH is the Special
Interest Group - Graphics of the ACM and the conference is an extension
of that, but in the past few years this conference has grown into a major
exposition where all the big names in the computer and entertainment industry
show their latest wares.&nbsp; This year the conference was held in Los
Angeles.&nbsp; It was also my inaguaration into this madhouse.&nbsp;
<P>I should tell you that what follows is not specifically Linux related.&nbsp;
I will try to associated what I saw or learned with Linux as much as possible,
but in general Linux is not a powerhouse at SIGGRAPH,&nbsp; In fact, with
the exception of one technical course and a couple of engineers manning
booths at the show, I didn't hear anyone talk about Linux.&nbsp; We have
some work ahead of us to get real notice.&nbsp;
<P>For me, SIGGRAPH lasted 4 days, Sunday through Wednesday, even though
the conference actually ran for 6 days.&nbsp; I went as my vacation (sick,
isn't it) and after 4 days had been run so ragged I decided my last full
day would do something quite and peaceful - so I went to Universal Studios.&nbsp;
SIGGRAPH, for those who've never been, is non-stop energy drain, both physically
and mentally.&nbsp;
<P>My first day there I spent going through lines - at the airport, at
the car rental (my god, what a mess), and at the conference registration
booths.&nbsp; I had preregistered and so I only needed to pick up my conference
materials, but that took about 45 minutes.&nbsp; Having not been to a conference
of any kind since a trip to Interop back in 1991, I was a bit disappointed
to see no texts provided for the courses.&nbsp; In fact, the courses weren't
really courses, they were presentations in front of monster sized audiences.&nbsp;
I remember the Interop courses being a bit more personal, more like real
classes.&nbsp;
<P>Although I got there late, I did managed to get into the Introductory
class on OpenGL that was given by SGI staff members.&nbsp; It was mostly
a discussion on basic OpenGL syntax.&nbsp; I did manage to wind up sitting
right next to Bruce Peren's office mate at Pixar - a very nice fellow named
Jim W. (my notes didn't include his last name - hope he doesn't get made
at me).&nbsp; That seemed strange until I found out that Pixar sends just
about everyone to SIGGRAPH.&nbsp; A few days later I saw Larry Gritz but
didn't get a chance to talk to him.&nbsp; Like most people at SIGGRAPH,
he was in a hurry to get somewhere.&nbsp;
<P>The rest of the day I spent wondering around the LA convention center
looking for where other classes and events would be held.&nbsp; There was
a career center downstairs where people could post resumes and companies
posted job positions.&nbsp; Xi Graphics had a posting there, but other
than that I didn't see any Linux-related postings.&nbsp; By the time I
got back to my hotel it was about 9pm - and I had yet to eat that day.&nbsp;
One word of warning to future attendees:&nbsp; take snacks!&nbsp; Finding
food can be hard and what you do find can be awful (at least in LA by the
convention center) and you <B><I>will</I></B> need the enegy!&nbsp; Being
a running, I should have brought a few energy bars with me.&nbsp; Well,
thats a lesson learned.&nbsp;
<P>The next day I went to the Advanced OpenGL course, also taught by SGI
staff.&nbsp; This was a more interesting class to me, since it talked about
techniques a bit more than just syntax.&nbsp; There were some good discussions
on using environment maps (mapping an image to surface), projecting textures,
and billboarding.&nbsp; This last one is a cool technique I wasn't aware
of.&nbsp; An image is mapped onto a planar surface and that surface is
programmed to always face towards the viewer.&nbsp; It is sort of like
taking a photo of a tree, cutting away all of the photo except the tree,
and pasting it to a popsicle stick.&nbsp; The stick is then rotated so
that the photo of the tree always faces you.&nbsp; It simulates a 3D effect
without all the overhead of huge polygon counts for a real tree.&nbsp;
This technique works well for scene objects that are in the distance but
looses its effect up close.&nbsp; You can see billboarding effects in many
games.&nbsp;
<P>Another effect they covered was the creation of fire.&nbsp; They used
a noise function along with what are called "quad mappings" to blur regions
of the noise.&nbsp; They then added some turbulence and an absolute value&nbsp;
<CENTER><TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/flame.jpg" HEIGHT=256 WIDTH=256></TD>
</TR>
</TABLE></CENTER>
function to create veins in the fire.&nbsp; It turns out you can do something
similar with the GIMP by using the solid noise filter, followed by some
blurring and waves adjustments, and cleaned up with a combination of curves/color
balance adjustments (for color), and sharpening (for details).&nbsp;
<P>When I got home I went to visit my sister and her kids and watched them
play Super Mario Bros on their ... Sega?&nbsp; Anyway, having just returned
from SIGGRAPH I could see the effects they talked about in the advanced
OpenGL course.&nbsp; It was very enlightening.&nbsp;
<P>One of my reasons for going to the OpenGL courses was to get an idea
for how multimedia applications could be built for Linux.&nbsp; An alternative
to an OpenGL based multimedia kit would be one based on VRML. I attended
the VRML Demo SIG on Monday night and it had some very cool demos using
VRML 2.0.&nbsp; If based on CD-ROM this could be a very good cross platform
environment for multimedia packages (edutainment, for example).&nbsp; The
current drawback is that the demos required 2.0 capable browsers, but there
should any number of those showing up in the next year or so.&nbsp; According
to CGW (freebie that was dropped at my hotel room - very nice touch), Netscape
4.0 has the SGI Cosmo Player embedded in it now.&nbsp; I haven't been able
to get this to work yet, however.&nbsp; Since I have a 2.0 kernel installed
now I can try some of the other VRML browsers available.&nbsp; Maybe I'll
get to that next month.&nbsp;
<CENTER><A HREF="#next-column">-Top of next column-</A></CENTER>
<CENTER>&nbsp;</CENTER>
</TD>
<TD ROWSPAN="3" WIDTH="2" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
<TD WIDTH="49%">
<P><BR>
<LH><A NAME="next-column"></A><B>More Musings...</B>&nbsp;</LH>&nbsp;
<LI>
<A HREF="more-musings.html">GIMP Tip</A> - 3D metal and plastic borders.</LI>
<BR>&nbsp;</TD>
</TR>
<TR>
<TD BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>
<TR NOSAVE>
<TD VALIGN=TOP NOSAVE>On Tuesday I arrived 1/2 hour early to take the 3D
Animation Workshop.&nbsp; I was about 20th in line of 100 or so, but somehow
managed to miss getting a little blue ticket.&nbsp; Despite the people
at the door having seen me there for 30 minutes waiting (before others
had showed up) I still didn't get in.&nbsp; I was very pissed.&nbsp; This
class was one of my prime reasons for my going to SIGGRAPH.&nbsp; Hint:&nbsp;
if you get in line at SIGGRAPH, make sure you check with the people in
front of you to see if you need to have some special form, ticket, or sacrificial
offering to get in.&nbsp;
<P>My fallback course was the GUI/Multimedia class.&nbsp; There really
wasn't much multimedia discussion - mostly it covered how to design GUI
intefaces.&nbsp; Lots of design criteria which I'd learned by fire long
ago.&nbsp; When they finally did get around to multimedia they talked about
the lack of standards and how most applications are reinventing GUI rules.&nbsp;
This was my assessment before going to the class, but it was nice to have
it reinforced by someone who studies such things for a living.&nbsp;
<P>Next I skipped out to Mark Kilgard's OpenGL w/Windowing systems class.&nbsp;
Pretty good stuff.&nbsp; Brian Paul talked about MesaGL a little as well
as some portability issues.&nbsp; Both are very nice guys - I chatted with
them a bit after the class.&nbsp; One thing Mark mentioned was that there
arent' any toolkits specifically built with OpenGL, which makes sense.&nbsp;
There is an overhead in creating widgets using OpenGL that would make it
unsuitable for most applications.&nbsp; Instead, OpenGL is integrated into
applications using some other toolkit, like Motif, XForms, or Tk, using
a toolkit specific OpenGL-capable widget.&nbsp;
<P>Later on I stumbled into the Java3D class for a few minutes.&nbsp; Looks
interesting but I didn't get too many details.&nbsp; Sun is saying a beta
release of a sample implementation of the specification&nbsp; is due out
in December of 1997 but the course speakers said they hoped to have it
out much sooner.&nbsp; They also expect that since the specification is
public and being openly developed that sample implementations from non-Sun
sources are likely to show up before the Sun release.&nbsp; Or at least
they expect that - they didn't have any information on any specific implementations.&nbsp;
At this point I haven't heard of any Java3D announcements from my usual
sources.&nbsp;
<P>I talked to a couple of recruiters at the career fair, mostly just to
get a feel for what companies are looking for these days.&nbsp; They mentioned
that the best way people can avoid getting lost in the crowd of candidates
at the fair is to submit resumes based on job postings from the corporate
web sites.&nbsp; If you go next year looking for work, check out some of
the participating companies job listings before heading to the career fair.&nbsp;
<P>First day of the show for me was Wednesday.&nbsp; It looked more like
a cross between a theme park ride and a disco, especially when Intel rolled
out their MMX "clean-room dancers".&nbsp; SGI offered a 1/2 hour demo ride
with their O2 systems.&nbsp; Cute demo but really didn't give a good feel
for what you were really buying.&nbsp; After talking to some of the show
staff and taking the demo ride I still don't know exactly what applications
come with the stock O2 box.&nbsp; The $4995 price offered to conference
participants wasn't bad, however.&nbsp; Certainly compares well with a
comparably equipped PC running NT.&nbsp; There is a freeware/shareward
CD available for O2 developers according to one of the engineers I talked
to, but I didn't see it.&nbsp;
<P>The SGI O2 demo showed me one thing which I had hoped I'd find out from
the show:&nbsp; how to create multimedia applications.&nbsp; In fact, after
the demo a White Paper was passed out explaining how the demo was put together.&nbsp;
Some items, like the networking that allowed real-time texture mapping
of live video, are not really possible on Linux boxes with available software.&nbsp;
But most of the rest is:&nbsp; OpenGL rendered in Motif widgets was used
for the GUI and OpenGL and VRML were used for interactive 3D displays.&nbsp;
OpenGL is available commercially and with MesaGL.&nbsp; Motif is available
commercially. I'm not certain VRML is available for integration into applications
via an API, but animation could be done using MPEG.&nbsp; There are some
MPEG API's, such as MpegTV's API.&nbsp; ImageMagick's PlugIn distribution
appears to have an MPEG library, but I don't know if it provides a decent
enough API for commercial multimedia applications.&nbsp;
<P>After seeing the SGI demo and the VRML SIG demos I've changed my mind
about VRML - its ready for prime time.&nbsp; I wouldn't recommend it for
network applications yet, at least not Internet based applications, but
for private networks (such as kiosks) or CD-based multimedia applications
it could offer some unique possibilities.&nbsp;
<P>Wacom was at the show and a few of the staff didn't get defensive when
I brought up Linux (it all depends on how non-abrasively you bring up the
subject). They were even quite apologetic about not having any info on
which tablets were supported by XFree86.&nbsp; They now have a pad that
is actually a full-color flat screen - you simply draw on it like you do
with the tablets.&nbsp; Very cool, but currently runs > $2200.&nbsp;
<P>Cosmo Software (new division of SGI) staff were pleasant as well, mentioning
that it might be possible to provide someone with the source to port the
Cosmo Player to Linux.&nbsp; The player (which plays VRML 2.0 scenes) is
free for various other platforms.&nbsp; I guess they just need someone
to ask for it and provide some credentials to prove they could do a decent
port.&nbsp; Unfortunately, I'm not certain who to talk to about this.&nbsp;
<P>Huge crowds formed around the Apple booth right at the entrance.&nbsp;
One demo I caught caused an OS lockup, but for the most part people were
quite excited about the products.&nbsp; I don't know much about Mac's so
didn't stay long.&nbsp; However, like LInux, Mac is an underdog in the
OS world and I can't help but hope they survive.&nbsp;
<P>The one thing about this trip that stood out for me was LA itself.&nbsp;
It was Hot.&nbsp; Outside.&nbsp; Inside.&nbsp; In classes.&nbsp; In the
car.&nbsp; In the hotel.&nbsp; Everywhere.&nbsp; Hot. LA also has an ugly
downtown compared to others I've seen.&nbsp; It also apparently has very
few restaurants anywhere near the Convention Center.&nbsp; A 6 block walk
in Colorado is no big deal, but a 6 block walk in LA in August....*sigh*.&nbsp;
Food was a big problem for me.&nbsp; I hope the same problem doesn't exist
in Orlando next year.&nbsp;
<BR>&nbsp;
<BR>&nbsp;</TD>
</TR>
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1>submitted
resumes based on job postings from their web sites.</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/resources.gif" ALT="Resources" HEIGHT=57 WIDTH=246 ALIGN=LEFT></TD>
</TR>
</TABLE>
The following links are just starting points for finding more information
about computer graphics and multimedia in general for Linux systems. If
you have some application specific information for me, I'll add them to
my other pages or you can contact the maintainer of some other web site.
I'll consider adding other general references here, but application or
site specific information needs to go into one of the following general
references and not listed here.
<BR>&nbsp;
<TABLE BORDER=0 COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><A HREF="http://www.csn.net/~mjhammel/linux/lgh.html">Linux
Graphics mini-Howto</A>&nbsp;
<BR><A HREF="http://www.csn.net/~mjhammel/ugu/ugu.html">Unix Graphics Utilities</A>&nbsp;
<BR><A HREF="http://www.digiserve.com/ar/linux-snd/">Linux Multimedia Page</A>&nbsp;
<P>Some of the Mailing Lists and Newsgroups I keep an eye on and where
I get much of the information in this column:&nbsp;
<P><A HREF="http://www.gimp.org">The Gimp User and Gimp Developer Mailing
Lists</A>.&nbsp;
<BR><A HREF="http://www.irtc.org">The IRTC-L discussion list</A>&nbsp;
<BR><A HREF="news:comp.graphics.rendering.raytracing">comp.graphics.rendering.raytracing</A>&nbsp;
<BR><A HREF="news:comp.graphics.rendering.renderman">comp.graphics.rendering.renderman</A>&nbsp;
<BR><A HREF="news:comp.graphics.api.opengl">comp.graphics.api.opengl</A>&nbsp;
<BR><A HREF="news:comp.os.linux.announce">comp.os.linux.announce</A>&nbsp;</TD>
<TD><IMG SRC="../gx/hammel/gmuse.jpg" HSPACE=10 HEIGHT=270 WIDTH=190></TD>
</TR>
</TABLE>
<A NAME="future"></A>
<H2>
Future Directions</H2>
Next month:
<BR>I don't know yet.&nbsp; Things are very hectic right now, but I'll
think of something.&nbsp; Thanks to everyone who has made suggestions in
the past!&nbsp; I do keep all your suggestions, even if I haven't gotten
around to all of them yet.
<P><A HREF="mailto:mjhammel@csn.net">Let me know what you'd like to hear
about!</A>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Michael J. Hammel<BR>
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
LT="[ FRONT PAGE ]"></A>
<A HREF="./procmail.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./bench2.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<!-- =============================================================
This Page Designed by Michael J. Hammel.
Permission to use all graphics and other content for private,
non-commerical use is granted provided you give me (or the
original authors/artists) credit for the work.
CD-ROM distributors and commercial ventures interested in
providing the Graphics Muse for a fee must contact me,
Michael J. Hammel (mjhammel@csn.net), for permission.
============================================================= !--><A NAME="musings"></A>
<TABLE>
<TR>
<TD>
<H2>
More...</H2>
<IMG SRC="../gx/hammel/musings.gif" ALT="Musings" HEIGHT=52 WIDTH=247 ALIGN=LEFT>&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<TABLE WIDTH="100%" >
<TR>
<TD ALIGN=RIGHT WIDTH="100%"><FONT SIZE=-2>&copy; 1997 <A HREF="mailto:mjhammel@csn.net">Michael
J. Hammel</A>&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP BGCOLOR="#000000" cellpadding="0" cellspacing="0"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN=LEFT></TD>
</TR>
</TABLE>
<A NAME="1"></A>
<H2>
GIMP Tip:&nbsp; 3D metal and plastic borders</H2>
This is a little trick for creating 3D frames with a metallic or shiny
plastic look.&nbsp; The trick is pretty easy and once you've done it a
few times it will become second nature.
<BR>&nbsp;
<TABLE BORDER COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<OL>
<LI>
Select a thick, solid brush.&nbsp; I used Circle (09).&nbsp; This brushes
will create thick frames.&nbsp; Thin brushes create thin frames.&nbsp;
Don't use feathered brushes.&nbsp; We need a solid outline at this point.</LI>
<LI>
Make sure the foreground is black and the background is white.</LI>
<LI>
Outline a selection using the Bezier and Marquee tools.</LI>
<LI>
Stroke the selections.&nbsp; You can do this in multiple steps.&nbsp; I
created three separate selections, stroking each one individually.</LI>
<LI>
Blur the image using the Gaussian Blur with a horizonatal and vertical
radius of between 1.5 and 5 units.</LI>
</OL>
</TD>
<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/gimp-1.jpg" HEIGHT=321 WIDTH=304></TD>
</TR>
<TR NOSAVE>
<TD>
<BR>&nbsp;
<OL>
<LI>
Use CTRL-A to select the entire image.&nbsp; Copy it to a named buffer
(Shift-CTRL-C).&nbsp; We'll call it the "frame-outline" buffer.</LI>
<LI>
Unselect the image with SHIFT-CTRL-A.</LI>
<LI>
Invert it - the frame becomes white and the background black.</LI>
<LI>
Emboss the image, using a Depth of between 3 and 10.&nbsp; You can pick
whatever azimuth and elevation looks good to you.</LI>
</OL>
&nbsp;</TD>
<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/gimp-3.jpg" HEIGHT=321 WIDTH=304></TD>
</TR>
<TR NOSAVE>
<TD>
<OL>
<LI>
Use the curves filter to create the metallic affect.&nbsp; The figure at
right shows the settings I used.&nbsp; I only changed the "Value" levels,
which apply to all three of the Red, Green, and Blue channels at the same
amount.</LI>
</OL>
</TD>
<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/curves-settings.jpg" HEIGHT=408 WIDTH=302></TD>
</TR>
<TR NOSAVE>
<TD>
<OL>
<LI>
Add a layer mask to the image.&nbsp; At this point there should only be
one layer in the image.&nbsp; Click on the mask area in the Layers and
Channels dialog to make it the active layer.&nbsp; You will probably need
to add an alpha channel to the layer first.&nbsp; You can do that with
the Layers and Channels dialog layer menus (click the right mouse button
over the name of the layer to display the menu).</LI>
<LI>
Paste the "frame-outline" buffer into the mask. Anchor it to the mask.</LI>
<LI>
Invert the mask.&nbsp; It should be black with the frame outline in white
now.</LI>
<LI>
Apply the mask.</LI>
</OL>
</TD>
<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/gimp-4.jpg" HEIGHT=331 WIDTH=318></TD>
</TR>
</TABLE>
&nbsp;
<P>Thats it.&nbsp; You now have a metallic, or perhaps shiny plastic looking,
frame.&nbsp; I added a white background and a adrop shadow to make it stand
out a little more.&nbsp; You can use the curves filter again to add color
to the frame.&nbsp; The curves filter does some amazing effects if you
make the curves with drastic changes in direction (steep curves).
<P>One other hint:&nbsp; if you look at the edges of the the frame where
it is not straight, such as the right side along the curves, the frame
is sort of rough.&nbsp; This problem can be reduced using better settings
in the curves dialog box.&nbsp; Don't get confused - the problem I&nbsp;described
happens on <I>curves of the frame</I>, but the <I>curves dialog</I> is
just related to adjustments to colors in the image.&nbsp; The dialog isn't
related to non-straight lines.
<BR>&nbsp;
<TABLE WIDTH="100%" >
<TR>
<TD VALIGN=TOP COLSPAN="4" BGCOLOR="#000000" cellpadding="0" cellspacing="0"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;
<TABLE WIDTH="100%" >
<TR>
<TD ALIGN=RIGHT><FONT SIZE=-2>&copy; 1997 by <A HREF="mailto:mjhammel@csn.net">Michael
J. Hammel</A>&nbsp;</FONT></TD>
</TR>
</TABLE>
&nbsp;
<P> <HR> <P>
<!--===================================================================-->
<center>
<H1>GNU/Linux Benchmarking - Practical Aspects</H1>
<H2>by
<A HREF="mailto:andrewbalsa@usa.net">Andr&eacute; D. Balsa </A></H2>v0.4, 26 November 1997
</center>
<P><HR><P>
<EM>This is the second article in a series of 4 articles on GNU/Linux Benchmarking, to be published by the Linux Gazette. The first article presented some basic benchmarking concepts and analyzed the Whetstone benchmark in more detail. The present article deals with practical issues in GNU/Linux benchmarking: what benchmarks already exist, where to find them, what they effectively measure and how to run them. And if you are not happy with the available benchmarks, some guidelines to write your own. Also, an application benchmark (Linux kernel 2.0.0 compilation) is analyzed in detail.</EM><HR>
<P>
<H2>1. <A HREF="./bench2.html#ss1">The DOs and DON'Ts of GNU/Linux benchmarking</A></H2>
<P>
<H2>2. <A HREF="./bench2.html#ss2">A roundup of benchmarks for Linux</A></H2>
<P>
<H2>3. <A HREF="./bench2.html#ss3">Devising or writing a new Linux benchmark</A></H2>
<P>
<H2>4. <A HREF="./bench2.html#ss4">An application benchmark: Linux 2.0.0 kernel compilation with gcc</A></H2>
<UL>
<LI><A HREF="./bench2.html#ss4.1">4.1 General benchmark features</A>
<LI><A HREF="./bench2.html#ss4.2">4.2 Benchmarking procedure</A>
<LI><A HREF="./bench2.html#ss4.3">4.3 Examining the results</A>
</UL>
<P>
<H2>5. <A HREF="./bench2.html#ss5">Next month</A></H2>
<P> <HR><P>
<H2><A NAME="ss1">1. The DOs and DON'Ts of GNU/Linux benchmarking</A></H2>
<P>GNU/Linux is a great OS in terms of performance, and we can hope it will only get better over time. But that is a very vague statement: we need figures to prove it. What information can benchmarks effectively provide us with? What aspects of microcomputer performance can we measure under GNU/Linux?
<P>Kurt Fitzner reminded me of an old saying: <B></B><B><EM>"When performance is measured, performance increases."</EM></B>
<P>Let's list some general benchmarking rules (not necessarily in order of decreasing priority) that should be followed to obtain accurate and meaningful benchmarking data, resulting in real GNU/Linux performance gains:
<OL>
<LI>Use GPLed source code for the benchmarks, preferably easily available on the Net.</LI>
<LI>Use standard tools. Avoid benchmarking tools that have been optimized for a specific system/equipment/architecture.</LI>
<LI>Use Linux/Unix/Posix benchmarks. Mac, DOS and Windows benchmarks will not help much.</LI>
<LI>Don't quote your results to three decimal figures. A resolution of 0.1% is more than adequate. Precision of 1% is more than enough.</LI>
<LI>Report your results in standard format/metric/units/report forms.</LI>
<LI>Completely describe the configuration being tested.</LI>
<LI>Don't include irrelevant data.</LI>
<LI>If variance in results is significant, report alongside results; try to explain why this is so.</LI>
<LI>Comparative benchmarking is more informative. When doing comparative benchmarking, modify a single test variable at a time. Report results for each combination.</LI>
<LI>Decide beforehand what characteristic of a system you want to benchmark. Use the right tools to measure this characteristic.</LI>
<LI>Check your results. Repeat each benchmark once or twice before publicly reporting your results.</LI>
<LI>Don't set out to benchmark trying to prove that equipment A is better than equipment B; you may be in for a surprise...</LI>
<LI>Avoid benchmarking one-of-a-kind or proprietary equipment. This may be very interesting for experimental purposes, but the information resulting from such benchmarks is absolutely useless to other Linux users.</LI>
<LI>Share any meaningful information you may have come up with. If there is a lesson to be learned from the Linux style of development, it's that sharing information is paramount.</LI>
</OL>
<P> <HR><P>
<H2><A NAME="ss2">2. A roundup of benchmarks for Linux</A></H2>
<P>These are some benchmarks I have collected over the Net. A few are Linux-specific, others are portable across a wide range of Unix-compatible systems, and some are even more generic.
<UL>
<LI><B>UnixBench</B>. A fundamental high-level Linux benchmark suite, Unixbench integrates CPU and file I/O tests, as well as system behaviour under various user loads. Originally written by staff members at BYTE magazine, it has been heavily modified by David C. Niemi.</LI>
<LI><B>BYTEmark</B> as modified by Uwe Mayer. A CPU benchmark suite, reporting CPU/cache/memory , integer and floating-point performance. Again, this test originated at BYTE magazine. Uwe did the port to Linux, and recently improved the reporting part of the test.</LI>
<LI><B>Xengine</B> by Kazuhiko Shutoh. This is a cute little X window tool/toy that basically reports on the speed with which a system will redraw a coloured bitmap on screen (a simulation of a four cycle engine). I like it because it is unpretentious while at the same time providing a useful measure of X server performance. It will also run at any resolution and pixel depth.</LI>
<LI><B>Whetstone</B>. A floating point benchmark by Harold Curnow.</LI>
<LI><B>Xbench</B> by Claus Gittinger. Xbench generates the famous xstone rating for Xserver performance comparisons.</LI>
<LI><B>XMark93</B>. Like xbench, this is a script that uses X11's x11perf and computes an index (in Xmarks). It was written a few years later than xbench and IMHO provides a better metric for X server performance.</LI>
<LI><B>Webstone 2.01</B>. An excellent tool for Web server performance testing. Although Webstone is copyight by Silicon Graphics, it's license allows free copying and examination of the source code.</LI>
<LI><B>Stream</B> by John D. McCalpin. This program is based on the concept of "machine balance" (sustainable memory bandwidth vs. FPU performance). This has been found to be a central bottleneck for computer architectures in scientific applications.</LI>
<LI><B>Cachebench</B> by Philip J. Mucci. By plotting memory access bandwidth vs. data size, this program will provide a wealth of benchmarking data on the memory subsystem (L1, L2 and main memory).</LI>
<LI><B>Bonnie</B> by Tim Bray. A high-level synthetic benchmark, bonnie is useful for file I/O throughput benchmarking.</LI>
<LI><B>Iozone</B> by Bill Norcott. Measures sequential file i/o throughput. The new 2.01 version supports raw devices and CD-ROM drives.</LI>
<LI><B>Netperf</B> is copyright Hewlett-Packard. This is a sophisticated tool for network performance analysis. Compared to ttcp and ping, it verges on overkill. Source code is freely available.</LI>
<LI><B>Ttcp</B>. A "classic" tool for network performance measurements, ttcp will measure the point-to-point <B>bandwidth</B> over a network connection.</LI>
<LI><B>Ping</B>. Another ubiquitous tool for network performance measurements, ping will measure the <B>latency</B> of a network connection.</LI>
<LI><B>Perlbench</B> by David Niemi. A small, portable benchmark written entirely in Perl.</LI>
<LI><B>Hdparm</B> by Mark Lord. Hdparm's -t and -T options can be used to measure disk-to-memory (disk reads) transfer rates. Hdparm allows setting various EIDE disk parameters and is very useful for EIDE driver tuning. Some commands can also be used with SCSI disks.</LI>
<LI><B>Dga</B> with b option. This is a small demo program for XFree's DGA extension, and I would never have looked at it were it not for Koen Gadeyne, who added the b command to dga. This command runs a small test of CPU/video memory bandwidth.</LI>
<LI><B>MDBNCH</B>. This is a large ANSI-standard FORTRAN 77 program used as an application benchmark, written by Furio Ercolessi. It accesses a large data set in a very irregular pattern, generating misses in both the L1 and L2 caches.</LI>
<LI><B>Doom</B> :-) Doom has a demo mode activated by running <CODE>doom -timedemo demo3</CODE>. Anton Ertl has setup a Web page listing results for various architectures/OS's.</LI>
</UL>
<P>All the benchmarks listed above are available by <B>ftp</B> or <B>http</B> from the
<A HREF="http://www.tux.org/bench">Linux Benchmarking Project </A>server in the download directory: www.tux.org/pub/bench or from the Links page.
<P> <HR> <P>
<H2><A NAME="ss3">3. Devising or writing a new Linux benchmark</A></H2>
<P>We have seen last month that (nearly) all benchmarks are based on either of two simple algorithms, or combinations/variations of these:
<OL>
<LI>Measuring the number of iterations of a given task executed over a fixed, predetermined time interval.</LI>
<LI>Measuring the time needed for the execution of a fixed, predetermined number of iterations of a given task.</LI>
</OL>
<P>We also saw that the Whetstone benchmark would use a combination of these two procedures to "calibrate" itself for optimum resolution, effectively providing a workaround for the low resolution timer available on PC type machines.
<P>Note that some newer benchmarks use new, exotic algorithms to estimate system performance, e.g. the Hint benchmark. I'll get back to Hint in a future article.
<P>Right now, let's see what algorithm 2 would look like:
<BLOCKQUOTE>
<EM>initialize loop_count</EM>
</BLOCKQUOTE>
<BLOCKQUOTE>
<EM>start_time = time()</EM>
</BLOCKQUOTE>
<BLOCKQUOTE>
<EM>repeat </EM>
</BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<EM>benchmark_kernel()</EM>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<EM>decrement loop_count</EM>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE>
<EM>until loop_count = 0</EM>
</BLOCKQUOTE>
<BLOCKQUOTE>
<EM>duration = time() - start_time</EM>
</BLOCKQUOTE>
<BLOCKQUOTE>
<EM>report_results()</EM>
</BLOCKQUOTE>
<P>Here, <EM>time()</EM> is a system library call which returns, for example, the elapsed wall-clock time since the last system boot. <EM>Benchmark_kernel()</EM> is obviously exercising the system feature or characteristic we are trying to measure.
<P>Even this trivial benchmarking algorithm makes some basic assumptions about the system being tested and will report totally erroneous results if some precautions are not taken:
<OL>
<LI>If the benchmark kernel executes so quickly that the looping instructions take a significant percentage of total loop processor clock cycles to execute, results will be skewed. Preferably, <EM>benchmark_kernel() </EM>should have a duration of &gt; 100 x duration of looping instructions.</LI>
<LI>Depending on system hardware, one will have to adjust <EM>loop_count</EM> so that total length duration &gt; 100 x clock resolution (for 1% bechmark precision) or 1000 x clock resolution (for 0.1% benchmark precision). On PC hardware, clock resolution is 10 ms.</LI>
<LI>We mentionned above that we used a straightforward wall-clock <EM>time()</EM> function. If the system load is high and our benchmark gets only 3% of the CPU time, we will get completely erroneous results! And of course on a multi-user, pre-emptive, multi-tasking OS like GNU/Linux, it's impossible to guarantee exclusive use of the CPU by our benchmark.</LI>
</OL>
<P>You can substitute the benchmark "kernel" with whatever computing task interests you more or comes closer to your specific benchmarking needs.
<P>Examples of such kernels would be:
<UL>
<LI>For FPU performance measurements: a sampling of FPU operations.</LI>
<LI>Various calculations using matrices and/or vectors.</LI>
<LI>Any test accessing a peripheral i.e. disk or serial i/o.</LI>
</UL>
<P>For good examples of actual C source code, see the UnixBench and Whetstone benchmark sources.
<P> <HR><P>
<H2><A NAME="ss4">4. An application benchmark: Linux 2.0.0 kernel compilation with gcc</A></H2>
<P>The more one gets to use and know GNU/Linux, and the more often one compiles the Linux kernel. Very quickly it becomes a habit: as soon as a new kernel version comes out, we download the tar.gz source file and recompile it a few times, fine-tuning the new features.
<P>This is the main reason for proposing kernel compilation as an application benchmark: it is a very common task for all GNU/Linux users. Note that the application that is being directly tested is not the Linux kernel itself, it's <B>gcc</B>. I guess most GNU/Linux users use gcc everyday.
<P>The Linux kernel is being used here as a (large) standard data set. Since this is a large program (gcc) with a wide variety of instructions, processing a large data set (the Linux kernel) with a wide variety of data structures, we assume it will exercise a good subset of OS functions like file I/O, swapping, etc and a good subset of the hardware too: CPU, memory, caches, hard disk, hard disk controller/driver combination, PCI or ISA I/O bus. Obviously this is not a test for X server performance, even if you launch the compilation from an xterm window! And the FPU is not exercised either (but we already tested our FPU with Whetstone, didn't we?). Now, I have noticed that test results are almost independent of hard disk performance, at least on the various systems I had available. The <B>real bottleneck</B> for this test is CPU/cache performance.
<P>Why specify the Linux kernel version 2.0.0 as our standard data set? Because it is widely available, as most GNU/Linux users have an old CD-ROM distribution with the Linux kernel 2.0.0 source, and also because it in quite near in terms of size and structure to present-day kernels. So it's not exactly an out-of-anybody's-hat data set: it's a typical real-world data set.
<P>Why not let users compile <B>any</B> Linux 2.x kernel and report results? Because then we wouldn't be able to compare results anymore. Aha you say, but what about the different gcc and libc versions in the various systems being tested? Answer: they are part of your GNU/Linux system and so also get their performance measured by this benchmark, and this is exactly the behaviour we want from an application benchmark. Of course, gcc and libc versions must be reported, just like CPU type, hard disk, total RAM, etc (see the Linux Benchmarking Toolkit Report Form).
<H2><A NAME="ss4.1">4.1 General benchmark features</A></H2>
<P>Basically what goes on during a gcc kernel compilation (make zImage) is that:
<OL>
<LI>Gcc is loaded in memory, </LI>
<LI>Gcc gets fed sequentially the various Linux kernel pieces that make up the kernel, and finally</LI>
<LI>The linker is called to create the zImage file (a compressed image file of the Linux kernel).</LI>
</OL>
<P>Step 2 is where most of the time is spent.
<P>This test is quite stable between different runs. It is also relatively insensitive to small loads (e.g. it can be run in an xterm window) and completes in less than 15 minutes on most recent machines.
<H2><A NAME="ss4.2">4.2 Benchmarking procedure</A></H2>
<H3>Getting the source.</H3>
<P>Do I really have to tell you where to get the kernel 2.0.0 source? OK, then: ftp://sunsite.unc.edu/pub/Linux/kernel/source/2.0.x or any of its mirrors, or any recent GNU/Linux CD-ROM set with a copy of sunsite.unc.edu. Download the 2.0.0 kernel, gunzip and untar under a test directory (<CODE>tar zxvf linux-2.0.tar.gz</CODE> will do the trick).
<H3>Compiling and running</H3>
<P>Cd to the linux directory you just created and type <CODE>make config</CODE>. Press &lt;Enter&gt; to answer all questions with their default value. Now type <CODE>make dep ; make clean ; sync ; time make zImage</CODE>. Depending on your machine, you can go and have lunch or just an expresso. You can't (yet) blink and be done with it, even on a 600 MHz Alpha. By the way, if you are going to run this test on an Alpha, you will have to cross-compile the kernel targetting the i386 architecture so that your results are comparable to the more ubiquitous x86 machines.
<H2><A NAME="ss4.3">4.3 Examining the results</A></H2>
<H3>Example 1 </H3>
<P>This is what I get on my test GNU/Linux box:
<P><CODE>186.90user 19.30system 3:40.75elapsed 93%CPU (0avgtext+0avgdata 0maxresident)k</CODE>
<P><CODE>0inputs+0outputs (147838major+170260minor)pagefaults 0swaps</CODE>
<P>The most important figure here is the total elapsed time: <B>3 min 41 s </B>(there is no need to report fractions of seconds).
<H3>Hardware setup description</H3>
<P>If you were to complain that the above benchmark is useless without a description of the machine being tested, you'd be 100% correct! So, here is the LBT Report Form for this machine:
<P>LINUX BENCHMARKING TOOLKIT REPORT FORM
<PRE>
CPU
</PRE>
<PRE>
===
</PRE>
<PRE>
Vendor: AMD
</PRE>
<PRE>
Model: K6-200
</PRE>
<PRE>
Core clock:208 MHz (2.5 x 83MHz)
</PRE>
<PRE>
Motherboard vendor: ASUS
</PRE>
<PRE>
Mbd. model: P55T2P4
</PRE>
<PRE>
Mbd. chipset: Intel HX
</PRE>
<PRE>
Bus type: PCI
</PRE>
<PRE>
Bus clock: 41.5 MHz
</PRE>
<PRE>
Cache total: 512 Kb
</PRE>
<PRE>
Cache type/speed: Pipeline burst 6 ns
</PRE>
<PRE>
SMP (number of processors): 1
</PRE>
<PRE>
RAM
</PRE>
<PRE>
===
</PRE>
<PRE>
Total: 32 MB
</PRE>
<PRE>
Type: EDO SIMMs
</PRE>
<PRE>
Speed: 60 ns
</PRE>
<PRE>
Disk
</PRE>
<PRE>
====
</PRE>
<PRE>
Vendor: IBM
</PRE>
<PRE>
Model: IBM-DCAA-34430
</PRE>
<PRE>
Size: 4.3 GB
</PRE>
<PRE>
Interface: EIDE
</PRE>
<PRE>
Driver/Settings: Bus Master DMA mode 2
</PRE>
<PRE>
Video board
</PRE>
<PRE>
===========
</PRE>
<PRE>
Vendor: Generic S3
</PRE>
<PRE>
Model: Trio64-V2
</PRE>
<PRE>
Bus: PCI
</PRE>
<PRE>
Video RAM type: 60 ns EDO DRAM
</PRE>
<PRE>
Video RAM total: 2 MB
</PRE>
<PRE>
X server vendor: XFree86
</PRE>
<PRE>
X server version: 3.3
</PRE>
<PRE>
X server chipset choice: S3 accelerated
</PRE>
<PRE>
Resolution/vert. refresh rate: 1152x864 @ 70 Hz
</PRE>
<PRE>
Color depth: 16 bits
</PRE>
<PRE>
Kernel
</PRE>
<PRE>
======
</PRE>
<PRE>
Version: 2.0.29
</PRE>
<PRE>
Swap size: 64 MB
</PRE>
<PRE>
gcc
</PRE>
<PRE>
===
</PRE>
<PRE>
Version: 2.7.2.1
</PRE>
<PRE>
Options: -O2
</PRE>
<PRE>
libc version: 5.4.23
</PRE>
<PRE>
Test notes
</PRE>
<PRE>
==========
</PRE>
<PRE>
Very light system load.
</PRE>
<PRE>
RESULTS
</PRE>
<PRE>
========
</PRE>
<PRE>
Linux kernel 2.0.0 Compilation Time: 3 m 41 s
</PRE>
<PRE>
Whetstone Double Precision (FPU) INDEX: N/A
</PRE>
<PRE>
UnixBench 4.10 system INDEX: N/A
</PRE>
<PRE>
Xengine: N/A
</PRE>
<PRE>
BYTEmark integer INDEX: N/A
</PRE>
<PRE>
BYTEmark memory INDEX: N/A
</PRE>
<PRE>
Comments
</PRE>
<PRE>
=========
</PRE>
<PRE>
Just tested kernel 2.0.0 compilation.
</PRE>
<H3>General comments</H3>
<P>Again, you will want to compare your results to those obtained on different machines/configurations. You will find some results on my Web site about 6x86s/Linux, in the
<A HREF="http://www.tux.org/~balsa/linux/cyrix/p0c.html">November News </A>page.
<P>This of course is pure GNU/Linux benchmarking, unless you want to go ahead and try to cross compile the Linux kernel on a Windows95 box!? ;-)
<P> <HR><P>
<H2><A NAME="ss5">5. Next month</A></H2>
<P>I expect that by next month you will have downloaded and tested a few benchmarks, or even started writing your own. So, in the next article: <EM>Collecting and Interpreting Linux Benchmarking Data</EM>
<UL>
<LI>Correct uses of Linux benchmarking data.</LI>
<LI>Architecture specific issues of Linux benchmarks.</LI>
<LI>Benchmarking Linux SMP systems.</LI>
<LI>Examples of more complex benchmarks: UnixBench and BYTEmark.</LI>
</UL>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Andr&eacute; D. Balsa <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./gm.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./cftp.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>Comfortable FTP</h1></center>
<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<p><hr><p>
<center><h3>Introduction</h3></center>
<p>There are quite a few FTP clients available for Linux these days. Several
of them are X programs, but why incur the overhead of running an X FTP client?
Downloading a file is not a very interactive process. Usually an FTP download
is a process running in the background, which just needs to be checked every
now and then.
<p>On the other hand, using the basic command-line FTP program is not much fun
unless you enjoy typing complete pathnames and filenames. A great improvement
is the classic ncurses-based client <b>NcFtp</b>, written by Mike Gleason.
This program has a well-designed bookmarking facility and supports the FTP
"reget" command, which allows resumption of interrupted
downloads. Unfortunately, file and directory names still must be typed in,
though NcFtp does support shell-like completion of filenames in both local and
remote directories.
<p>Recently I came across a new FTP client called <b>cftp</b>. It is being
developed by Dieter Baron, and though it is still a relatively new program, it
has been working superbly for me.
<center><h3>About cftp</h3></center>
<p>Cfpt isn't a showy application. It uses the termcap library, which allows
it to show a reverse-video modeline displaying the current host and directory,
as well as the number of bytes transferred. Otherwise it resembles a <b>ls
-l</b> listing of files in the remote directory. The default keybindings are
fairly intuitive: <b>d</b> downloads a file, <b>v</b> views a remote file
using your default pager, and the left and right arrow keys function like they
do in the <b>Lynx</b> text-mode web-browser: the left arrow-key takes you back
to the previous directory, and the right arrow-key descends into the
subdirectory under the cursor. The other key-bindings (as well as user
options) can be viewed during a session by typing <kbd>:help</kbd>. The colon
as a prefix to a command will be familiar to anyone who has used the <b>vi</b>
editor or one its clones. <b>Vi</b> and <b>Emacs</b> motion-keys can also be
used instead of the arrow-keys.
<p>What impressed me was the quickness with which the program starts up and
makes the connection; before you know it a directory listing is displayed.
This is a small and efficient little program which nevertheless has convenient
keyboard commands. It's just the thing for making a quick check of an FTP
site, perhaps reading a few *.lsm or README files, then pressing <b>q</b>
which tells cftp to first log off, then quit. Directory listings displayed
during a session are cached in memory, so returning to a previously-viewed
directory is near-instantaneous.
<p>Many FTP programs are in effect front-ends for the command-line FTP
utility, just as many mail clients use sendmail to do the actual
mail-handling. In contrast, cftp uses its own built-in FTP routines; this may
be one reason for its speed. Instead of passing an FTP command through a GUI
layer before handing it to the actual FTP executable, cftp is talking directly
with the remote server.
<center><h3>Aliases and Configuration</h3></center>
<p>There are two files which cftp reads when starting up, <i>~/.cftprc</i> and
<i>~/.netrc</i>. The <i>~/.cftprc</i> file can contain personal changes to
default settings, such as keybindings. Aliases for oft-visited sites can be
entered into this file as well. The line<br>
<p><kbd>alias sun ftp://sunsite.unc.edu/pub/Linux/Incoming</kbd><br>
<p>enables quick access to the site by merely typing <kbd>cftp sun</kbd>.
<p>The <i>~/.netrc</i> file is used by the default FTP program, as well as the
FTP facilities provided by GNU Emacs' dired and XEmacs' EFS. Cftp refers to
this file as well. An entry like this:<br>
<p><kbd>default login anonymous password [your e-mail address]</kbd><br>
<p>will save typing login info for sites which allow anonymous access, and if
you access a site for which you have a username and password, lines like
these:<br> <pre><kbd>machine [hostname] login [login-id] password [password]
macdef init cd /[directory to change to]</kbd></pre><br> will speed up
accessing the site.
<center><h3>New Enhancements</h3></center>
<p>When I began this review version 0.7 was the latest version; since then
version 0.8 has been released, which contains several new features:
<ul>
<li>In this version "putting" or uploading files to
a remote site is supported.
<li>Directory listings can now be sorted by date as well as by name.
<li>A new option is a beep when a download is completed. This is handy when
a session is running in the background or on another desk-top.
</ul>
<hr>
<center><h3>Conclusion</h3></center>
<p>As I write this <b>cftp-0.8.tar.gz</b> is the current version; the latest
release can be found at the cftp home
<a href="ftp://ftp.giga.or.at/pub/nih/cftp">FTP site</a>, or via the WWW at
<a href="http://ftp.giga.or.at/pub/nih/cftp">this site</a>.
<p>I enjoyed trying this small application and find myself using it often.
It's a small download and should compile easily if you have libtermcap
installed. If you do try it, let <a href="mailto://dillo@giga.or.at">
Deiter Baron</a> know what you think of it.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Larry Ayers<BR>
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./bench2.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./tkman.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>TkMan</h1></center>
<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<p><hr><p>
<center><h3>Introduction</h3></center>
<p>The traditional form of unix documentation is the manual-page system, which
uses the <b>man</b> command in conjunction with the <b>Groff</b> text
formatter to display manual pages (with your default pager) on a terminal
screen. This system is rather long in the tooth, but is still in widespread
use because it both works well and doesn't require a windowing system. The
man-page directory structure (with a directory corresponding to each directory
of executables) is pretty well standardized, ensuring that when new software
is installed the corresponding man-page(s) have a place waiting for them in
the hierarchy.
<p>For the past couple of years Thomas Phelps, of the University of California
at Berkeley, has been writing and rewriting a Tcl/Tk based man-page reader
called TkMan. As John Ousterhout has released the successive versions of Tcl
and Tk TkMan has been updated to make use of the expanded capabilities of the
two toolkits. Soon after the release of Tcl/Tk 8.0 this past August, TkMan
2.0 was released; it's a major release with several new features, thus this
review.
<center><h3>Features and Capabilities</h3></center>
<p>TkMan is a super-charged reader which can access and search
your man-pages in a variety of useful ways, and then display them in a
nicely-formatted and very configurable fashion. Here is a sampling of what
TkMan can do:
<ul>
<li>Any man-page mentioned in another page serves as a hyper-text
link, giving man-page reading something of the flavor of
HTML browsing.
<li>The section headers of a page can be collapsed into an outline, making
it easy to get a feel for the contents and organization of the page.
<li>Hyper-linked listings of each category of man-page (such as <b>User
Commands</b> or <b>Games</b>), as well as a listing of new and recently
added pages.
<li>A listing of often-accessed pages can be created, and "virtual volumes"
of pages can be set up, if you'd like to have several scattered pages
accessible as a new volume or category.
<li>Integration with the <i>apropos</i> and <i>whatis</i> commands.
<li>There is an entry field in the main window which allows you to enter
text-strings or regular expressions and search for them in the displayed
page.
<li>If you have the <b>Glimpse</b> indexing and search facility installed,
TkMan can use its services for powerful searches of man-page text.
<li>If you are either bored or in the mood for a little aleatory learning,
there is a menu-button which will cause a random man-page to be displayed.
<li>When starting up, TkMan reports on any faults it finds in your man-page
and man-path set-up.
<li>Configurable display colors and fonts.
</ul>
<p>It is all too easy to end up with superfluous copies of man-pages on a
Linux system. If your man-pages are gzipped, an upgrade to a new version of a
program will install the new page, but the new one won't over-write the old
because the old one has the <i>.gz</i> suffix, and thus the filename is
different. TkMan offers a means of keeping track of duplicate man-pages; wnen
a page is displayed, the title of the page in the menu-bar will have drop-down
entries showing the paths of any other pages with the same name. Selecting
one of these will load the page, and if it's an older version or just an exact
duplicate it can be deleted. Here's a screenshot of a typical window:<br>
<p>
<img alt="TkMan Screenshot" src="./gx/ayers/tkman.gif">
<p>This screenshot shows a man-page in its "folded" state; the right-pointing
triangles are sections with hidden text. A mouse-click will expand them.
<hr>
<center><h3>Installation</h3></center>
<p>The latest version of TkMan relies on Tcl8.0 and Tk8.0, so if you want to
try it out this may be a good time to upgrade. Recent versions of Tcl/Tk
compile easily "out-of-the-box", so this shouldn't present too much of a
problem. Unfortunately, especially if you've recently compiled and installed
the 8.0 versions (and deleted the source), TkMan needs one patch to be applied
to one of the Tk8.0 source files in order to function. The Tk source then
needs to be recompiled. Thomas Phelps attempted to convince the Tk developers
to include his patch in the distribution, but was unsuccessful. The patch
adds outlining to the Tk text display functions. I've run several other
applications which rely on Tk8.0 and the patch so far hasn't caused any
problems.
<p>TkMan also depends on the services provided by PolyglotMan (formerly Rman),
also written by Thomas Phelps. PolyglotMan is a separate program which can
reverse-compile or translate man-pages from their native Nroff or Groff format
to a variety of other formats, such as HTML, SGML, LaTeX, TkMan's native
format, and the Perl pod format, among others. This should be compiled and
installed first, as the TkMan makefile needs to contain PolyglotMan's path.
<p>TkMan is entirely a Tcl/Tk program, so it doesn't need to be compiled. The
makefile instead rewrites several of the Tcl files, adapting them to your
system's paths, before copying them to (by default) /usr/local. The makefile
is well-commented and easy to adapt to your system.
<center><h3>Availability</h3></center>
<p>The current versions of both TkMan and PolyglotMan can be downloaded from
the home <a href="ftp://ftp.cs.Berkeley.EDU/ucb/people/phelps/tcltk">site</a>.
<hr>
<center><h3>Observations</h3></center>
<p>TkMan isn't the sort of man-page reader you'd want to fire up just to check
the syntax of a command, but if you're needing to refer to several man-pages
in a session it can be a great convenience. A history of pages you have
viewed is stored as you work, and it can be accessed from a dynamically
updated drop-down menu. The overview of all man-pages in a section can
be interesting, too. It's easy to forget just how many of these pages there
are, and sometimes just seeing the title of a program or command in the
listing can spark curiousity. It's easy to get in the habit of using
just a small subset of a command's capabilities; several times I've noticed a
page listed for a command I've used frequently but never thought to
investigate. Even more times I've seen listings for programs I long ago
deleted!
<p>There are probably more features in TkMan than most people will ever use,
but this increases the odds that the one which suits you is included. This
seems to be a very high-quality program, and it will run on just about any
flavor of unix out there.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Larry Ayers<BR>
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
LT="[ FRONT PAGE ]"></A>
<A HREF="./cftp.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./flower/page1.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>Processes on Linux and Windows NT</H2>
<H4>By Glen Flower, <a
href="mailto:glenf@eis.net.au">glenf@eis.net.au
</a></H4>
</center>
<P><HR><P>
<DIR>
<DIR><FONT SIZE=+3><A HREF="./flower/intro.html">Introduction</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/vmem.html">Virtual Memory</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/psimage.html">Process Image</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/groups.html">User and Group Privileges</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/multitask.html">Multitasking</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/multiproc.html">Multiprocessing</A></FONT></DIR>
</DIR>
<DIR>
<DIR><FONT SIZE=+3><A HREF="./flower/context.html">Process Context</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/threads.html">Threads</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/schedule.html">Scheduling</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/mutex.html">Mutual Exclusion and Synchronisation</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/timers.html">Timers</A></FONT></DIR>
</DIR>
<DIR>
<DIR><FONT SIZE=+3><A HREF="./flower/ipc.html">Communication Between Processes</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/linuxproc.html">A Closer Look at Processes on
the Linux Operating System</A></FONT>
<P><FONT SIZE=+3><A HREF="./flower/books.html">Bibliography</A></FONT>
<P>&nbsp;</DIR>
</DIR>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Glen Flower <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./tkman.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./shoham/drafth.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<CENTER>&nbsp;</CENTER>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Bibliography</B></FONT></FONT>
<DIR>
<DIR><FONT SIZE=+1>The Linux Kernel : David A Rusling, Linux Documentation
Project.</FONT>
<P><FONT SIZE=+1>Linux Programming Guide : Linux Documentation Project.</FONT>
<P><FONT SIZE=+1>Kernel Hacker's Guide : Linux Documentation Project.</FONT>
<P><FONT SIZE=+1>Pthreads posix threads html pages</FONT>
<P><FONT SIZE=+1>Inside Windows NT, Helen Custer, Microsoft Press.</FONT>
<P><FONT SIZE=+1>Readings on Microsoft Windows and WOSA, Microsoft Press.</FONT>
<P><FONT SIZE=+1>Programming Windows NT Unleashed: Hamilton, Williams.</FONT>
<P><FONT SIZE=+1>Operating Systems : William Stallings.</FONT>
<P><FONT SIZE=+1>The Magic Garden Explained : Goodheart, Cox.</FONT>
<P><FONT SIZE=+1>Windows NT Magazine : July 1997 : The NT Scheduler.</FONT>
<P><FONT SIZE=+1>Linux Journal : April 1997 : Threads Programming, Martin
McCarthy.</FONT>
<P><FONT SIZE=+1>Linux man pages for : ps, vmstat, fuser, kill, procinfo,
procmeter, free, readprofile, profil, nice, renice, pstree, top.</FONT>
<P><FONT SIZE=+1>Linux source code.</FONT>
<P><FONT SIZE=+1>Lecture notes for 85349 Operating Systems : David Jones
/ Steve Smith, CQU</FONT>
<DIR>
<DIR>
<P><FONT SIZE=+1>&nbsp;</FONT></DIR>
</DIR>
<DIV ALIGN=right><FONT SIZE=-1>&nbsp;</FONT><A HREF="./flower/linuxproc.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
</DIR>
</DIR>
&nbsp;<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Process
Context</B></FONT></FONT>
<P><FONT SIZE=+1>&nbsp;Each time a process is removed from access to the
processor, sufficient information on its current operating state must be
stored such that when it is again scheduled to run on the processor it
can resume its operation from an identical position. This operational state
data is known as its <I>context</I> and the act of removing the process's
thread of execution from the processor (and replacing it with another)
is known as a <I>process switch </I>or<I> context switch.</I></FONT>
<P><FONT SIZE=+1><I>&nbsp;</I>The distinction is made here between the
condition where a process is removed from the processor completely and
is replaced by another process (a process switch) and the case where the
process state is stored while execution is interrupted temporarily (a context
switch). Note that a process switch performs a superset of the operations
required for the context switch. The latter case may be when an external
interrupt is serviced or when a system call necessitates a switch from
user mode to system mode. In the case of the process switch much more information
must be saved in order to later restore the process context than in the
second case where the process remains resident in memory while it's thread
of execution is interrupted.</FONT>
<P><FONT SIZE=+1>&nbsp;The context of a process includes its address space,
stack space, virtual address space, register set image (e.g. Program Counter
(PC), Stack Pointer (SP), Instruction Register (IR), Program Status Word
(PSW) and other general processor registers), updating profiling or accounting
information, making a snapshot image of its associated kernel data structures
and updating the current state of the process (waiting, ready, etc).</FONT>
<P><FONT SIZE=+1>&nbsp;This state information is saved in the process's
process control block which is then moved to the appropriate scheduling
queue. The new process is moved to the CPU by copying the PCB info into
the appropriate locations (e.g. the program counter is loaded with the
address of the next instruction to execute).</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Each process's context is described by a <I>task_struct
</I>structure. The task_struct holds data such as the scheduling policy,
scheduler priority, real time priority, processor allowed time counter,
processor registers, file handles (files_struct), virtual memory (mm_struct).&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>The kernel maintains a view of a process or thread known
as a kernel process object or kernel thread object respectively. These
contain just the information the kernel needs to effectively switch between
processes or threads.</FONT></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>&nbsp;When a process switch is made the scheduler saves
the process's task_struct and replaces the current tasks pointer with a
pointer to the new process's task_struct, restoring its memory access and
register context. This may be assisted by hardware.</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>&nbsp;The kernel makes a context switch by pushing context
information onto the current kernel mode stack, for a process it also saves
the address of it's page table directory so that it's address space is
maintained.&nbsp;</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;
<DIV ALIGN=right><A HREF="./flower/multiproc.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/threads.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>User
and Group Privileges</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>
<P><FONT SIZE=+1>&nbsp;Each process has some form of associated Process
Identifier, (PID) through which it may be manipulated. The process also
carries the User Identifier (UID) of the person who initiated the process
and will also have group identifier (GID).</FONT>
<P><FONT SIZE=+1>&nbsp;The UID is used to decide privilege to perform operations
on resources such as files. Processes will normally belong to one or more
process groups. A group identifier (GID) is used by the kernel to identify
privileges allocated to a group of users and hence their created processes.
Groups allow subsets of the available privileged operations (such as granting
of access to files, printers, ability to create directories) to be restricted
to members of a particular group only, with non members of the group being
excluded from performing those operations.</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows
NT</FONT></FONT></B></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>On a Unix derivative system such
as Linux the PID, UID and GID identifiers equate to simple integers which
are associated with processors as part of their Process Control Block.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>A process handle is used for the
process identifier. A process handle is a special case of an Object handle,
where object handles may reference files, devices and processes.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>On Unix processes maintain a parent-child
relationship where the process that initiates a sub process becomes a parent
to it?s child via a fork and optional exec operation to first clone the
parent process and then replace it with a new executable process image.
Due to this relationship it is possible to terminate all child processes
by sending a KILL signal to the parent. All of the processes in the system
are accessed via a doubly linked list whose root is the init process?s
task_struct data structure.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>Windows NT processes do not maintain
a parent-child relationship. Instead a process maintains an Object table
to hold handles of other processes.&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>When a new process is created it inherits all object handles
from its creator that were previously marked with the inheritance attribute.&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>Access to resources is decided
as a result of the combination of resource defined permissions and a combination
of the UID, GID (or effective UID and GID) under which a process is running.
The owner of a resource or the administrator may grant access to a user
or group of users.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>The NT Object Manager attaches
an <I>access token</I> to a process which is checked against a resource's
permissions to decide what granted access rights the process is allowed.
The owner of a resource or the administrator may grant access permissions
to a user or group of users.</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>Example : a Linux device may be allocated the bitmask
permissions of <FONT FACE="Courier">crwxr-x---</FONT>, may be owned by
the root user (UID=0) and be allocated to the <FONT FACE="Courier">admin</FONT>
group. The allocated permissions of the device indicate that a process
operating for the root user will have read, write and execute permissions
on the device. A process operating with an effective GID of the admin group
will have read and execute permissions, with other users being prevented
from carrying out any operations on the device.</FONT>
<DIV ALIGN=right><A HREF="./flower/psimage.html"><IMG
SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/multitask.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
&nbsp;
<BR><B><FONT COLOR="#3366FF"><FONT SIZE=+2>Introduction to Processes</FONT></FONT></B>
<P><FONT SIZE=+1>When a developer writes, compiles and links a programme
it may be stored on a computer disk as a file in the disk file system.
This file is created in a predefined format that the operating system or
operating system shell will recognise as an executable programme.</FONT>
<P><FONT SIZE=+1>&nbsp;When a programme is run it is instantiated in memory,
taking up system resources such as memory for data structures, file descriptors
and providing at least one thread of execution which defines the current
state and subsequent required operations for the process. The current executing
program, or process, has total use of the microprocessor while in it's
run state. A process will use files within the filesystems and may access
the physical devices in the system either directly or indirectly.</FONT>
<P><FONT SIZE=+1>&nbsp;A process may operate in one of two modes which
are known as 'user' mode and 'system' mode (or kernel mode). A single process
may switch between the two modes, i.e. they may be different phases of
the same process. Processes defaulting to user mode include most application
processes, these are executed within an isolated environment provided by
the operating system such that multiple processes running on the same machine
cannot interfere with each other's resources. A user processs switches
to kernel mode when it makes a system call, generates an exception (fault)
or when an interrupt occurs (e.g. system clock). At this point the kernel
is executing on behalf of the process. At any one time during its execution
a process runs in the context of itself and the kernel runs in the context
of the currently running process. This is shown in Figure 1.</FONT>
<CENTER><IMG SRC="./gx/flower/process.gif" ALT="Logical view of a Linux process" HEIGHT=336 WIDTH=448></CENTER>
<P><FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>Processes operating in kernel mode are privileged and
are granted access to all computer resources (such as all available memory)
free of the restrictions applied to user mode processes. The distinction
between a process in either user or kernel mode may be supported by the
hardware which serves to enforce the privilege rule and so protect the
computer system from undue damage or failure due to ill behaved user processes.</FONT>
<P><FONT SIZE=+1>&nbsp;Though the basic concepts are similar, different
operating systems implement process management in different ways.</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows
NT</FONT></FONT></B></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>On the Linux operating system
privileged services are largely implemented by a single monolithic kernel.
The kernel provides the central services required to support the successful
operation of the computer.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>The Linux kernel can also have a number of loadable modules
which may serve to supplement its central functions e.g. by the addition
of a new file system. As the kernel carries out a number of responsibilities
within a single entity it is commonly known as a macrokernel architecture.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>The Windows NT operating system
is based on a derivative of a layered operating system (such as VAX VMS)
and a true client/server operating (such as Mach) microkernel architecture,
where the central kernel process carries out only the most basic tasks
in the most efficient manner possible.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;Associated with the microkernel are a number of
privileged processes collectively known as the Executive which operate
in their own separate process subsystems. These includes (amongst others)
a dedicated Process Manager, Object Manager and Virtual Memory manager
to provide specialised services as required to support the establishment
of processes and their resources.</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>The operating system itself will execute largely in kernel
mode. User mode processes will often need access to services which can
only be accessed by privileged code operating in kernel mode. In this case
they call a system function which causes a hardware 'trap' to occur, causing
a context switch to system mode where the required operation can be carried
out in a controlled manner by 'trusted' operating system functions before
context switching back again to user mode.</FONT>
<P><FONT SIZE=+1>&nbsp;Every user process runs in its own address space
(typically 3Gbytes on a 32 bit processor) isolated from the address space
of other active processes. From the point of view of the individual process
it also has complete access to the processor(s) of the machine on which
it is running i.e. it has it's own <I>virtual machine</I> on which it runs,
under the control of the operating system but independent from other processes.</FONT>
<BR>&nbsp;
<CENTER>&nbsp;</CENTER>
<DIV ALIGN=right><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/vmem.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Communication Between Processes</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>
<P><FONT SIZE=+1>&nbsp;Processes operate within their own virtual address
space and are protected by the operating system from interference by other
processes. By default a user process cannot communicate with another process
unless it makes use of secure, kernel managed mechanisms. There are many
times when processes will need to share common resources or synchronise
their actions. One possibility is to use threads, which by definition can
share memory within a process. This option is not always possible (or wise)
due to the many disadvantages which can be experienced with threads. Methods
of passing messages or data between processes are therefore required.</FONT>
<P><FONT SIZE=+1>&nbsp;<B><FONT COLOR="#FF0000">Linux</FONT></B> supports
the following methods of communication. System V IPC refers to the version
of Unix in which the concepts noted below were first introduced.</FONT>
<BR>&nbsp;
<TABLE BORDER CELLPADDING=7 WIDTH="510" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="20%">
<DIR><FONT SIZE=+1>Signals</FONT></DIR>
</TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Signals are used to signal asynchronous
events between processes. A process may implement a signal handler to carry
out required when an event occurs or may use the system default actions.
Most signals can be ignored or blocked, though the KILL signal cannot be
ignored and will result in a non clean process exit.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%">
<DIR><FONT FACE="Courier New"><FONT SIZE=+1>UNIX pipes</FONT></FONT></DIR>
</TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A pipe connects the standard output
of one process to the standard input of another. They provide a method
of one-way communication between processes in a parent-child relationship
and for this reason may be called half duplex pipes.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Named Pipes (FIFOs)</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Named pipes appear similar to
regular pipes but are implemented as device special First In-First Out
(FIFO) files in the file system. It is not necessary for processes to maintain
a parent-child relationship for them to communicate via named pipes. Named
pipes are persistent and may be reused after their initial setup.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>System V IPC Message Queues</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Message queues consist of a linked
list within the kernel's addressing space. Messages are added to the queue
sequentially and may be retrieved from the queue in several different ways.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>System V IPC Semaphores</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Semaphores are counters used to
control access to shared resources by multiple processes. They are most
often used as a locking mechanism to prevent processes from accessing a
particular resource while another process is performing operations on it.
Semaphores are implemented as sets, though a set may have a single member.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>System V IPC Shared Memory</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Shared memory is a mapping of
an area of memory into the address space of more than one process. This
is the fastest form of IPC as processes do not subsequently need access
to kernel services in order to share data.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Full-duplex pipes (STREAMS)</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>STREAMS were introduced by AT&amp;T
and are used for character based I/O within the kernel and between it?s
associated device drivers as a full duplex transfer path between processes.
Internally pipes may be implemented as STREAMS.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Remote Procedure Call (RPC)</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A network inter-process connection
protocol based on Sun Microsystems' RPC standard.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Networking sockets (Berkeley style)</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Sockets allow local or network
connection between processes. Socket names are implemented within a domain.
In the UNIX domain a socket is given a path name within the file system.
Other processes may use that name to communicate.</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>
<BR><FONT SIZE=+1><B><FONT COLOR="#FF0000">Windows NT</FONT></B> inter-process
communication and synchronisation facilities include the following :</FONT>
<BR>&nbsp;
<TABLE BORDER CELLPADDING=7 WIDTH="510" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Events or Event Pairs</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Event handles may be inherited,
passed on creation or duplicated for a process. Event handles may optionally
have names and are signalled using the SetEvent call.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier New"><FONT SIZE=+1>Anonymous
Pipes</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Used primarily for communication
between related processes. Anonymous pipes cannot be used over a network.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier New"><FONT SIZE=+1>Named
Pipes (FIFOs)</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Named pipes are similar to anonymous
pipes but may be referenced by name rather than handle, may be used over
a network and can use asynchronous, overlapped I/O.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Semaphores</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Like Linux, Windows NT semaphore
objects are implemented as counters which act as guardians over a section
of code or resource.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Shared Memory</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A <I>section </I>object is a Win32
subsystem object which is made available as a<I> file mapping object </I>which
two or more processes may share. One thread creates the section object
and other threads obtain handles to it.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Remote Procedure Calls (RPCs)</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>An implementation of the Distributed
Computing Environment (DCE) standard for calling processes over a network.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Local Procedure Calls (LPCs)</FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A facility similar in usage to
RPC but in fact being a cut down version that can act only on a local computer
to perform efficient message passing between client/server processes using
kernel provided mechanisms. There are three basic choices :</FONT>&nbsp;
<OL TYPE="i">
<LI>
<FONT SIZE=+1>Messages may be passed into a server port objects message
queue - used for small messages.</FONT></LI>
<LI>
<FONT SIZE=+1>Messages are passed via a shared memory object.</FONT></LI>
<LI>
<FONT SIZE=+1>Quick LPC is used by portions of the Win32 subsystem to achieve
minimum overhead and maximum speed.</FONT></LI>
</OL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier New"><FONT SIZE=+1>STREAMS</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>An implementation of the Unix
System V driver environment used in networking.</FONT></TD>
</TR>
</TABLE>
&nbsp;
<P>&nbsp;
<DIV ALIGN=right><FONT SIZE=-1>&nbsp;</FONT><A HREF="./flower/timers.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/linuxproc.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR><FONT COLOR="#3366FF"><FONT SIZE=+3><B>A Closer Look at Processes on
the Linux Operating System</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>
<P><FONT SIZE=+1>&nbsp;On Linux there are a number of utilities which allow
the System Administrator to examine the status of processes and to adjust
their relative priorities or change their operational status. Some of these
capabilities can be demonstrated by examining one programme available for
the Linux OS : the Apache httpd daemon : a freely available web server.
In the following prints of screen outputs some columns have been ommitted
where they do not affect the demonstration being given.</FONT>
<P><FONT SIZE=+1>&nbsp;From the following it can be seen that the size
of the http daemon is 142699 bytes on the disk. Within the ELF file there
are 108786 bytes of code, 4796 bytes of initialised data and 19015 bytes
of uninitialiased data.</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
ls -l httpd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;-rwxr-x--- 1 root root 142699
Oct 5 1996 httpd*</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
size httpd</FONT></FONT>
<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="451" >
<TR>
<TD VALIGN=TOP WIDTH="16%"><FONT FACE="Courier"><FONT SIZE=+1>text</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>Data</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>bss</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="17%"><FONT FACE="Courier"><FONT SIZE=+1>dec</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>hex</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="23%"><FONT FACE="Courier"><FONT SIZE=+1>filename</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="16%"><FONT FACE="Courier"><FONT SIZE=+1>108786&nbsp;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>4796&nbsp;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>19015&nbsp;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="17%"><FONT FACE="Courier"><FONT SIZE=+1>132597&nbsp;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>205f5&nbsp;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="23%"><FONT FACE="Courier"><FONT SIZE=+1>httpd</FONT></FONT></TD>
</TR>
</TABLE></CENTER>
<FONT SIZE=+1>Performing an object dump of the file shows that the code
section is offset within the file and starts at hexadecimal address 0x1ce0,
read only data starts at 0x16238, other data at 0x1a9e8 and uninitialised
data at 0x1bcb0. There is a table of debugging symbols at 0x1bcb0 :</FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
objdump --headers httpd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>httpd: file format elf32-i386</FONT></FONT>
<P><FONT SIZE=+1><FONT FACE="Courier">&nbsp;Sections: </FONT>&lt; Some
sections excluded for clarity ></FONT>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>Idx Name Size VMA LMA File off
Algn</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>0 .interp 00000013 080000d0 080000d0
000000d4 2**0</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, READONLY,
DATA</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>8 .text 00014544 08001ce0 08001ce0
00001ce0 2**4</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, READONLY,
CODE</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>10 .rodata 000047ac 08016238 08016238
00016238 2**2</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, READONLY,
DATA</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>11 .data 00001050 0801b9e8 0801b9e8
0001a9e8 2**2</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, DATA</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>16 .bss 00004a47 0801ccb0 0801ccb0
0001bcb0 2**4</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>ALLOC</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>17 .stab 000004f8 00000000 00000000
0001bcb0 2**2</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, READONLY, DEBUGGING</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT></DIR>
</DIR>
<FONT SIZE=+1>The http daemon utilises functions from the standard 'C'
library, linked as a dynamic linked library (the 'so' stands for 'shared
object') :</FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
ldd -r httpd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp; libc.so.5 => /usr/local/lib/libc.so.5
(0x4000a0)</FONT></FONT>
<P><FONT SIZE=+1>The daemon is started at system boot time and was sleeping
(S) when its status was checked, it is consuming very little CPU time :</FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
ps -fc | grep httpd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;PID TTY STAT TIME COMMAND</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>90 ? S 0:00 httpd</FONT></FONT>
<P><FONT SIZE=+1>&nbsp;A printout of the tree of all processes running
on the computer and their interrelationships shows that the httpd has <FONT FACE="Courier">init</FONT>
as its parent process, this is typical of a Unix daemon process. It has
also created three child processes which it now controls, presumably to
listen for http connections.</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
pstree</FONT></FONT>
<DIR>
<DIR>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;init-+-4*[agetty]</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-bash--script--script--bash--script--script--bash--pstree</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-bash</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-crond</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-gpm</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-httpd--3*[httpd]</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-inetd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-kflushd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-klogd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-kswapd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-lpd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-rpc.mountd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-rpc.nfsd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-rpc.portmap</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-sendmail</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>|-syslogd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>`-update</FONT></FONT>
<P><FONT SIZE=+1>&nbsp;</FONT></DIR>
</DIR>
</DIR>
</DIR>
<FONT SIZE=+1>This is confirmed by examining a few of the processes running
in more detail. The <FONT FACE="Courier">init</FONT> process has a Process
ID (PID) of 1. It can be seen that the parent PID of the httpd is 1 as
expected.</FONT>
<P><FONT SIZE=+1>&nbsp;It can be seen that the resident memory footprint
(Resident Set Size (RSS)) of the httpd process is 528 kilobytes whereas
its overall size in virtual memory is 1012 Mb. It can be seen that the
process runs with a User ID of 0 (owned by the administrator (root)) and
that it is running at the default priority of 0 (-20 being maximum real-time
and 20 being the lowest priority). The SW&lt; status for the kernel swap
daemon (kswapd) process shows that it is sleeping, has no resident pages
and has a priority less than 0.</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
ps -cl1,2,3,90</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;F UID PID PPID PRI NI SIZE
RSS WCHAN STAT TTY TIME COMMAND</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>100 0 1 0 0 0 844 328 c01115c9 S
? 0:03 init [5]</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>40 0 2 1 0 0 0 0 c0111a38 SW ? 0:00
(kflushd)</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>40 0 3 1 -12 -12 0 0 c0111a38 SW&lt;
? 0:00 (kswapd)</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>140 0 90 1 0 0 1012 528 c0119272
S ? 0:00 httpd</FONT></FONT>
<P><FONT SIZE=+1>&nbsp;Looking at the virtual memory performances of the
process it can be seen that the httpd has had 23 major page faults where
a page fault represents an action to load a page of text from disk or buffer
cache. The text (code) resident set size (TRS) is 24 kilobytes which suggests
a code page size of 1024 bytes when viewed in association with the page
fault number. The Data Resident Size is 108 kilobytes, giving a total SIZE
of 132 kilobytes. The process shares 115 kilobytes with other processes
(this may represent the standard 'C' shared library).</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
ps -cmp1,2,3,90</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="500" >
<TR>
<TD VALIGN=TOP WIDTH="8%"><FONT SIZE=+1>PID</FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>MAJFLT</FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT SIZE=+1>MINFLT</FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>TRS</FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>DRS</FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>SIZE</FONT></TD>
<TD VALIGN=TOP WIDTH="11%"><FONT SIZE=+1>SWAP</FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>RSS</FONT></TD>
<TD VALIGN=TOP WIDTH="11%"><FONT SIZE=+1>SHRD</FONT></TD>
<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>COMMAND</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>2</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>kflushd</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>3</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>kswapd</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>1</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>206</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>49</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>5</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>77</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>82</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>82</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>65</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>init&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>90</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>23</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>51</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>24</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>108</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>132</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>132</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>115</FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>httpd&nbsp;</FONT></TD>
</TR>
</TABLE>
<FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<P><FONT SIZE=+1>The system administrator can re-prioritise the httpd process
by changing it's NICE level. Here the priority of process 90 (httpd) is
made higher by 10. Only the administrator can change priorities in a negative
direction as shown. This prevents inexperienced users from overloading
the CPU and also protects the system from hackers.</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
renice -10 90</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;90: old priority 0, new priority
-10</FONT></FONT>
<P><FONT SIZE=+1>&nbsp;The new priority level can now be seen, although
on this system the httpd is idle, receiving no web access requests so it
would not consume much more CPU.</FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1><FONT COLOR="#0000FF">orion-1:#</FONT>
ps -cl</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="470" >
<TR>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>UID</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>PID</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>PRI</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>PPID</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>NI</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>SIZE</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>RSS</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>STAT</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>TIME</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>COMMAND</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>844</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>328</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>S</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:03</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>init [5]</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>SW</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:00</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>(kflushd)</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>3</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-12</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-12</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>SW&lt;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:00</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>(kswapd)</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>90</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-10</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-10</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>1012</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>528</FONT></FONT></DIV>
</TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>S &lt;</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:00</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>httpd</FONT></FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>The system is now loaded somewhat by running some CPU
intensive shell scripts. The virtual memory statistics of the computer
are examined every 5 seconds for five iterations.</FONT>
<P><FONT SIZE=+1>&nbsp;The procs field shows that on average 2 processes
are waiting for CPU run time (r) and on iteration 3 two processes are in
uninterruptable sleep. There is no swapping activity going on as the processes
are small enough to be fully resident in memory.</FONT>
<P><FONT SIZE=+1>&nbsp;There is however I/O activity as blocks of data
are brought in (bi) and sent out (bo) to I/O devices. The 'system' fields
show that many interrupts are occurring per second (in) as well as many
context switches (cs). The first iteration gives the average history since
the last system reboot, whereas the subsequent four readings are for time
now. It can be seen that the CPU is never idle (id) and is spending around
35% of its time in user mode and 65% of its time performing privileged
operations in system mode.</FONT>
<P><FONT SIZE=+1>&nbsp;This report is consistent with the known operations
being performed : I/O intensive disk reads : the Linux 'find' command searching
the disk.</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
vmstat 5 5</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="536" >
<TR>
<TD VALIGN=TOP COLSPAN="3" WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>procs</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="4" WIDTH="24%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>memory</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="3" WIDTH="13%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>swap</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="3" WIDTH="12%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>io</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="3" WIDTH="20%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>system</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="3" WIDTH="22%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>cpu</FONT></FONT></CENTER>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="3%"><FONT FACE="Courier"><FONT SIZE=+1>r</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT FACE="Courier"><FONT SIZE=+1>b</FONT></FONT></TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>w</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT FACE="Courier"><FONT SIZE=+1>swpd</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT FACE="Courier"><FONT SIZE=+1>free</FONT></FONT></TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="6%"><FONT FACE="Courier"><FONT SIZE=+1>buf</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>si</FONT></FONT></TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>so</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>bi</FONT></FONT></TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>bo</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="9%"><FONT FACE="Courier"><FONT SIZE=+1>in</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>cs</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>us</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>sy</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>id</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>10</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>8</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>133</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>34</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>6</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>8</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>86</FONT></FONT></CENTER>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>614</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>11</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>737</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1234</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>32</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>68</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>100</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>129</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>435</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>366</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>40</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>60</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>202</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>26</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>375</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>455</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>33</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>67</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>230</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>331</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>472</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>31</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>69</FONT></FONT></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>
</TABLE>
<FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<P><FONT SIZE=+1>&nbsp;It is possible to probe the Linux kernel and find
which operations are consuming the most CPU load. When this is done it
is seen that the kernel is spending most of it's time dealing with the
directory cache, file system and writing to the console. The system scheduling
process is only the twentieth most active process on the list.</FONT>
<P><FONT SIZE=+1>&nbsp;To be able to read the profiling information from
the kernel it must first be compiled with profiling enabled.</FONT>
<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
readprofile | sort -nr | head -20</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="415" >
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>CLK_TCK</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>Function</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%"><FONT FACE="Courier"><FONT SIZE=+1>Normalised
load</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>67649</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>total</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0.0858</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>7796</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>d_lookup</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>54.1389</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>5425</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>ext2_readdir</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>3.5319</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>5034</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>scrup</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>7.8168</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>4573</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>filldir</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>14.8474</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>4481</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>find_inode</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>86.1731</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>2849</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>ext2_check_dir_entry</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>15.8278</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>2581</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>getname</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>7.9660</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1885</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>getblk</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>2.2440</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1665</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>sys_newlstat</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>6.8238</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1546</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>lookup_dentry</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>5.1533</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1542</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>do_con_write</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0.3119</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1425</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>get_hash_table</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>9.6284</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1422</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>cp_new_stat</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>4.5577</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1323</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>__namei</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>10.3359</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1270</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>system_call</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>19.8438</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1231</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>ext2_getblk</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>2.2140</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1084</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>raw_scan_sector</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>1.8951</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1077</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>sys_getdents</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>3.0597</FONT></FONT></DIV>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>973</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>schedule</FONT></FONT></TD>
<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>1.2102</FONT></FONT></DIV>
</TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>The Linux 'ps' command takes its information from the
/proc virtual-file system (VFS) which is a disk image of the process structures
as controlled by the kernel. Note that the VFS is a direct mirror of the
kernel data structures and does not actually reside on disk, although it
appears to do so when acessed with normal Linux commands.</FONT>
<P><FONT SIZE=+1>Looking directly at the httpd process in the /proc file
system, all of the information given by the administrative tools can be
obtained, though often in a less user friendly format. The following is
a direct dump of the httpd <FONT FACE="Courier">status</FONT> table, with
comments added for explanation :</FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1><FONT COLOR="#0000FF">orion-1:#</FONT>
cat /proc/90/status</FONT></FONT>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>Name: httpd</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>State: S (sleeping)</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>Pid: 90 # Process ID</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>PPid: 1 # Parent Process (init)</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>Uid: 0 0 0 0 # User ID (root)</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>Gid: 65535 65535 65535 65535 # Group
ID</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmSize: 1012 kB # Total virtual memory</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmLck: 0 kB # Total locked</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmRSS: 512 kB # Text Resident Set
Size</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmData: 276 kB # Virtual Memory Data
size</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmStk: 20 kB # Stack size</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmExe: 108 kB # Executable</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>VmLib: 576 kB # Library</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>SigPnd: 00000000 # Signals pending</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>SigBlk: 00000000 # Signals blocked</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>SigIgn: 80000000 # Signals ignored</FONT></FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1>SigCgt: 00006441 # Signals caught</FONT></FONT></DIR>
</DIR>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>The following are all the signals recognised by the Linux
operating system, they are enumerated starting at zero (i.e. SIGHUP is
0, SIGKILL is 9, etc) :</FONT>
<P><FONT FACE="Courier"><FONT SIZE=+1><FONT COLOR="#0000FF">orion-1:#</FONT>
fuser -l</FONT></FONT>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>HUP INT QUIT ILL TRAP ABRT IOT
BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN
TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR UNUSED</FONT></FONT><FONT FACE="Courier"><FONT SIZE=+1></FONT></FONT>
<DIV ALIGN=right><A HREF="./flower/ipc.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/books.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
<FONT FACE="Courier"><FONT SIZE=+1></FONT></FONT>&nbsp;
<BR><FONT FACE="Courier"><FONT SIZE=+1></FONT></FONT>&nbsp;</DIR>
</DIR>
<FONT COLOR="#3366FF"><FONT SIZE=+3>Multiprocessing</FONT></FONT>
<P><FONT SIZE=+1>So far we have considered machines which have only a single
processor (known as the Central Processor Unit). Becoming more common these
days are multi-processor machines which may have a number of processors
(for example four or thirty two) which may provide true concurrency to
multiple tasks running on the machine. On these machines the <A
HREF="./flower/schedule.html">scheduler</A>
will arrange for the execution of processes to occur in a manner selected
to take maximum advantage of the available processing capacity. Asymmetric
multiprocessing (ASMP) operating systems typically select one processor
to run operating system code, with the other processors running user jobs.
Problems with such systems include a lack of portability of the operating
system to other platforms. Symmetric multiprocessing systems (SMPs), which
include Linux, Sun's Solaris and Windows NT each allow the operating system
to run on any or all of the available processors, sharing memory between
them. The central unit for execution on such machines is the thread, with
multiple threads of a single process having the possibility to be spread
across multiple processors. The scheduling task on an SMP computer can
become extremely complex.</FONT>
<DIV ALIGN=right><A HREF="./flower/multitask.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/context.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Multitasking</B></FONT></FONT>
<P><FONT SIZE=+1>It would be extremely inefficient for a single process
to have complete use of the processor from the time of its start-up to
the completion of its operations. One reason for this is that most processes
must pause very often to wait for input such as data from I/O devices,
keyboard input or disk accesses. In the simplest case therefore a large
amount of useable CPU time would be wasted due to this blocking. This would
result in a large overall time to carry out a number of independent tasks.
The processor must also handle asynchronous software or hardware interrupts
which may require high priority service for a short period, requiring the
currently active process to be displaced from the processor while the interrupt
is handled before normal processing can be resumed. Such interrupts may
be caused by events such as an input buffer becoming full which, if not
serviced in a timely manner could result in an unrecoverable loss of data.</FONT>
<P><FONT SIZE=+1>To increase throughput efficiency most modern operating
systems implement a method to allow many processes to be available for
running at any one time. Their access to the processor is interleaved and,
as the speed of modern processors is high compared to slower I/O devices,
it is possible to provide a pseudo real-time response to an active user
of the system for any particular process when in reality many processes
are being run. The total time to complete a number of tasks will also be
less due to less time being wasted waiting for external inputs. Interrupt
handling is facilitated as well as this round robin scheduling of normal
processes.</FONT>
<P><FONT SIZE=+1>This procedure is known as Multitasking (or Multiprogramming)
and its sequencing is controlled by an operating system service called
the scheduler. Some operating systems (e.g. Windows 3.1) just rely on the
process itself giving up the processor at regular intervals or when waiting
on I/O. This approach is known as co-operative multitasking and it can
have many problems as, if the process does not give up the CPU at the expected
time failure can occur. In this case all other processes will be blocked
and there will be no way for the operating system to gain control of the
processor, most likely resulting in a system lockup or crash.</FONT>
<P><FONT SIZE=+1>A better approach, and that used in most operating systems
designed for efficient multitasking is that of <I>pre-emptive multitasking
. </I>In this case it is the operating system that decides which process
gets access to the CPU. It can allocate CPU time to a process or remove
the process from the CPU as required. Each candidate process gets access
to the CPU for a short time (known as a quantum) based on their allocated
priority, their process class and also their voluntary release of the processor
as they wait for external input.</FONT>
<DIV ALIGN=right>&nbsp;</DIV>
<DIV ALIGN=right></DIV>
<DIV ALIGN=right><A HREF="./flower/groups.html"><IMG SRC="./gx/flower/cyan_lef.gif"
BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG
SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A
HREF="./flower/multiproc.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<P>&nbsp;
<BR>&nbsp;
<P>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<CENTER>&nbsp;</CENTER>
<B><FONT COLOR="#3366FF"><FONT SIZE=+3>Mutual Exclusion and Synchronisation</FONT></FONT></B>
<P><FONT SIZE=+1>&nbsp;Allowing multiple processes access to the same resources
in a time sliced manner or potentially consecutively in the case of <A HREF="./flower/multiproc.html">multiprocessor</A>
systems can cause many problems. This is due to the need to maintain data
consistency, maintain true temporal dependencies and to ensure that each
thread will properly release the resource as required when it has completed
its action.</FONT>
<P><FONT SIZE=+1>&nbsp;Concurrent processes in <A HREF="./flower/multitask.html">multitasking</A>
and / or multiprocessing operating systems must deal with a number of potential
problems</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<CENTER><TABLE BORDER CELLPADDING=7 WIDTH="482" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="25%"><FONT SIZE=+1>Process starvation or indefinite
postponement</FONT></TD>
<TD VALIGN=TOP WIDTH="75%"><FONT SIZE=+1>A low priority process never gets
access to the processor due to the higher effective processor access of
other processes. Solution is to cause processes to 'age' or decline in
priority as they use up CPU quanta.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="25%"><FONT SIZE=+1>Process deadlock</FONT></TD>
<TD VALIGN=TOP WIDTH="75%"><FONT SIZE=+1>Two or more processes are competing
for resources, each blocking the other.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="25%"><FONT SIZE=+1>Race Conditions</FONT></TD>
<TD VALIGN=TOP WIDTH="75%"><FONT SIZE=+1>The processing result depends
on when and how fast two or more processes complete their tasks.</FONT></TD>
</TR>
</TABLE></CENTER>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>The data consistency and race condition problems may be
addressed by the implementation of Mutual Exclusion and Synchronisation
rules between processes whereas starvation is a function of the scheduler.</FONT><FONT SIZE=+1></FONT>
<P><FONT SIZE=+1>There are a number of synchronisation primitives :</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<CENTER><TABLE BORDER CELLPADDING=7 WIDTH="472" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Events</FONT></TD>
<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>A thread may wait for events such
as the setting of a flag, integer, signal or presence of an object. Until
that event occurs the thread will be blocked and will be removed from the
run queue.&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Critical Sections</FONT></TD>
<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>These are areas of code which
can only be accessed by a single thread at any one time.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Mutual Exclusions</FONT></TD>
<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>mutexes are objects that ensure
that only a single thread has access to a protected variable or code at
any one time.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Semaphores</FONT></TD>
<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>These are similar to mutual exclusions
but may include counters allowing only a specified number of threads access
to a protected variable or code at any one time.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Atomic operations</FONT></TD>
<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>This mechanism ensures that an
non decomposable transaction is completed by a thread before access to
the same atomic operation is granted to another thread. The thread may
have non-interruptable access to the CPU until the operation is completed.</FONT></TD>
</TR>
</TABLE></CENTER>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>Deadlock is a <I>permanent</I> blocking of a set of processes
that either compute for system resources or communicate with each other
[MAEK87]. Deadlock may be addressed by mutual exclusion or by deadlock
avoidance. Mutual exclusion prevents two threads accessing the same resource
simultaneously. Deadlock avoidance can include initiation denial or allocation
denial, both of which serve to eliminate the state required for deadlock
before it arises.</FONT>
<P><FONT SIZE=+1>&nbsp;Both Linux and Windows NT solve these problems in
different ways. Windows NT has functions which equate to all of the above
instances. Both implement multiprocessor mutual exclusion mechanisms called
<I>spin locks </I>which effectively stall the processor until a lock is
achieved for a critical section.</FONT>
<DIV ALIGN=right>&nbsp;<A HREF="./flower/schedule.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/timers.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Process Image</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>
<P><FONT SIZE=+1>&nbsp;Executable files are stored in a defined format
on the disk, different operating systems may have different definitions
for the actual format but there are generally common elements in the way
they are stored. A format commonly used on Unix systems such as Linux is
called Extensible Linked Format (ELF). An ELF programme consists of an
ELF header, a program header table, a number of sections and an optional
section header table. The header contains all the information the kernel
needs to create a process image (i.e. load the programme into memory and
allocate resources to prepare it for execution).</FONT>
<P><FONT SIZE=+1>Programme code on a multitasking operating system must
be re-entrant. This means it can be shared by multiple processes. To be
re-entrant the code must not modify itself at any time and the data must
be stored separately from the instruction text (such that each independent
process can maintain its own data space).</FONT>
<P><FONT SIZE=+1>&nbsp;When a programme is loaded as a process it is allocated
a section of virtual memory which forms its useable address space. Within
this process image there are typically at least four elements :</FONT>
<BR>&nbsp;
<CENTER><TABLE BORDER CELLPADDING=7 WIDTH="453" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Program code (or text)</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>The program instructions to be
executed. Note that it is not necessary for the processor to read the totality
of a process into physical memory when a program is run, instead by a procedure
known as ?dynamic paging? the next block of instructions is loaded as required
and may be shared between processes.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Program data</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>May be distinguished as initialised
variables including external global and static variables, uninitialised
variables (known as a bss area on Unix derivative systems). Data blocks
are not shared between processes by default.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Stack</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>A process will commonly have at
least two last-in, first-out (LIFO) stacks, including a user stack for
user mode and a kernel stack for kernel mode<FONT FACE="Courier New">.</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Process Control Block</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Information needed by the operating
system to control the process.</FONT></TD>
</TR>
</TABLE></CENTER>
&nbsp;
<DIV ALIGN=right>&nbsp;<A HREF="./flower/vmem.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/groups.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
&nbsp;<FONT COLOR="#3366FF"><FONT SIZE=+3>Scheduling</FONT></FONT>
<P><FONT SIZE=+1>A scheduler is responsible for the coordination of the
running of processes to manage their access to the system resources such
that each candidate process gets a fair share of the available process
time, with the utilisation of the CPU being maximised. The scheduler (dispatcher)
must ensure that processes gain access to the CPU for a time relative to
its designated priority and process class and that no process is starved
of access to the CPU, no matter if it is the lowest priority task available.</FONT>
<P><FONT SIZE=+1>&nbsp;A process may choose to voluntarily give up it's
use of the microprocessor when it must wait, usually for some system resource
or for synchronisation with another process. Alternatively the scheduler
may pre-emptively remove the thread or process from the CPU at the expiry
of it's allocated time quantum. The scheduler chooses which is the most
appropriate process to run next.</FONT>
<P><FONT SIZE=+1>&nbsp;Scheduling is an operation of the kernel, which
defines the following process states :</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows
NT</FONT></FONT></B></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Running
:</FONT> The process is the current system process and is on the CPU carrying
out it's execution.&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Running
: </FONT>The process (thread) is the currently active process on the CPU.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Running
: </FONT><FONT COLOR="#009900">Ready to Run :</FONT> The process is in
a run queue ready to use the CPU when available.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Standby
: </FONT>The thread has been selected to run next by the processor, only
one thread can be in this state.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Waiting
: </FONT><FONT COLOR="#008080">interruptable</FONT><FONT COLOR="#FFFF00">
:</FONT><FONT COLOR="#00FF00"> </FONT>The process is waiting for a resource
or event but signals are not blocked and it may be interrupted.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Ready :
</FONT>The thread is simply waiting to execute and is a candidate for selection
by the scheduler for entering standby at the next scheduling cycle<FONT COLOR="#00FF00">.</FONT></FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Waiting
: </FONT><FONT COLOR="#008080">uninterruptable</FONT><FONT COLOR="#FFFF00">
:</FONT> The process is waiting for a resource or event but has disable
signals such that it cannot be interrupted.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Waiting
:</FONT> The thread is waiting for synchronisation events, it has been
directed to suspend by the environment subsystem or is waiting on I/O.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Stopped
:</FONT> The process has been stopped, usually by a SIGSTOP signal such
as when performing debugging.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Transition
:</FONT> The thread is ready to execute but the resources it needs are
not available. (e.g. the thread's kernel stack is paged out of memory).</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Zombie :</FONT>
The process has completed and is ready to die, the scheduler has not yet
detected this so it?s task_struct structure is still present.</FONT></TD>
<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Terminated
:</FONT> The thread has finished executing and the object manager decides
whether the thread is deleted. If the executive has a pointer to the thread
it may be reinitialised and reused.&nbsp;</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>
<P><FONT SIZE=+1>The scheduling of tasks on the different operating systems
is similar, but each OS solves the problem in it's own way :</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="490" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Tasks have a priority which ranges from a setting of
-20 to +20. The default priority of a task is 0 with -20 being the highest.
Only the administrator can reset a process's priority to be less than 0,
but normal users can adjust priorities in the positive range. This is done
using the 'renice' command, though internally Linux uses a time quantum
counter (in 'jiffies') to record this in the task_struct.</FONT>&nbsp;
<P><FONT SIZE=+1>New processes inherit the priority of their parent.</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Threads have a priority which ranges from 1 to 31 with
8 being the user default and 31 being the highest. Priority 0 is reserved
for system use. Only the administrator can set a processes priority to
be above 15, normal users can set a process's priority in the 1 to 15 range
in a two step process by first setting the process class and then setting
the relative priority within the class. This is done using the Task Manager.</FONT>&nbsp;
<P><FONT SIZE=+1>New processes inherit the priority of their creating process.</FONT></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>&nbsp;Real time processes are supported. Any real time
process will have higher priority than all non real-time processes.&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Processes having priorities between 16 and 31 are real-time
processes which are members of the realtime class.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;<I>time-critical</I> and <I>idle</I> modifiers may
move a dynamic thread's priority to the top or bottom of it's dynamic range
respectively.</FONT></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Threads that have already received some CPU time will
have lower priority than other of the same priority which have not.</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Non real-time threads may be boosted in priority should
(e.g.) a blocked thread receive an event if was waiting for. This boost
decays over time as the thread receives CPU time.</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<UL><FONT SIZE=+1>&nbsp;The following diagram shows the state machine used
for the Windows NT scheduler. From the above tables it can be seen that
although the corresponding state for machine for Linux will be different
it will be similar. Linux also has kernel mechanisms called <I>bottom half
handlers</I> which are not covered here.</FONT></UL>
<FONT SIZE=+1>&nbsp;</FONT>
<DIR>
<DIR><IMG SRC="./gx/flower/schedule.gif" HEIGHT=350 WIDTH=400>
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<DIV ALIGN=right><A HREF="./flower/threads.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/mutex.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;</DIR>
</DIR>
<CENTER>&nbsp;</CENTER>
&nbsp;<FONT COLOR="#3366FF"><FONT SIZE=+3>Threads</FONT></FONT>
<P><FONT SIZE=+1>&nbsp;The majority of processes seen on operating systems
today are single threaded, meaning there is a single path of execution
within the process. Should a process have to perform many sub tasks during
it's operation then a single threaded process would sequence these tasks
in a serial manner, with each sub task being required to wait for the completion
of the previous sub task before commencement. Such an arrangement can lead
to great inefficiency in the use of the processor and in the apparent responsiveness
of the computer.</FONT>
<P><FONT SIZE=+1>An example can illustrate the advantages of having multiple
threads of execution as shown in the figure. Suppose a user wants to print
a document, a user process can be initiated to accept input from the operator
to select the print action and start the printing action. Should the user
process be required to check for further user commands subsequent to initiating
the print there are two options :</FONT>
<P><FONT SIZE=+1>(i) the process can stop the printing periodically, poll
for user input, then continue printing, or</FONT>
<P><FONT SIZE=+1>(ii) wait until printing has completed before accepting
user input.</FONT>
<P><FONT SIZE=+1>Either of these alternatives slow down printing and/or
decrease responsiveness. By contrast a <I>multi-threaded </I>process can
have many paths of execution. A multi-threaded application can delegate
the print operation to a different thread of execution. The input thread
and print thread then run in parallel until printing is completed.</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<DIR>
<DIR><IMG SRC="./gx/flower/threads.gif" HEIGHT=300 WIDTH=400></DIR>
</DIR>
<FONT SIZE=+1>&nbsp;Each thread has access to the allocated resources within
the process and can access global variables available to all threads. In
a multi-threaded process each thread 'believes' it has independent access
to its own 'virtual machine' with the <A HREF="./flower/schedule.html">scheduler</A>
being responsible for allocation of CPU quanta to threads to optimise throughput
efficiency.</FONT>
<P><FONT SIZE=+1>&nbsp;Threads within the same task share resources such
as file pointers and code segments. Swapping between threads within a process
presents a much smaller overhead to the scheduler than swapping between
processes. This is because less context related data must be saved to enable
successful restoration of that context later. For this reason threads are
often known as 'light weight processes' (LWPs) with normal processes being
correspondingly known as heavyweight processes.<FONT FACE="Courier New">
</FONT>Typically, when a thread context switch is performed, only the program
counter and register set need to be saved in the PCB. Heavy-weight processes
typically don?t share such resources so when heavy-weight processes context
switch, all this additional info must be saved.</FONT>
<P><FONT SIZE=+1>&nbsp;Although threads have many advantages as described
above, they also have disadvantages, one of these being that any single
'rogue' thread within the process can cause the whole process to fail.
Programming threads is also more complex than for simple processes as kernel
code and libraries must have 100% re-entrant code. Special care must be
taken to ensure that pre-emption cannot occur within critical sections
of code within which inconsistencies could occur should another thread
gain access at the wrong time. Other such problem is "what happens if a
thread forks another process ?", it must be defined how threads within
a process are affected in this case.</FONT>
<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>There are two types of threads: user-space and kernel-space.</FONT>&nbsp;
<P><FONT SIZE=+1>User space threads consist of internal cooperative multitasking
switches between sub tasks defined with a process.&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>A thread may send a signal, perform it?s own switch or
be invoked by a timer to give up the thread of execution. The user stack
is then manipulated to save the thread context Switching is typically faster
for user threads than kernel threads.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>User threads have disadvantages in that starvation can
occur if one thread does not give up the CPU. Also should a thread become
blocked waiting on a resource, all other threads will be blocked as well.
User threads cannot take advantage of SMP systems should such a multi processor
environment be available.</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP ROWSPAN="2" WIDTH="48%">
<UL><FONT SIZE=+1>Similarly to its implementation of processes, Windows
NT threads are implemented as Objects.&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>Certain attributes of a thread may restrict or qualify
the attributes applicable to the overall process.</FONT>&nbsp;
<P><FONT SIZE=+1>The thread has a context attribute which allows the operating
system to correctly perform context switching as required.</FONT>&nbsp;
<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>The Windows NT Posix subsystem does not support multi-threading,
though the OS/2 and Win 32 subsystems do.</FONT>&nbsp;
<P><FONT SIZE=+1>All threads are subject to manipulation by the kernel,
which will schedule their priority for access to the CPU. The kernel is
concerned with its own view of a thread called a <I>kernel thread object</I>.
The kernel does not use thread handles but instead accesses threads directly
from it's kernel process object.</FONT>&nbsp;
<P><FONT SIZE=+1>Windows NT threads support SMP, with individual threads
(and processes for that matter) having a defined <I>processor affinity
</I>which can define on which of a selection of available processors the
thread may be run.</FONT></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Kernel-space threads may be implemented in the kernel
by allocation of a thread table to a process. The kernel schedules threads
within the time quantum allocated to the process.&nbsp;</FONT>&nbsp;
<P><FONT SIZE=+1>This method requires slightly more overhead for context
switching but advantages include true pre-emption of tasks, thus overcoming
the starvation problem. I/O blocking is also no longer a problem. Threads
can automatically take advantage of SMPs with run time efficiency improving
linearly as CPUs are added.</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<UL>
<DIV ALIGN=right>&nbsp;<A HREF="./flower/context.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/schedule.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
<P>&nbsp;
<BR>&nbsp;
<BR>&nbsp;</UL>
<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Timers</B></FONT></FONT>
<BR><FONT COLOR="#3366FF"><FONT SIZE=+3>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>The kernel records a process's creation time and the
CPU time it has consumed including the time spent in user mode and time
spent in system mode.</FONT>&nbsp;
<P><FONT SIZE=+1>Processes may also have their own interval timers, which
may be single shot or periodic. These can use signals to notify the process
when timers expire.</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Timer objects exist as an Executive support service which
will record the passage of time. After a set time or on expiry of a time
interval the object becomes 'signalled' which will release all waiting
threads.</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;
<DIV ALIGN=right>&nbsp;<A HREF="./flower/mutex.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/ipc.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Virtual Memory</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>
<P><FONT SIZE=+1>&nbsp;Virtual memory provides a way of running more processes
than can physically fit within a computer's physical address space.</FONT>
<P><FONT SIZE=+1>&nbsp;Each process that is a candidate for running on
a processor is allocated it's own virtual memory area which defines the
logical set of addresses that a process can access to carry out it's required
task. As this total virtual memory area&nbsp; is very large (typically
constrained by the number of address bits the processor has and the maximum
number of processes it supports), each process can be allocated a large
logical address space (typically 3Gb) in which to operate.</FONT>
<P><FONT SIZE=+1>&nbsp;It is the job of a virtual memory manager to ensure
that active processes and the areas they wish to access are remapped to
physical memory as required. This is achieved by a method of swapping or
paging the required sections (pages) into and out of physical memory as
required.&nbsp;&nbsp; Swapping involves replacing a complete process with
another in memory whereas paging involves removal of a 'page' (typically
2-4kbytes) of the process's mapped memory and replacing it with a page
from another process.&nbsp; As this may be a computer intensive and time
consuming task, care is taken to minimise the overhead that it has. This
is done by usage of a number of algorithms designed to take advantage of
the common locality of related sections of code and also&nbsp; only carrying
out some operations such as memory duplication or reading when absolutely
required ( techniques known as <I>copy on write, lazy paging</I> and <I>demand
paging</I>).</FONT>
<P><FONT SIZE=+1>The virtual memory owned by a process may contain code
and data from many sources. Executable code may be shared between processes
in the form of shared libraries, as these areas are read-only there is
little chance of them becoming corrupted. Processes can allocate and link
virtual memory to use during their processing,</FONT>
<P><FONT SIZE=+1>&nbsp;Some of the memory management techniques used by
many operating systems, including Linux and Windows NT include :</FONT>
<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="453" >
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Page based protection mechanism</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Each virtual page has a set of
flags which determine the types of access allowed in user mode or kernel
mode.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Demand paging / lazy reading</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>the virtual memory of a process
is brought into physical memory only when a process attempts to use it.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Kernel and User modes of operation</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Unrestricted access to process's
memory in kernel mode but access only to it's own memory for a process
in user mode.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Mapped files</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Memory is extended by allowing
disk files to be used as a staging area for pages swapped out of physical
memory.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Copy on write memory</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>When two processes require access
to a common area of code the virtual memory manager does not copy the section
immediately as if only read access is required the section may be used
safely by both processes. Only when a write is requested does the copy
take place.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Shared memory</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>An area of memory may be mapped
into the address space of more than one process by the calling of privileged
operations.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Memory Locking</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>To ensure a critical page can
never be swapped out of memory it may be locked in, the vritual memory
manager will not then remove it.</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>For Windows NT : Object based
Memory Protection</FONT></TD>
<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>The NT security reference checks
access permissions for any process attempting to open a handle to that
memory section or map a view of it.</FONT>&nbsp;
<BR>&nbsp;</TD>
</TR>
</TABLE></CENTER>
&nbsp;
<CENTER></CENTER>
<CENTER>&nbsp;</CENTER>
<DIV ALIGN=right><FONT SIZE=+1>&nbsp;</FONT><A HREF="./flower/intro.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/psimage.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>Build your own DBMS!!</H2>
<H4>By Idan Shoham, <a href="mailto:idan@m-tech.ab.ca">idan@m-tech.ab.ca</a></H4>
</center>
<P> <HR> <P>
<A NAME="tex2html18" HREF="./shoham/node1.html"><IMG WIDTH=37 HEIGHT=24
ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"> <IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"> <BR>
<B> Next:</B> <A NAME="tex2html19" HREF="./shoham/node1.html">Introduction</A>
<BR> <P>
<B>Roll your own DBMS?!?</B>
<P>
Author: Idan Shoham
<P>
Document release date: May 28, 1997
<P>
<BR> <HR>
<UL><A NAME="CHILD_LINKS">&#160;</A>
<LI> <A NAME="tex2html20" HREF="./shoham/node1.html#SECTION00010000000000000000">Introduction</A>
<LI> <A NAME="tex2html21" HREF="./shoham/node2.html#SECTION00020000000000000000">A little history</A>
<LI> <A NAME="tex2html22" HREF="./shoham/node3.html#SECTION00030000000000000000">Problems with off-the-shelf technology</A>
<LI> <A NAME="tex2html23" HREF="./shoham/node4.html#SECTION00040000000000000000">Summary of design requirements</A>
<LI> <A NAME="tex2html24" HREF="./shoham/node5.html#SECTION00050000000000000000">Architectural answers to design questions</A>
<LI> <A NAME="tex2html25" HREF="./shoham/node6.html#SECTION00060000000000000000">The components</A>
<UL>
<LI> <A NAME="tex2html26" HREF="./shoham/node7.html#SECTION00061000000000000000">Client software</A>
<LI> <A NAME="tex2html27" HREF="./shoham/node8.html#SECTION00062000000000000000">Database and network protocols</A>
<LI> <A NAME="tex2html28" HREF="./shoham/node9.html#SECTION00063000000000000000">Server software</A>
</UL>
<LI> <A NAME="tex2html29" HREF="./shoham/node10.html#SECTION00070000000000000000">Bonus features</A>
<LI> <A NAME="tex2html30" HREF="./shoham/node11.html#SECTION00080000000000000000">A working system!</A>
<LI> <A NAME="tex2html31" HREF="./shoham/node12.html#SECTION00090000000000000000">A solution looking for new problems</A>
<LI> <A NAME="tex2html32" HREF="./shoham/node13.html#SECTION000100000000000000000">References</A>
<LI> <A NAME="tex2html33" HREF="./shoham/node14.html#SECTION000110000000000000000"> About this document ... </A>
</UL>
<HR><A NAME="tex2html18" HREF="./shoham/node1.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"> <IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"> <BR>
<B> Next:</B> <A NAME="tex2html19" HREF="./shoham/node1.html">Introduction</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Idan Shoham <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./flower/page1.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./successtory.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<A NAME="tex2html42" HREF="./shoham/node2.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html40" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html34" HREF="./shoham/drafth.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html43" HREF="./shoham/node2.html">A little history</A>
<B>Up:</B> <A NAME="tex2html41" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html35" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<BR> <P>
<H1><A NAME="SECTION00010000000000000000">Introduction</A></H1>
<P>
This article describes a project, recently completed at M-Tech,
for which we constructed a client/server database management system (DBMS),
from the ground up. This DBMS was built using off-the-shelf components,
some tools recycled from previous projects and a modest amount of new code.
<P>
You might ask why we developed a new DBMS, considering the diversity
and quality of commercial DBMS-s already on the market. The answer
lies in the stringent demands of a project we had contracted for.
This project required an inexpensive, fast, reliable DBMS that
could support <EM>highly secure</EM> transactions over a slow public
network. There are commercial DBMS products that are inexpensive, fast,
or secure, but we are not aware of any that combine all of these
merits, as well as responsive performance over something as slow
as a modem.
<P>
This article is of particular interest because the technology we
developed for this project can be utilized to construct systems that carry
<EM>any</EM> of the stringent demands of our original project, such as:
<P>
<UL>
<LI> Responsive DBMS performance over a slow TCP/IP network.
<LI> Strong security, based on public-key cryptographic technology.
<LI> Inexpensive system implementation, component licensing and
ongoing maintenance.
</UL><HR><A NAME="tex2html42" HREF="./shoham/node2.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html40" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html34" HREF="./shoham/drafth.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html43" HREF="./shoham/node2.html">A little history</A>
<B>Up:</B> <A NAME="tex2html41" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html35" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html133" HREF="./shoham/node11.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html131" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html125" HREF="./shoham/node9.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html134" HREF="./shoham/node11.html">A working system!</A>
<B>Up:</B> <A NAME="tex2html132" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html126" HREF="./shoham/node9.html">Server software</A>
<BR> <P>
<H1><A NAME="SECTION00070000000000000000">Bonus features</A></H1>
<P>
Over the course of about six months, we implemented the entire
client/server architecture. With all the building blocks in place,
we could implement some extra features with relative ease:
<P>
<UL>
<LI> We needed a report writer; preferably one that could run on the server.
By creating reports on the server, the client PCs would require
minimal software and infrequent upgrades. Furthermore, reports could
be produced very quickly, since no data would travel across any
network, no matter how fast.
<P>
We already had a system (from a previous project) that could convert
a high-level description of a report into C source code, to be linked
against <A NAME="tex2html13" HREF="http://www.sequiter.com">CodeBase</A>. We integrated stand-alone executable reports
written using this tool into the server, so that a client could request
a report and the server would deliver only the output.
<LI> Every Unix system is configured with a mailer. In our case, the mailer
was just <TT>sendmail</TT>. We wanted to give the end-users access to e-mail,
but over the encrypted SSL connection rather than directly. To do this,
we added a rudimentary e-mail user interface to the client and a thin
server, that just talks to <TT>sendmail</TT> over a local SMTP socket.
<LI> The client/server database, along with the server's ability to
regularly execute tasks, allowed us to implement a simple bulletin
system, where any user could post announcements and the server would
automatically delete them after a period of time. The bulletins are
stored using a regular table in the database, so access to them
is controlled by the same mechanism that controls access to data
elsewhere in the system.
</UL><HR><A NAME="tex2html133" HREF="./shoham/node11.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html131" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html125" HREF="./shoham/node9.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html134" HREF="./shoham/node11.html">A working system!</A>
<B>Up:</B> <A NAME="tex2html132" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html126" HREF="./shoham/node9.html">Server software</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html143" HREF="./shoham/node12.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html141" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html135" HREF="./shoham/node10.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html144" HREF="./shoham/node12.html">A solution looking for </A>
<B>Up:</B> <A NAME="tex2html142" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html136" HREF="./shoham/node10.html">Bonus features</A>
<BR> <P>
<H1><A NAME="SECTION00080000000000000000">A working system!</A></H1>
<P>
We built the infrastructure and used it to build a mental health
clinical information database - which is now used by qualified,
authorized clinicians throughout Calgary to share clinical data
about patients. The system is ``live,'' the feedback from users
has been positive and there are already hundreds of trained,
active users.
<P>
The MHCID system as currently implemented allows
users to enter data about new patients, find clinical records about
existing patients, send each other e-mail as well as read and post bulletins.
There is a friendly interface by which an authorized user can add and
delete users, update lookup tables and change the access control
model.
<P>
<HR><A NAME="tex2html143" HREF="./shoham/node12.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html141" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html135" HREF="./shoham/node10.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html144" HREF="./shoham/node12.html">A solution looking for </A>
<B>Up:</B> <A NAME="tex2html142" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html136" HREF="./shoham/node10.html">Bonus features</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html153" HREF="./shoham/node13.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html151" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html145" HREF="./shoham/node11.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html154" HREF="./shoham/node13.html">References</A>
<B>Up:</B> <A NAME="tex2html152" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html146" HREF="./shoham/node11.html">A working system!</A>
<BR> <P>
<H1><A NAME="SECTION00090000000000000000">A solution looking for new problems</A></H1>
<P>
All these tools .. all this infrastructure .. just one application?
We are already using the same infrastructure to develop two additional
applications - one in a mental health outcomes measurement study,
and another for a palliative care system.
<P>
There is nothing specific to health applications about the technology,
though! Any system that requires one or more of the key features
of the technology: fast response over a low-bandwidth, high-latency network;
strong security; low licensing cost; low administration / support
costs can benefit from this architecture.
<P>
<HR><A NAME="tex2html153" HREF="./shoham/node13.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html151" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html145" HREF="./shoham/node11.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html154" HREF="./shoham/node13.html">References</A>
<B>Up:</B> <A NAME="tex2html152" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html146" HREF="./shoham/node11.html">A working system!</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html163" HREF="./shoham/node14.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html161" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html155" HREF="./shoham/node12.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html164" HREF="./shoham/node14.html"> About this document </A>
<B>Up:</B> <A NAME="tex2html162" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html156" HREF="./shoham/node12.html">A solution looking for </A>
<BR> <P>
<H1><A NAME="SECTION000100000000000000000">References</A></H1>
<P>
<UL>
<LI> To find out more about SSLeay: <A NAME="tex2html14"
HREF="ftp://psych.psy.uq.oz.au/pub/Crypto/SSL">SSLeay</A>
<P>
<LI> To find out more about Zinc: <A NAME="tex2html15"
HREF="http://www.zinc.com">Zinc</A>
<P>
<LI> To find out more about CodeBase: <A NAME="tex2html16"
HREF="http://www.sequiter.com">CodeBase</A>
<P>
<LI> To find out more about M-Tech: <A NAME="tex2html17"
HREF="http://www.m-tech.ab.ca">M-Tech</A>
<P>
</UL><HR><A NAME="tex2html163" HREF="./shoham/node14.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html161" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html155" HREF="./shoham/node12.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html164" HREF="./shoham/node14.html"> About this document </A>
<B>Up:</B> <A NAME="tex2html162" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html156" HREF="./shoham/node12.html">A solution looking for </A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"> <A NAME="tex2html169" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html165" HREF="./shoham/node13.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B>Up:</B> <A NAME="tex2html170" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html166" HREF="./shoham/node13.html">References</A>
<BR> <P>
<H1><A NAME="SECTION000110000000000000000"> About this document ... </A></H1>
<P>
(c) 1996,7 M-Tech Mercury Information Technology, Inc.<HR><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"> <A NAME="tex2html169" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html165" HREF="./shoham/node13.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B>Up:</B> <A NAME="tex2html170" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html166" HREF="./shoham/node13.html">References</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html52" HREF="./shoham/node3.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html50" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html44" HREF="./shoham/node1.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html53" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<B>Up:</B> <A NAME="tex2html51" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html45" HREF="./shoham/node1.html">Introduction</A>
<BR> <P>
<H1><A NAME="SECTION00020000000000000000">A little history</A></H1>
<P>
As mentioned earlier, the DBMS architecture described in this
article grew out of the demanding requirements for a system we
were contracted to develop. That system is now the Mental Health
Clinical Integrated Database (MHCID). It allows clinicians
in the mental health sector in Calgary to share clinical data
about patients throughout all CRHA-sanctioned mental health clinics
and hospitals in the city.
<P>
The MHCID system presented us with these difficult requirements:
<UL>
<LI> Communication between the sites must be supported using modems, so
bandwidth was low (less than 30kb/s) and packet latency was high.
<LI> Patient clinical data is very confidential, so must be encrypted
when transmitted across the telephone system.
<LI> User access to data must be strictly controlled, to support
ethical and organizational requirements.
<LI> The system must log all access to patient data.
<LI> There are hundreds of users - up to 15 simultaneously connected to the server.
<LI> Client workstations were already deployed before we started development
(from a previous pilot project). There was only a minimal
budget for hardware upgrades.
<LI> The combined budget for software licenses, server equipment and
development was relatively small.
</UL><HR><A NAME="tex2html52" HREF="./shoham/node3.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html50" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html44" HREF="./shoham/node1.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html53" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<B>Up:</B> <A NAME="tex2html51" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html45" HREF="./shoham/node1.html">Introduction</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html62" HREF="./shoham/node4.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html60" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html54" HREF="./shoham/node2.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html63" HREF="./shoham/node4.html">Summary of design requirements</A>
<B>Up:</B> <A NAME="tex2html61" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html55" HREF="./shoham/node2.html">A little history</A>
<BR> <P>
<H1><A NAME="SECTION00030000000000000000">Problems with off-the-shelf technology</A></H1>
<P>
In order to minimize the development and debugging efforts, a project
like this would ideally use as much ``off-the-shelf'' technology as
possible.
<P>
We first considered using a commercial DBMS, due to the many available options:
file/server systems such as FoxPro or MS-Access and client/server
systems such as Oracle, Sybase or SQL-Server. However, it soon became apparent
that a file-server solution would not perform adequately in a modem-based
network. Also, of the client/server technologies, only Oracle offered
a cryptographically secured solution (Secure Oracle). While this
appeared to be a sound technology, the licensing costs alone would have
exceeded the total project budget.
<P>
Not only was price a significant problem, but we were also unsure of the
performance implications of running Oracle's SQL*Net protocol over
a 30kbps link. SQL*Net is designed for a LAN environment, where
1Mbps can usually be sustained for the life of a transaction.
<P>
There had to be a better way!
<P>
<HR><A NAME="tex2html62" HREF="./shoham/node4.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html60" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html54" HREF="./shoham/node2.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html63" HREF="./shoham/node4.html">Summary of design requirements</A>
<B>Up:</B> <A NAME="tex2html61" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html55" HREF="./shoham/node2.html">A little history</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html72" HREF="./shoham/node5.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html70" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html64" HREF="./shoham/node3.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html73" HREF="./shoham/node5.html">Architectural answers to design </A>
<B>Up:</B> <A NAME="tex2html71" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html65" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<BR> <P>
<H1><A NAME="SECTION00040000000000000000">Summary of design requirements</A></H1>
<P>
To summarize, we had to build a system that met the following
requirements. To succeed, every criteria had to be met in full:
<P>
<UL>
<LI> The system had to operate in real-time. Data entered at one site
must be immediately available at all other sites.
<LI> The system had to be secured against eavesdropping, wire-taps, etc.
<LI> The system had to be responsive to users even when communication latency
was high (on the order of 1-3 seconds) and the bandwidth was low
(at most 30kbps).
<LI> All administration had to be handled by a trained end-user.
<LI> Access to the data had to be strictly controlled and the rules for
access control were subject to modification by the
user-administrator.
<LI> Access to data had to be logged and the detail with which logs were
made had to be subject to run-time control by the user-administrator.
<LI> The client user interface had to be very intuitive - users with no
computer experience (literally: where's the on-switch?) had to be able
to use the system after a 1/2 hour of training.
<LI> The system had to be inexpensive to develop, deploy, administer and
maintain.
</UL>
<P>
The last criterion makes the preceding ones even harder to achieve!
<P>
<HR><A NAME="tex2html72" HREF="./shoham/node5.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html70" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html64" HREF="./shoham/node3.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html73" HREF="./shoham/node5.html">Architectural answers to design </A>
<B>Up:</B> <A NAME="tex2html71" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html65" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html82" HREF="./shoham/node6.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html80" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html74" HREF="./shoham/node4.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html83" HREF="./shoham/node6.html">The components</A>
<B>Up:</B> <A NAME="tex2html81" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html75" HREF="./shoham/node4.html">Summary of design requirements</A>
<BR> <P>
<H1><A NAME="SECTION00050000000000000000">Architectural answers to design questions</A></H1>
<P>
To address the aforementioned requirements, we clearly had to use a client/server
database technology. To defend against eavesdropping, we had to encrypt
all communications.
<P>
At the time, IPsec and virtual private networks were not available.
Even today, these are young technologies and VPNs are not yet suitable
for implementation on client workstations. The solution had to be
encryption in the DBMS protocol. To do this, we could either buy Secure
Oracle (which would put the project over budget), or roll our own
solution.
<P>
We had to write a DBMS engine which would encrypt all communication,
be responsive when the bandwidth was low and the latency high, support
strong authentication, access controls and auditing features. On
the bright side, we really didn't need an SQL engine, or a generalized
query engine at all. (More on queries and reports later, though!)
<P>
<HR><A NAME="tex2html82" HREF="./shoham/node6.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html80" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html74" HREF="./shoham/node4.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html83" HREF="./shoham/node6.html">The components</A>
<B>Up:</B> <A NAME="tex2html81" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html75" HREF="./shoham/node4.html">Summary of design requirements</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html92" HREF="./shoham/node7.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html90" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html84" HREF="./shoham/node5.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html93" HREF="./shoham/node7.html">Client software</A>
<B>Up:</B> <A NAME="tex2html91" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html85" HREF="./shoham/node5.html">Architectural answers to design </A>
<BR> <P>
<H1><A NAME="SECTION00060000000000000000">The components</A></H1>
<P>
A client/server architecture consists of several parts:
<P>
<UL>
<LI> A client:
<UL>
<LI> A (graphical) user interface.
<LI> A DBMS communication package.
<LI> A network communication package.
<LI> An operating system.
</UL>
<LI> A network, which connects the client to the server.
<LI> A server:
<UL>
<LI> A package for physically accessing a database, including record
locking, read/write, etc.
<LI> An access control / logging module.
<LI> An authentication module.
<LI> A database protocol and code to support it.
<LI> A network communication package.
<LI> An operating system.
</UL></UL>
<P>
To implement a client/server database, each of the components above
must be implemented; either using existing software or by writing
new code. We designed a new client/server system primarily in order
to implement our own secure protocol. Accordingly, we wrote our
own code to handle the database communication protocol. The other components
are off-the-shelf, in order to reduce the programming work.
<P>
The following are the components used in our system:
<P>
<TABLE COLS=3 BORDER FRAME=BOX RULES=GROUPS>
<COLGROUP><COL ALIGN=LEFT><COLGROUP><COL ALIGN=LEFT><COLGROUP><COL ALIGN=LEFT>
<TBODY>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
<B>Location</B> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <B>Component</B> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <B>Technology</B> </TD></TR>
</TBODY><TBODY>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP><B>Client</B>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> operating system </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Win32 </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> network communication package </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> TCP/IP + SSL </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> client DBMS communication package </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> graphical user interface </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <A NAME="tex2html1" HREF="http://www.zinc.com">Zinc</A> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
<B>Network</B>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> protocol </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> TCP/IP </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
<B>Server</B>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> operating system </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <A NAME="tex2html2" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> network communication package </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> TCP/IP + SSL </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> database protocol + support code </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> authentication module </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> access control / logging module </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> package for physical DBMS access </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <A NAME="tex2html3" HREF="http://www.sequiter.com">CodeBase</A> </TD></TR>
</TBODY>
</TABLE>
<P>
The architecture is illustrated in Figure&nbsp;<A HREF="./shoham/node6.html#figarch">1</A>.
<P>
<P><A NAME="46">&#160;</A><A NAME="figarch">&#160;</A><IMG WIDTH=640
HEIGHT=769 ALIGN=BOTTOM ALT="figure44" SRC="./gx/shoham/img1.gif"><BR>
<STRONG>Figure 1:</STRONG> System architecture<BR>
<P><BR> <HR>
<UL><A NAME="CHILD_LINKS">&#160;</A>
<LI> <A NAME="tex2html94" HREF="./shoham/node7.html#SECTION00061000000000000000">Client software</A>
<LI> <A NAME="tex2html95" HREF="./shoham/node8.html#SECTION00062000000000000000">Database and network protocols</A>
<LI> <A NAME="tex2html96" HREF="./shoham/node9.html#SECTION00063000000000000000">Server software</A>
</UL>
<HR><A NAME="tex2html92" HREF="./shoham/node7.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html90" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html84" HREF="./shoham/node5.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html93" HREF="./shoham/node7.html">Client software</A>
<B>Up:</B> <A NAME="tex2html91" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html85" HREF="./shoham/node5.html">Architectural answers to design </A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html105" HREF="./shoham/node8.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html103" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html97" HREF="./shoham/node6.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html106" HREF="./shoham/node8.html">Database and network protocols</A>
<B>Up:</B> <A NAME="tex2html104" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html98" HREF="./shoham/node6.html">The components</A>
<BR> <P>
<H2><A NAME="SECTION00061000000000000000">Client software</A></H2>
<P>
We chose Win32 for the client interface because it is common,
well-accepted and friendly.
<P>
We used the <A NAME="tex2html5" HREF="http://www.zinc.com">Zinc</A> platform-independent graphical user interface library
to develop the user interface of the client software. <A NAME="tex2html6" HREF="http://www.zinc.com">Zinc</A> allowed us
to save time writing Windows screen code and be sure that future
versions of the software could easily be ported to other operating
systems (e.g., Motif, Curses, NextStep, MacOS, OS/2 PM).
<P>
<HR><A NAME="tex2html105" HREF="./shoham/node8.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html103" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html97" HREF="./shoham/node6.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html106" HREF="./shoham/node8.html">Database and network protocols</A>
<B>Up:</B> <A NAME="tex2html104" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html98" HREF="./shoham/node6.html">The components</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html115" HREF="./shoham/node9.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html113" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html107" HREF="./shoham/node7.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html116" HREF="./shoham/node9.html">Server software</A>
<B>Up:</B> <A NAME="tex2html114" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html108" HREF="./shoham/node7.html">Client software</A>
<BR> <P>
<H2><A NAME="SECTION00062000000000000000">Database and network protocols</A></H2>
<P>
We used TCP/IP as the communication
protocol because it is also common, well supported and
independent of physical media. Although modems are used in
the MHCID system today, we anticipate other media in the future.
<P>
In order to secure the database communications, we needed an
efficient, robust and <EM>proven</EM> encryption protocol. Developing
encryption algorithms and secure protocols is a complex task,
fraught with danger. Rather than invent our own, it was preferable
to use something ``tried and true.'' SSL, developed by Netscape,
is just such a protocol. It can use public-key cryptography
to authenticate the server and to exchange a secret session key
in a secure fashion.
<P>
Fortunately, an efficient implementation of
SSL is available on the Internet, courtesy the hard work of
Eric Young and Tim Hudson - <A NAME="tex2html7" HREF="ftp://psych.psy.uq.oz.au/pub/Crypto/SSL">SSLeay</A>.
<P>
We developed our own DBMS protocol using a simple syntax,
on top of SSL sockets. A set of three-letter commands was defined,
which supports everything from logging in, to multi-record read and
write operations. The client sends commands to the server,
and the server replies with any relevant data, plus a status code.
The protocol was designed to be terse, simple and to support
every operation required by our client software in a single
operation.
<P>
Some examples of how the protocol speeds up the client/server
interaction are:
<UL>
<LI> The client can open every table it needs for a given operation with
one command.
<LI> The client GUI frequently needs to validate a data entry field.
Only one command is needed to check whether ``value X appears in
column Y in some row of table Z.''
<LI> The client can read many records from one or more related tables on
the server with a single command.
</UL><HR><A NAME="tex2html115" HREF="./shoham/node9.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html113" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html107" HREF="./shoham/node7.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html116" HREF="./shoham/node9.html">Server software</A>
<B>Up:</B> <A NAME="tex2html114" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html108" HREF="./shoham/node7.html">Client software</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<A NAME="tex2html123" HREF="./shoham/node10.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html121" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html117" HREF="./shoham/node8.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html124" HREF="./shoham/node10.html">Bonus features</A>
<B>Up:</B> <A NAME="tex2html122" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html118" HREF="./shoham/node8.html">Database and network protocols</A>
<BR> <P>
<H2><A NAME="SECTION00063000000000000000">Server software</A></H2>
<P>
We chose to implement the server on <A NAME="tex2html10" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A> for a number of reasons:
<UL>
<LI> It's a lot easier to write Unix software than Windows software.
This is particularly true of network communications code and
server processes.
<LI> In our experience, <A NAME="tex2html8" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A> is a very fast, very reliable operating
system. It's also very well supported by the Internet community.
<LI> The price is right!
<LI> We were already very familiar with <A NAME="tex2html9" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A>.
</UL>
<P>
Once the operating system and database protocol design were fixed,
all we needed was a physical database access system. Rather than
write our own, we used <A NAME="tex2html11" HREF="http://www.sequiter.com">CodeBase</A>, which allows programs written in C
to manipulate xBase-compatible database files. We used <A NAME="tex2html12" HREF="http://www.sequiter.com">CodeBase</A> because
we were familiar with it from previous projects and have found
it to be fast and reliable.
<P>
<HR><A NAME="tex2html123" HREF="./shoham/node10.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html121" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html117" HREF="./shoham/node8.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html124" HREF="./shoham/node10.html">Bonus features</A>
<B>Up:</B> <A NAME="tex2html122" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html118" HREF="./shoham/node8.html">Database and network protocols</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>Unioncamere Emilia-Romagna: an Italian Public Administration Using Linux
</H2>
<H4>By
<A HREF="mailto:monty@rer.camcom.it">Giampaolo Montaletti</a></H4>
</center>
<P> <HR> <P>
<P>Two year ago the Internet was exploding in Italy. A lot of newspaper
reported wishfull informations about it:</P>
<P>the Net is over 40 million of people looking for your information;</P>
<P>the Net is cheap and fast</P>
<P>the Net is growing so fast that you can't keep up.</P>
<P><A HREF="http://www.rer.camcom.it/istituzionale/">Unioncamere</A> is the
regional association of Chamber of Commerce of The italian region
Emilia-Romagna (Bologna is the capital, but <A HREF="http://www.iper.net/rimini-vrml/">Rimini
</A> is the well-world-wide-know city). Chambers of Commerce in Italy are
public bodies, and all the firm must be associated to the Chamber of Commerce
and have to pay an annual tax.</P>
<P>As you can easily understand firms are not so happy to pay tax, so we are
always under a big pressure from them. They want to have a lot of data about
economy, markets and financial tools in a fast and viable way and without a
lot of cost of maintenance. </P>
<P>Internet was the choiche and Linux was the system of choiche! At the
beginning of september 1995 we was starting the project of establishing a
server , at the end of october we was on line with the www server.</P>
<P>To give a fast stratup has been very important the contribution of Massimo
Poli, and indipendent consultant running a lot of sites and using Linux only;
you che reach him at <A HREF="http://www.sextant.it">www.sextant.it</A>, the
little firm he is managing. </P>
<P>When you pay a consultant using Linux you are sure to pay his work only,
and not a bogus &quot;assistance service&quot; or &quot;online help&quot;.
This is very important in establishing a good and clear contract.</P>
<P>When we started whith the site we was using a coax-ethernet based LAN
with 30 users about. The 2 internal servers was (and they are working too)
Novell 3.12 based. Novell is IMHO a good NOS for two tasks: printing and
sharing disks. Novell tecnology is quite stable: our server BOSS is up and
running without shutdown from 6 of january 1997. But we was needing a good
e-mail server and a workgroup solution.</P>
<P>We decided to move to Linux for internal E-mail as for Internet E-mail. In
this way you have an affordable solution with low costs and no standard
problems. </P>
<P>The site is growing fast. Using Apache solution and virtual server
capacibility we are hosting two Chamber of Commerce and we are going to host
the other 7 in the region in the next future. Mailing lists, restricted users
areas, on-line database with www interfaces and other usefull instruments are
all in use in our server box. Security was another big problem, but not so big
using Linux firewalls. In 1996 we have installed a second server cruncing the
Lan in two segments. </P>
<P>Whit Linux we have solved a lot of problem at low cost, but Linux is
excellent in networking and network management. Now I'm administrating the
full network (SMB servers included) with my Linux box. I'm now mounting
volumes from Novell and fron NT 4 workstations, I'm already printing from
Novell printer server. Because I'm not a full time administrator (I'm really
working here as Chief of the Research and develpment office, and I'm not an
hacker, but a Senior Economist) I use Linux for Office work too. <A HREF="http://www.redhat.com/products/product-details.phtml?id=apx">Applixware
</A> is the solution I prefer, the only 200 $ I've spent for software whith
Linux. The solution provided by Applixware is good because I share my work
with Microsoft maniac in my office, and I need the filters for Word and Excel
that Applixware is providing with version 4.3.</P>
<P>Workgroup solutions are now provided by a linux box with <A HREF="http://bscw.gmd.de/">BSCW
</A> software, a not well know piece of software in the linux world, but a
vary usefull one if you plan to establish an intranet whit workgroup solutions.
</P>
<P>For all the 4 linux boxex running in our network we use standard pc's. 2 of
the four machines running are old Pentium 90 and 133 Mhz that people with
Win95 wants no more, because those are &quot;weak machines&quot;.</P>
<P>As you have already understood reading this article, we are not
linux-religious or linux-maniac or linux-fanatic. In our offices we run Novell
and Os/2 and Win* machines as well. But we use linux because for some tasks
is the best solution, only the best solution. Is stable, well supported and
documented. If you want to run a new project where the Internet or the
Intranet is involved and your boss is not able to understand or you have no
more money, go to the room were the old-and-disrupted-pc's are and set-up a
linux box. </P>
<P><A HREF="mailto:monty@rer.camcom.it">Giampaolo.Montaletti@rer.camcom.it
</A> AKA <A HREF="http://www.rer.camcom.it/people/monty/">Monty</A></P>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Giampaolo Montaletti<BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./shoham/drafth.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./wkndmech_dec97/wkndmech.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<CENTER>
<H1>An Introduction to the Midnight Commander</H1>
<B><FONT SIZE=-1>
by John M. Fisk &lt;fiskjm@ctrvax.vanderbilt.edu&gt;<BR>
October, 1997<BR>
Nashville, TN
</FONT></B>
</CENTER>
<BLOCKQUOTE>
<CENTER><P><B>Abstract</B></CENTER>
<P>
The <B>Midnight Commander</B> is a directory browsing and file manipulation
program that provides a flexible, powerful, and convenient set of file
and directory operations. It is capable of running in either a console or
an xterm under X11; mouse support is native under X11 and is provided by
the <B>gpm</B> mouse server when used in a Linux console. A sophisticated
Virtual File System (VFS) supports directory-like browsing and file operations
for a variety of common archive formats as well as FTP and network connections.
Its basic operation is easily mastered by the novice while providing a rich
feature set and extensive customization.
</BLOCKQUOTE>
<H2>Introduction</H2>
<P>
The last couple years has seen the release of a bevy of well designed, X based
file managers including FileMan, FileRunner, Linux Explorer, TkDesk, X-Files,
and Xplorer to name a few. Some of these are &quot;works in progress&quot;
but all show promise and are well worth having a look at.
<P>
Despite this, one of my favorites, and now old enough in the &quot;Linux
Epoch&quot; to be called venerable, is Miguel de Icaza's Midnight Commander
(mc). The README describes mc as:
<BLOCKQUOTE>
<P>
a free Norton Commander Clone with many useful features... The Midnight
Commander is a directory browsing tool which bears a certain remote
resemblance to John Socha's Norton Commander for DOS.
</BLOCKQUOTE>
Its stability, ease of use, flexibility, and rich feature set make it quite a
powerful tool. Its simplicity makes it easy for novices to quickly master the
basics. Among the capacities it boasts are:
<UL>
<LI>support for all basic file operations including move, copy, rename,
delete, chown, link, view, and edit
<LI>a built in Virtual File System that allows browsing of archives such
as tar, compressed tar, rpm, deb, zip, cpio, lha, rar, and zoo files
as well as remote files via FTP or the Midnight Commander's own mcfs
protocol
<LI>mouse support in xterms under X or at the Linux console via the gpm
mouse server
<LI>built in text and hex viewer/editor as well as support for external
viewer and editors
<LI>subshell support for the bash, tcsh, and zsh shells
<LI>built in Find File capacity
<LI>background copy or move operations
<LI>online help system
<LI>and much more...
</UL>
<P>
The manual page for mc is well over 50 pages in length, giving some indication
of its complexity. In this short article I won't be able to cover mc in this
depth, but will try to touch on the basics: getting the sources, compiling
and installation, and basic use and features. This is probably best read
while sitting at your computer and experimenting with the various features as
you go. Let's start by compiling and installing mc.
<H2>Going To The Source</H2>
<P>
Sources and precompiled binaries are available at a number of locations
including the canonical GNU FTP archive prep.ai.mit.edu/pub/gnu/ and the
sunsite FTP archive at sunsite.unc.edu/pub/Linux/utils/file/managers/mc/. The
official web page is http://mc.blackdown.org/mc/ where the most recent public
and development releases may also be found. There are, additionally, mailing
lists for both users and developers to which you can subscribe from this site.
<P>
In addition, most Linux distributions including Debian, RedHat, Slackware, and
their derivatives provide precompiled packages in *.deb, *.rpm, or *.tgz
formats. If you feel a bit shaky at the prospect of compiling your own
programs, or are in a hurry to get going, then these provide an easy means of
obtaining and installing mc. Check the documentation that came with your
distribution as to the specifics of using the package management system they
provide. At a minimum you could try:
<PRE>
$ installpkg mc-xxx.tgz
-OR-
$ rpm -i mc-xxx.rpm
</PRE>
for Slackware or RedHat based systems in which &quot;mc-xxx.{tgz,rpm}&quot; is
the name of the package.
<P>
In the pioneering spirit of Linux's &quot;Do It Yourself And Learn&quot;, I'd
like to suggest that you compile and install mc from its sources. It's not
that difficult and if you've not done much of this then mc is an ideal program
on which to start since it is quite well behaved.
<P>
For the purposes of this article I'll be using mc version 4.1.5 which is the
most current at the time of this writing. If you ftp the sources from sunsite
or one of its mirrors then you might also want to retrieve a couple other
useful packages that support mc: the rxvt X window terminal, Allesandro
Rubini's gpm mouse server, and Theodore T'so and Remy Card's e2fsprogs package
which allows file undelete capacity to be compiled into mc. All of these are
available at sunsite or its mirrors in the /pub/Linux/utils/file/managers/mc/
directory.
<H2>Compiling and Installing Midnight Commander</H2>
<P>
In this section, I'll assume that you've gotten the *.tar.gz source file, that
you'll unarchive the sources into /usr/src, and that you'll install mc and its
support files under /usr/local. You can obvious compile and install mc in
any directory you wish: just change the pathnames to suit your preferences.
To unarchive the sources do:
<PRE>
$ cd /usr/src
$ tar -xvzf /path/to/mc-4.1.5.tar.gz
</PRE>
in which &quot;/path/to/mc-4.1.5.tar.g&quot; is the path to the source file --
<I>i.e.,</I> if you downloaded the file to your home directory you'd use:
<PRE>
$ tar -xvzf ~/mc-4.1.5.tar.gz
</PRE>
This assumes that you're using the GNU version of tar which handles gzipped
files using the &quot;-z&quot; option. If you are using a different version
of tar you can also do:
<PRE>
$ gzip -dc /path/to/mc-4.1.5.tar.gz | tar -xvf -
</PRE>
<P>
After unarchiving the file change to the mc-4.1.5 directory where you'll find
both the sources and program documentation. The mc distribution comes with
two files outlining the installation process: INSTALL and INSTALL.FAST. If
you're not used to compiling programs from source then read INSTALL.FAST which
gives a concise explanation of the process as well as options that you can use
to customize where mc gets installed and what features it includes. If you're
a bit more adventurous, then have a look at the INSTALL document which goes
into a good deal more detail. For our purposes, I'll go through the process
of compiling mc with Virtual File System, SLang, and gpm mouse support (which
is very little work since these are the defaults). We'll install the mc
executable under /usr/local/bin and its support files under /usr/local/lib/mc.
You should log in as root in order to compile and install mc.
<P>
As with many other GNU programs, mc uses an autoconf script to detect the
various features of your system and then create the needed makefiles.
This greatly simplifies the build process. An additional feature that
this supports is the ability to declare compilation options such as what
features to include and where the program will be installed. Both INSTALL
and INSTALL.FAST give a listing of these features. We'll use:
<PRE>
$ ./configure --prefix=/usr/local --with-slang &gt; configure.log 2&gt;&amp;1 &amp;
$ tail -f configure.log
</PRE>
The mc configure script defaults to compiling in SLang, mouse, and X Window
support (so the --with-slang option wasn't really necessary). So as to have a
record of what happened use <KBD> &gt; configure.log 2&gt;&amp;1</KBD> which
saves all the output to configure.log. Use <KBD>tail -f configure.log</KBD>
to view the log file as the configure script progresses. When configure is
finished it prints a summary of the features and compile options that will be
used. Use Control-C to exit out of tail.
<P>
If there were no error messages (and there should be none) then compiling and
installing is as simple as:
<PRE>
$ make
$ make install
</PRE>
If you want to create a log file of the build and installation process you can
use:
<PRE>
$ make &gt; make.log 2&gt;&amp;1 &amp;
$ tail -f make.log
$ make install &gt; install.log 2&gt;&amp;1 &amp;
$ tail -f install.log
</PRE>
<P>
And that should do it! To ensure that mc was installed properly type:
<PRE>
$ mc -V
Midnight Commander 4.1.5
with mouse support on xterm and the Linux console.
Edition: text mode
Virtual File System: tarfs, extfs, ftpfs, mcfs, undelfs.
With built in Editor
Using system-installed S-lang library with an unknown terminal database
With subshell support: as default
With DUSUM command
With support for background operations
</PRE>
This returns version and compilation information. If you've compiled and
installed the 4.1.5 version but <KBD>mc -V</KBD> returns a previous version
then you'll need to find and uninstall or rename the previous version. If
you use the bash shell, type:
<PRE>
$ type -a mc
</PRE>
This should return the paths to all mc executables. At this point, you can
either use your distribution's package manager to uninstall the previous
version or temporarily rename it to something like <KBD>mc.old</KBD>.
You should now be ready to start exploring mc!
<H2>The Midnight Commander Tour</H2>
<P>
Without trying to be exhaustive I'd like to touch on the following topics:
<UL>
<LI>the mc interface
<LI>directory navigation
<LI>file selection
<LI>basic file operations
<LI>viewing and editing files
<LI>using mc's panels
<LI>VFS coolness
<LI>popups, shortcuts, and a few more tricks
</UL>
and we'll finish with some closing remarks and suggestions. My aim is to
cover the salient features and give you a feel for what mc is able to do.
<H3>The mc Interface</H3>
While mc has a number of command line options, in normal use simply type
<KBD>mc</KBD> at the command prompt to start it. You can run mc either at the
console or in an xterm. If you use mc under X then I'd strongly suggest that
you rxvt instead of an xterm as both the colors and line drawing characters
are well supported under rxvt. As a side note, if you find that the line
drawing characters are not drawn correctly, then make sure that the TERM
environment variable has been set to &quot;xterm&quot;:
<PRE>
$ echo $TERM
linux
(if this returns &quot;linux&quot; as above, then do the following:)
$ export TERM=xterm
$ echo $TERM
xterm
$ mc
</PRE>
At this point, you should see something like:
<P>
<IMG SRC="./gx/fisk/mc_main.gif" WIDTH=744 HEIGHT=394 ALIGN=BOTTOM>
<P>
This main screen is similar to what you'd see at the console (the window has
been sized to 80x24). It's main components are:
<UL>
<LI>menubar at the top which contains drop-down menus
<LI>directory panels which contain file listings
<LI>a &quot;hint line&quot;
<LI>a command line
<LI>function key labels at the bottom
</UL>
<P>
If you move the mouse around you should also see a pointer on the screen.
If you don't see a cursor when using mc at the console then make sure that the
gpm mouse server is running:
<PRE>
$ ps -ax | grep gpm
73 S0 S 0:00 /usr/bin/gpm -t ms
104 ? SW 0:00 (gpm-root)
5465 ? D 0:00 grep gpm
</PRE>
If it isn't then (assuming you're using a Microsoft-compatible serial mouse)
start it using <KBD>gpm -t ms</KBD>. The &quot;-t&quot; option specifies the
type of mouse; if you're using a different kind of mouse then consult the gpm
manual page for the command line option to use.
<P>
To activate one of the menus you can either click on it with the mouse or hit
the F9 key and use the arrow keys to move the desired menu item. This brings
up one of the important features of mc: almost all operations can be
performed using either the mouse or via keystrokes. Which method you use is a
matter of personal style and preference although, as we'll see in a bit, using
keystrokes can be a considerable time saver especially if you are a touch
typist.
<P>
The directory panels are where most of the action takes place. mc is normally
run in this two-panel mode although single panel mode is also supported.
The panels provide a view of two directories at once with one of them being the
&quot;current directory.&quot; Most all file operations are performed on files
in this current directory (although copy, rename, and move operations default
to using the non-current directory as the &quot;target&quot; directory).
To select one directory panel simply click the mouse anywhere in the panel.
You can also use the TAB key to switch the current directory from one panel
to the other.
<P>
The command line at the bottom functions just as you'd expect: simply type
the command to execute and mc runs it just as if you'd entered it at the shell
prompt. Just above the command line is the hint line (at the console; in an
xterm it uses the title bar) which displays a series of hints and suggestions.
<P>
Finally, the bottom line of the window display the function key mappings.
Pressing F1 brings up the Help menu, F2 brings up the User Menu, F3 let's you
view a file, and so forth. Note that clicking on any of these with the mouse
results in the same action.
<P>
In addition to this main window there are a number of popup dialog boxes which
are used for specific operations. I'll cover several of these shortly. For
now, let's turn to issues of navigation.
<H3>Directory Navigation</H3>
Moving from one directory to another is quite simple: in the current
directory panel you can either:
<UL>
<LI>select a directory, by clicking on it with the mouse or moving to it
using the arrow keys, and then hit RETURN
<LI>double clicking on a directory using the mouse
<LI>use the <KBD>cd</KBD> command in the command line
</UL>
Any of these methods will cause the directory you've selected to be listed
in the current directory panel. Note that the <KBD>cd</KBD> command
understands &quot;tilde expansion&quot; which is a shortcut for referring
to your home directory -- <I>i.e.,</I> entering <KBD>cd ~/bin</KBD> would
change to the bin directory in your home directory. Also, clicking on the
&quot;..&quot; entry will move to the current directory's parent as will
entering <KBD>cd ..</KBD> on the command line. There is also a Directory
Hotlist which we'll look at shortly that helps speed directory navigation.
<P>
One other navigation aid to keep in mind is that movement within the directory
panels can be accomplished using a variety of keystrokes, many of which are
modeled after the emacs text editor. These include:
<UL>
<LI>down arrow, Ctrl-n - move forward one line
<LI>up arrow, Ctrl-p - move backward one line
<LI>Page Down, Ctrl-v - move back one screen
<LI>Page Up, Alt-v - move backward one screen
<LI>Home, Alt-&lt; - move to the top of the directory listing
<LI>End, Alt-&gt; - move to the end of the directory listing
</UL>
Note that <I>Ctrl-n</I> means &quot;hold down the control key and hit the
letter n.&quot; There are a few other movement keystrokes available, but
these are the most commonly used.
<P>
Once you know how to move from one directory to another the next thing to do
is learn how to perform basic file operations. But before doing that we'll
need to take a quick detour.
<H3>File Selection Mechanisms</H3>
Most of the time you'll be copying, renaming, deleting, or moving single files
and doing so is quite straightforward. However, there will assuredly be times
which you'll want to do something to several files or a group of related
files. Maybe you'll want to find an delete all the *.rej files after you've
run the patch program; or you want to find and move all *.tar.gz files to a
separate directory; or you want to copy selected documentation from a source
distribution to a /usr/doc directory for future reference. All of these
require selection of a group of files.
<P>
First, we need to make a distinction between the currently selected file or
directory and <I>marked or tagged</I> files. The currently selected file is
simply the one that is highlighted in the current directory panel. If you
want to delete <KBD>foo.txt</KBD> simply move the highlight bar to that file
and hit F8 to delete it. However, if you want to delete a group of files then
you'll need to <I>tag</I> them.
<P>
Tagging can be done in a couple ways. The simplest is to either click on the
file or directory using the right mouse button or move the highlight bar to
the file and hit Ctrl-t (that is, hold down the control key and hit t). In
this way you can tag any number of files for copy, deletion, moving, and so
forth.
<P>
If the files you want can be specified by a shell pattern (such as
<KBD>*.tar.gz</KBD> for all the gzipped tar files or <KBD>foo_??.txt</KBD> for
foo_01.txt, foo_02.txt, foo_03.txt, etc., then you can use the following
shortcuts:
<DL>
<DT><B>To select a group of files by pattern hit the &quot;+&quot; key</B>
<DD>This will cause a dialog box to appear in which you can enter the
search pattern. Note that entering the &quot;*&quot; wildcard will
select all the files in the directory.
<P>
<DT><B>To select all the files in the directory hit the &quot;*&quot;
key</B>
<DD>This has the same effect as using the + key and then entering
&quot;*&quot;
<P>
<DT><B>To unselect a group of files hit the &quot;\&quot; key or the
&quot;-&quot; key</B>
<DD>A dialog box similar to that with the + key will appear; if you want
to unselect all files then enter &quot;*&quot;
<P>
</DL>
<P>
Using pathname expansion (also known as filename globbing) is a fast and
powerful way to select a group of similar files. Having now selected your
files, let's see what you can do with them.
<H3>Basic File Operations</H3>
The Midnight Commander provides all of the basic UNIX file system operations
including copy, delete, move, rename, link, symbolic link, chown, view,
and edit. One of the nice features of mc is that it defaults to asking
for confirmation before taking destructive actions such as file deletion
or overwriting.This feature alone can save you a good deal of agony.
<P>
Below is a short summary of the file operations. In the next section we'll
look specifically at file viewing and editing. Keep in mind that while the
summary below indicates the keystrokes for the various operations, all of
these can be accessed using the &quot;File&quot; menu.
<DL>
<DT><B>copy: F5</B>
<DD>Normally, to copy a file from one directory to another select or tag
the file(s) to copy in the current directory panel and change to the
target directory in the other directory panel. Hit F5 or click on the
Copy function at the bottom. Doing so brings up a dialog box:
<P>
<IMG SRC="./gx/fisk/mc_copy.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>
<P>
If you want to use a different directory than the one in the other
panel or if you want to change the file name then you can use the
to: entry box to do so.
<P>
Also, when you perform a copy (and move or delete) operation mc
displays a dialog box with a progress meter indicating the progress on
the current file as well as the overall progress if a set of files has
been selected.
<P>
<DT><B>delete: F8</B>
<DD>After selecting or tagging a file or set of files hit F8 to delete
them. Note that you'll be asked for confirmation. Also, mc is able
to recursively delete a directory, but this, too, requires
confirmation. If you're having to clean out a directory then I'd
strongly suggest your using mc. It makes selecting files very easy
and helps prevent costly accidental deletions.
<P>
Note that at any time you can cancel an operation by hitting the
Escape key twice.
<P>
<DT><B>move/rename: F6</B>
<DD>These are very similar to the copy operation described above in that
the destination directory defaults to the non-current directory in the
case of the move operation. Note that renaming a file entails
&quot;moving&quot; it to another filename. In this case, use the to:
entry field in the dialog box to enter the new filename.
<P>
<DT><B>(hard) link: Ctrl-x l</B>
<DD>To create a hard link to a file, select that file and enter Ctrl-x
followed by the letter &quot;l&quot;. A dialog box will prompt you
for the filename for the newly created link.
<P>
<DT><B>symbolic link: Ctrl-x s</B>
<DD>This is the same as that for a hard link except Ctrl-x is followed by
the letter &quot;s&quot;.
<P>
<DT><B>chown: Ctrl-x o</B>
<DD>To change the owner or group of a file hit Ctrl-x followed by an
&quot;o&quot;. A dialog box is presented that will allow you to select
owner and group from a list of valid values.
<P>
Note that an &quot;Advanced Chown&quot; facility is available under
the &quot;File&quot; menu. Until you're rather sure of what you're
doing, this is probably best left alone.
<P>
<DT><B>mkdir: F7</B>
<DD>While not a file operation <I>per se</I>, the MkDir command allows you
to create a new directory in the currently active directory. A dialog
box is presented that will prompt you for the new directory name.
<P>
</DL>
<P>
With these basic facilities you'll be able to do a good deal of day to day
file system maintenance. To round things out, though, we'll need to add a
couple other features.
<H3>File Viewing and Editing</H3>
The Midnight Commander comes with a very functional built in file viewer and
text/hex editor. To view or edit a file hit the F3 or F4 key respectively.
Of particular note is the fact that mc provides formatting support for
several common file formats including manual pages, HTML, and mail file. That
is, that rather than viewing the raw file, mc will format the file according
to the file format.
<P>
For example, to view a manual page (even a gzipped page!) simply select the
file and hit F3. If you have the mc source distribution handy, change to the
doc directory and select the mc.1 file. Hit F3 to see:
<P>
<IMG SRC="./gx/fisk/mc_view.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>
<P>
You can do similar things with HTML or mail files. In the case of HTML files
it is worth noting that &quot;viewing&quot; the file is probably not what you
expect as mc will strip out the hypertext tags leaving just the text. If you
want to view an HTML file it is best to select the file and hit the RETURN key.
Doing so &quot;opens&quot; the file and automatically executes (by default)
lynx if you are at a console or netscape if you are running under X.
<P>
The internal file view allows you to view files in one of two modes: ASCII or
hex. When using the file viewer you'll notice that the function keys at the
bottom change to a new set which are specific to the viewer. These include:
<UL>
<LI><B>F2</B> toggles line wrapping
<LI><B>F3</B> exit the viewer
<LI><B>F4</B> toggle hex view mode
<LI><B>F5</B> goto line; a dialog box appears which will prompt you for a
line number
<LI><B>F6</B> regular expression search
<LI><B>F7</B> normal search
<LI><B>F8</B> toggle raw or parsed mode
<LI><B>F9</B> toggle formated or unformatted mode: this affects attributes
such as bold or underline which are displayed using various colors
<LI><B>F10</B> exit the viewer
</UL>
<P>
In addition <B>Ctrl-s</B> and <B>Ctrl-r</B> can be used for normal or reverse
searches. Once you've started a search, hit the letter <B>n</B> to find the
next match. <B>Ctrl-l</B> will repaint the screen; <B>Alt-r</B> will toggle
the display of a ruler.
<P>
In terms of moving around the viewer, mc has a rather egalitarian attitude
and will accommodate almost any set of movement keystrokes that you've gotten
used including those for emacs, less, and even some vi. Some of these are:
<UL>
<LI><B>Home, Alt-&lt;</B> - move to head of file
<LI><B>End, G, Alt-&gt;</B> - move to end of file
<LI><B>up/down arrows</B> - move forward or backward a single line
<LI><B>Ctrl-n, Ctrl-p</B> - move forward or backward a single line
<LI><B>left/right arrows</B> - scroll horizontally
<LI><B>Space, Page Down</B> - move forward one page
<LI><B>b, Page Up</B> - move back one page
</UL>
<P>
One very handy feature is that, if you are in View mode and hit <B>Ctrl-f</B>
then the viewer will move to the next file in the directory and display it.
In this way you can easily move through a set of files, viewing one right
after the other.
<P>
The internal file editor provides a full set of editing features and can be
used to edit both text and binary files up to a size of 16 megabytes. As with
the Viewer, function keys have been remapped to provide common file editing
functions. In addition, a popup menubar provides extensive editing
operations including file insertion, save, copy, and load; block operations
(copy, move, etc); search/replace functions; command macro recording and
execution; and the capacity to pipe selected text through various shell
commands such as indent or fmt. When not active, the menubar is hidden and
file information is displayed in the topmost line. Here's a screen dump of
the editor in action:
<P>
<IMG SRC="./gx/fisk/mc_editor.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>
<P>
Both the internal Viewer and Editor are designed to be fast and easy to use.
You may, however, wish to use an external viewer (such as <I>more</I>,
<I>less</I>, or <I>most</I>) or editor. To do so, you'll need to set your
PAGER and EDITOR environment variables to the appropriate program and then use
the Options->Configuration menu to unselect &quot;use internal edit&quot; or
&quot;use internal view&quot;. If you were using the bash shell and wanted
to set the pager to &quot;less&quot; and the editor to &quot;emacs&quot;,
then use something like:
<PRE>
$ export PAGER=less
$ export EDITOR=emacs
</PRE>
<P>
To make this change permanent you'd probably want to add these lines to your
~/.bashrc or ~/.bash_profile file. Having looked at the basic file operations
let's return to mc itself and take a look at some of its other features.
<H3>Using mc's Panels</H3>
We've already noted that the directory panels are where most of the
action takes place in terms of file operations. Accordingly there are a
number of keystroke (and mouse) shortcuts that quickly let you change the
panel view. In addition to directory listings, the panels can be quickly
changed to display directory trees, quick file views, or extensive
file information. If you spend much time at all working with files these
features are invaluable.
<H4>Basic Panel Operations</H4>
<P>
As previously noted, you can quickly switch from one panel to the other
using the <B>TAB</B> key (or <B>Ctrl-i</I>). You can also <I>swap</I>
panels using <B>Ctrl-u</I>; note that the currently active directory panel
does not change. Use <B>Ctrl-r</B> to refresh the directory display.
<P>
To change the sort order of the files being displayed, use the
<B>(Left|Right)-&gt;Sort Order...</B> menu item. This allows you to sort
files by name, size, various time stamps, inode number, and so forth.
You can also specify whether sorting should be case (in)sensitive or
reversed. Sorting by size is very useful when trying to cull out files to
recover disk space; sorting by date is useful when you are searching for a
recently installed, created, or modified file in a directory with many files
or are looking for ancient files that can safely be warehoused.
<P>
As with sorting, use the <B>(Left|Right)-&gt;Filter...</B> menu item to
filter the directory listing using shell patterns. For instance, suppose
that you wanted a listing containing only files with a .c extension.
In the Filter dialog simply enter &quot;*.c&quot; and all other files
are removed from the listing. This is very useful when you wish to
work with only a subset of files in a directory in an uncluttered setting.
<P>
You can also cycle from two-panel to single-panel modes using <B>Alt-t</B>.
This is particularly useful when you need to see the full directory
information for a particular file. Note that you can also use the
<B>(Left|Right)-&gt;Listing Mode...</B> menu item to customize what file
information the panel lists. In addition, resize the panels using the
<B>Options-&gt;Layout...</B> menu item. This allows you to split the panels
either vertically or horizontally as well as set the number of columns for
each panel using the &quot;&gt;&quot; and &quot;&lt;&quot; keys.
<H4>Panel Modes</H4>
Here's where the power of mc becomes apparent. The panels can be used in one
of four modes which can be switched using the <B>(Left|Right)</B> menus:
<DL>
<DT><B>Listing Mode...</B>
<DD>This is the default directory listing mode. As noted above, you can
customize what file information (name, permissions, time stamps, etc)
is displayed
<P>
<DT><B>Quick View...</B>
<DD>Provides a quick file viewer; it displays the file which has been
selected in the other panel. This is very handy if you need a quick
preview of a set of files. Note that the function key mappings at the
bottom of the window display the usual viewer operations: all of the
viewer features and keystrokes are available here. When previewing a
set of files try increasing the size of the viewing panel using the
<B>Options-&gt;Layout...</B> menu item.
<P>
<DT><B>Info</B>
<DD>This works in a manner similar to Quick View: it displays a wealth of
file or directory information.
<P>
<DT><B>Tree</B>
<DD>As with Quick View and Info, the Tree view works with the other panel:
it allows you to quickly navigate through the entire directory tree.
By double clicking on a directory (or selecting it and hitting RETURN)
its contents are displayed in the other panel
<P>
</DL>
<P>
One final shortcut to be aware of is <B>Alt-o</B> which makes use of both
panels: by selecting a directory in the active panel and hitting Alt-o, its
directory listing is displayed in the other panel. Hitting Alt-o repeatedly
lets you quickly preview through a series of directories.
<P>
Another powerful feature of mc is its ability to handle a multitude of archive
types: this feature alone makes it a &quot;must have&quot; utility!
<H3>VFS Coolness!</H3>
<P>
VFS refers to the &quot;Virtual File System&quot; which mc implements. It is
a powerful abstraction that allows you to view archives as though they were a
directory: all the basic file manipulation operations can then be applied.
The VFS file system handles an extraordinary number of archive types including
<B>tar</B>, <B>gzipped or compressed tar</B>, <B>RedHat's rpm package
archives</B>, <B>Debian's deb package archives</B>, <B>gzip</B>, <B>zip</B>,
<B>zoo</B>, <B>cpio</B>, <B>rar</B>, and <B>lha</B>.
<P>
To use it either select the file and hit RETURN or double click on the file.
It's contents are then displayed as a directory listing. Navigation through
the archive is the same as you'd use for a directory. This is a very useful
feature when you need a single file or set of files from an archive. Note
that if the archive is a compressed single file -- <I>i.e.,</I> a gzip, zip,
zoo, or lha compressed file -- then it is uncompressed and displayed.
<P>
The VFS also supports its own FTP capacity which allows you to transparently
manipulate files via FTP as though they were local to your machine. To log
into an FTP server use the <B>(Left|Right)-&gt;FTP Link...</B> menu item and
enter the URL or simply enter <KBD>cd ftp://&quot;URL&quot;</KBD> at the command line.
For example, to ftp to the Linux Incoming directory at sunsite you would
enter:
<PRE>
$ cd ftp://sunsite.unc.edu/pub/Linux/Incoming/
</PRE>
The hintbar at the console or the title bar under X will display progress
information (<I>e.g.,</I> logging in, retrieving directory listings, and so
forth). You can now view and copy files just as you would using ftp. On file
transfer (use F5 to &quot;Copy&quot; the file to your local machine) a
progress meter displays percent transfer completed, ETA (estimated time of
arrival), transfer rate, and the now commonplace &quot;stalled&quot; flag.
Use the <B>Options-&gt;Virtual FS...</B> menu item to customize the VFS
features such as anonymous login name and so forth.
<P>
<IMG SRC="./gx/fisk/mc_ftp.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>
<P>
Note that mc also provides FTP service via a proxy server as well as network
VFS. Having no experience with either of these I'll defer comment and simply
refer you to mc's manual page if you are interested.
<H3>Popups, Shortcuts, and a Few More Tricks...</H3>
<P>
In this last section let's look at a few more shortcuts and suggestions for
using mc effectively.
<P>
A number of popups are built into mc that considerably speed up various
operations. These include:
<DL>
<DT><B>Directory Hotlist: Ctrl-\</B>
<DD>Use this to create a popup hotlist of frequently accessed directories.
The hotlist keeps a list of &quot;alias-directory path&quot; pairs.
For example, if you use /usr/local/projects/C++/personal/ to store your
personal programming projects then you could create an entry using the
&quot;New Entry&quot; option and alias it to something like &quot;Personal
C++ Projects&quot;.
<P>
If you use mc as an ftp client then you can use the directory hotlist
to keep the URL's for your frequented sites! To edit (add, modify, or
delete entries) the list type in <B>Ctrl-\</B> and then use &quot;New
Entry&quot; to create a new entry: enter the URL for the site,
including the path to the directory that you're interested in and then
fill in the alias. Now, anytime that you need to ftp just popup the
hotlist and select the site!
<P>
<DT><B>Filename Search: Ctrl-s, Alt-s</B>
<DD>At the bottom of each directory panel is a mini-status box which lists
the currently selected file or directory name. By hitting Ctrl-s or
Alt-s the status box becomes an entry box in which you type in a file
or directory name to search for. As you type, mc does an incremental
search and automatically selects the file which matches the search.
This is very handy when searching for a particular file in a large
directory.
<P>
<DT><B>Find File: Alt-?</B>
<DD>Find File provides an exceptionally fast and useful means of searching
for a particular file based on a filename pattern, its contents, or
both! For example, suppose that you kept a directory with USENET
postings that you wanted to save and you're now looking for
information on <I>mysql</I>. Use Find File with the &quot;*&quot;
pattern for the filename and &quot;mysql&quot; for its content. It
will then grep through the files and create a list of files containing
&quot;mysql&quot;. Clicking on one of the files in the list selects
that file.
<P>
Alternatively, if you were looking for all files with
&quot;announce&quot; in the filename simply enter
&quot;*announce*&quot; in Filename: (and leave the Content:
entry box empty).
<P>
<DT><B>Active VFS Directories: Ctrl-x a</B>
<DD>This pops up a dialog box listing all of the active VFS directories
including those associated with FTP, archives, and so forth. When mc
creates a VFS directory for an archive, network, or ftp connection,
when you leave the directory the connection or resources are not
immediately freed. So, for example, if you created an ftp connection
to some host, you &quot;close&quot; it simply by changing back to a
local directory. Until the connection times out (which you can set
using the <B>Options-&gt;Virtual FS...-&gt;Timeout for freeing VFS's</B>
menu item) you can reestablish the connection once again. This also
works for archives (in this case, after the timeout, the memory
resources are deallocated).
<P>
<DT><B>Background Jobs: Ctrl-x j</B>
<DD>mc allows you to put copy and move operations into the background
(select this option from the Copy or Move dialog box) which allows you
to immediately return to mc. This is useful when you are
copying/moving a large number of files or for ftp. Use the Background
Jobs popup to quickly see what jobs are running and stop, restart, or
kill them
<P>
</DL>
<P>
Another very handy feature which mc provides is subshell support. The way
this works is by hitting <B>Ctrl-o</B> which creates a non-login interactive
shell. This works for bash, tcsh, and zsh shells. Use this shell just as you
would any ordinary shell. To immediately switch back to mc hit Ctrl-o once
again, which allows you to toggle back and forth easily.
<P>
If you are using the bash shell, keep in mind that non-login interactive
shells only source your ~/.bashrc file (and not the ~/.bash_profile file)
which means that if you have aliases or other customizations that you want to
use then you should put these in ~/.bashrc. For example, if you use color-ls
and find that file listings are not colorized, then you'll need to add
<KBD>alias ls='ls --color=tty'</KBD> to your ~/.bashrc.
<P>
One way to quickly create the &quot;all-in-one-command-center&quot; is execute
mc and then start a subshell. From here, you can execute your favorite editor
(emacs, xemacs, vim, etc.) and hit <B>Ctrl-z</B> to stop its execution and put
it in the background. This returns you to the shell. Now, if you need to run
mc then hit Ctrl-o; if you need to use your editor, type in <KBD>fg</KBD>
which will resume the stopped program; and if you need to run any other
program then use the shell as normal. This is a powerful means of keeping
productivity tools readily available.
<P>
One last feature I'd like to mention is mc's ability to help you sync
the contents of two directories. This is particularly useful if you are
keeping a backup set of files on another partition, a floppy, zip drive,
etc. To use this list the &quot;source&quot; directory in one panel and the
&quot;target&quot; directory in the other then hit <B>Ctrl-x d</B>. This will
pop up a dialog box that allows you to select the type of directory comparison:
<B>Size</B> simply compares files by size; <B>Quick</B> compares files by size
and date; and <B>Thorough</B> does an exhaustive byte-by-byte comparison.
After the comparison operation is complete (and after ensuring that the
<I>source</I> directory is in the active directory panel) hit F5 (Copy)
to copy files from your source directory to the target (backup) directory.
<H3>Closing Comments and Suggestions</H3>
I'd be remiss if I did not mention that mc comes with a very complete online
help system which is accessed using <B>F1</B>. All of the information
presented above, and a good deal more, can be accessed at any time from within
mc using the help facility. Additional information can be found in the source
distribution for mc: read the README, FAQ, and documents in the /doc
directory.
<P>
While I've attempted to cover most of the important features which mc offers
there are many more that I've not had time to cover that I'll leave for you to
discover! One suggestion would be to print out a copy of the mc manual page:
<PRE>
man mc | col -b | lpr -
-OR-
man mc | col -b > mc.txt
</PRE>
will print a copy of the manual page or save it to a text file which can be
further processed. Since the manual is quite long you might want to use a
program such as <B>a2ps</B> which converts ASCII files into Postscript. As
with most UNIX-type programs, a2ps has a slew of command line options
including the <KBD>-f</KBD> option which lets you specify the font size:
select something in the range of 7.0 to 9.0 to get a small font which cuts
down on the number of pages and leaves large margins in the sides for you to
scrawl notes in.
<P>
Also, while you are exploring, look through the <B>Options</B> menu for
various items which will let you customize mc. Menus are a great place to
poke around and see what facilities mc offers: most of the shortcut keystrokes
I've mentioned are menu items (so you don't have to memorize the entire list
of keystrokes!). For the adventurous:
<UL>
<LI>Have a look at the undelete file system if you are using ext2 under
Linux. You'll need the ext2progs distribution and libext2fs.a to
compile this support into mc.
<P>
<LI>Read about customizing the User Menu (this requires some knowledge of
shell programming and so was skipped in this introduction).
<P>
<LI>Read about customizing the Extension file which associates a file
extension with various actions (such as &quot;viewing&quot; or
&quot;opening&quot;).
</UL>
<P>
Finally, enjoy mc! As with many powerful programs, you'll most likely learn
it incrementally, often just through the process of exploration and
&quot;playing with it.&quot; I've found mc to be indispensable and, with a
bit of experience, I suspect that you will as well. Have fun!
<P>
<FONT SIZE=-1>
Date Last Modified: $Date: 2003/02/03 21:50:18 $
</FONT>
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<CENTER>
<IMG ALT="Linux Weekend Mechanic" SRC="../gx/fisk/wkndMech.gif" ALIGN=BOTTOM
WIDTH=397 HEIGHT=150>
<H1>Welcome to The Linux Weekend Mechanic!</H1>
<H2>Published in the December, 1997 Edition of the Linux Gazette</H2>
<FONT SIZE="2"><B>
Copyright &#169; 1997 John M. Fisk &lt;fiskjm@ctrvax.vanderbilt.edu&gt;<BR>
The Linux Gazette (tm) is Copyright &#169; 1997 <A HREF="http://www.ssc.com/">
Specialized Systems Consultants Inc.</A>
</B></FONT>
</CENTER>
<P><HR><P>
<!-- WELCOME SECTION ================================================== -->
<CENTER>
<A NAME="welcome">
<IMG SRC="../gx/fisk/welcome2.gif" WIDTH=555 HEIGHT=131 ALIGN=TOP
ALT="Welcome to the WM"></A>
</CENTER>
<P>
Hello y'all! Thanks for dropping in. I'm afraid that this month's weekend
mechanic is going to be a bit sparser that usual. This semester has been a
good deal more challenging than previous. I've been taking Compiler Design,
Database Design, Computer Graphics (X Window based course), and Differential
Equations and I'm really starting to &quot;suck wind&quot; about now (and I
see <I>lots</I> of knowing smiles and folks waving white hankies out in the
audience :-). To all of you in school, my sincerest best wishes!
<P>
And once again, my 'ol Linux box has pulled though in the clutch. I've been
leaning on it pretty heavily this semester and it's shown what a fantastic
work horse it really is.
<P>
In the compiler class we're building a &quot;baby Pascal-like&quot; compiler
using C++ and while others sit for endless hours in the computer lab hacking
away on the HP system at school, I've been sitting for endless hours hacking
comfortably at home on my Linux box! It doesn't make the hours fewer, but
it sure makes them more enjoyable! I've also been playing around with <A
HREF="http://www.postgresql.org/">PostgreSQL 6.2</A> and
<A HREF="http://www.tcx.se/">MySQL</A> RDBMS's and they have been a HUGE
amount of fun and a great means of learning SQL and database design. When
things here settle down a bit I'll be writing a bit about these.
<P>
For my DiffEq class I finally broke down and purchased the venerable
<A HREF="http://www.wolfram.com/">Mathematica 3.0 for Linux</A> from the
good folks at Wolfram Research. This has been a godsend and a wonderful toy
to tinker with! I'll refrain from getting on the soap box about this one, but
will say that it is a fantastic program and would HIGHLY encourage anyone in a
mathematics-oriented discipline to invest in it. For the curious, here's a
&quot;hot off the press&quot; screen-shot of what I've been up to this weekend:
plowing through a DE take-home exam (and don't worry, our instructor, who's a
delightful and brilliant guy, gave us the OK to use &quot;whatever technology
you have at your disposal...&quot; :-)
<P>
Here's the obligatory thumbnail: click on it to get the full (~88K) 1024x768
effect - kinda like being there...!
<P>
<A HREF="./gx/fisk/mathematica.gif">
<IMG SRC="./gx/fisk/mathematica_icon.gif" WIDTH=100 HEIGHT=75>
</A>
<P>
For the curious, this was the question about a damped oscillator whose angle
of deflection was given by the equation:
<PRE>
&Oslash;'' + 0.25 &Oslash;' + sin&Oslash; = 0
</PRE>
In which &Oslash; is meant to be theta, the angle of deflection. The graph is
the time series plot of the corresponding system of non-linear differential
equations with starting values at (0,2), (0,3), and (0,4). Mathematica has
been fantastic and, more to the point, they provide a Linux Student Version.
If you're serious about wanting to see high quality software for Linux, then
&quot;speak with your feet&quot; (or rather, your wallet :-). If I were doing
the <I>Tucows</I> thing, these guys would get the whole herd!
<P>
And finally, I've been doing a slew of X window based programming using Xlib
and now Motif for my Computer Graphics course. Once again, Linux has meant
being home at night rather than 40 miles away sitting in the student lab
hacking on the X system at school. I've mentioned it before but it's worth
repeating good praise: I bought <A HREF="http://www.redhat.com/">RedHat</A>
Motif 2.0 a couple years ago at the Linux Expo and haven't had a single problem
with it despite a good deal of use. If you're shopping for Motif then I'd
definitely have a look at this product. On the other hand, I've heard reports
that the &quot;Hungry Programmers&quot; have been making serious strides in
bringing the LessTif product to maturity. Here's a quote from a recent 0.81
distribution:
<PRE>
LessTif 0.81 has just been released. LessTif is a freely available Motif
clone. It is going to be source level compatible with Motif 1.2. It is
distributed under the terms of the GNU Library General Public License (LGPL).
LessTif is available from the following URL's
<A HREF="http://www.hungry.com/products/lesstif/">
http://www.hungry.com/products/lesstif/</A>
<A HREF="ftp://ftp.hungry.com/pub/hungry/lesstif/">
ftp://ftp.hungry.com/pub/hungry/lesstif/</A>
or
<A HREF="http://www.lesstif.org/products/lesstif/">
http://www.lesstif.org/products/lesstif/</A>
<A HREF="ftp://ftp.lesstif.org/pub/hungry/lesstif/">
ftp://ftp.lesstif.org/pub/hungry/lesstif/</A>
</PRE>
I haven't had a chance yet to compile and install it but a number of programs,
such as the latest DDD debugger, claim to be compilable using Lesstif.
<H3>And Now For Our Feature Presentation...</H3>
<P>
As I mentioned above, time has been a bit short here recently although over a
short Fall Break a couple weeks ago I did manage to write up a short article
for the <A HREF="http://www.ssc.com/lj/">Linux Journal</A> on the <B>Midnight
Commander</B> file manager. They have very graciously allowed me to include
the full text of this here. This is the unedited, first-draft copy that was
sent to them, so all the typos and other egregiosities are solely mine. I
have long wanted to write about this fantastic file manager which, in my book,
is a definite &quot;must have&quot; app on every Linux system. This is geared
towards an introduction/overview, and while admittedly not encyclopedic, it
does cover most of the highlights (I think... :-) Here it is:
<H3><A HREF="./wkndmech_dec97/mc_article.html">An Introduction to the Midnight
Commander</A></H3>
<P><HR><P>
<!-- CLOSE UP SHOP ================================================ -->
<CENTER>
<A NAME="closeup">
<IMG SRC="../gx/fisk/closing.gif" WIDTH=555 HEIGHT=95 ALIGN=BOTTOM
ALT="Closing Up Shop">
</A></CENTER>
<P>
Again, I apologize for such a short column after so long a hiatus. As all
of the graduating seniors will attest, the final semester usually packs quite
a wallop and mine has been no different. Good news is, by the time you read
this I'll be nearly done: GRE Comp Sci Subjects are on December 13th at 2:00
PM.
<P>
And then... sleep :-)
<P>
I'll be working with the good folks in
<A HREF="http://www.mc.vanderbilt.edu/">Biomedical Informatics at the
Vanderbilt University Medical Center</A> here in Nashville for the following
six months or so and then, hopefully, I'll be starting a Medical Informatics
fellowship or MS program in Comp Sci somewhere. In the interim, I have a
large and growing list of backlogged projects and things I'd like to read
up on, tinker with, and learn about. By January, I'm hoping to have the
Weekend Mechanic column back up to speed.
<P>
My deepest and sincerest thanks to <B>Marjorie Richardson</B> and the rest of
the crew at <A HREF="http://www.ssc.com/">Specialize Systems Consulting</A>
who have worked extraordinarily hard at providing the Linux Gazette. Special
thanks are also deserving to <B>Mr. Richardson</B>, who has shouldered the
burden of &quot;Linux Gazette Editor&quot; this month!
<P>
Finally, from our home to yours, we want to wish y'all a very wonderful and
joyous Christmas Season.
<P>
John &amp; Faith Fisk<BR>
Nashville, TN<BR>
<!-- END CLOSE UP SHOP ================================================ -->
<P><HR><P>
<CENTER>
<IMG SRC="../gx/fisk/mailme2.gif" ALT="Mail Me a Note" ALIGN=BOTTOM WIDTH=398
HEIGHT=54><BR>
</CENTER>
<P>
Got any comments, suggestions, criticisms or ideas?<BR>
Feel free to drop me a note at:<BR>
<ADDRESS> John M. Fisk
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu">
&lt;fiskjm@ctrvax.vanderbilt.edu&gt;</A>
</ADDRESS>
<P>
<FONT SIZE=-1>
Document Information:<BR><B>
$Id: issue23.html,v 1.3 2003/02/03 21:50:18 lg Exp $
</B>
</FONT>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, John M. Fisk <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./successtory.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./x3270.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>x3270 and Linux</H2>
<H4>By Chris Mason,
<a href="mailto:h.c.mason@lmco.com">h.c.mason@lmco.com</a></H4>
</center>
<P> <HR> <P>
Everyday I have to logon to The MVS (Multiple Virtual Storage) Operating
System and edit COBOL (Common Business Oriented Language) program source code.
When I first started being a COBOL programmer in 1985, we all used dumb
terminals such as the IBM 3278. As time passed, people starting getting
IBM PC compatibles and such things as IRMA cards were used to connect
the IBM PC to the Mainframe and make it look like a dumb terminal.
<P>After receiving an IBM PC compatible myself, I added an extra SCSI
harddisk and installed Linux. Using Linux's TCP/IP capability,
and the driver for the 3COM ethernet card in the computer, I was
able to connect Linux to the network.
<P>I began to try to logon to the IBM Mainframe. I found that there
were several differences between the standard Telnet VT100 terminal
model and the IBM 3270 terminals. I needed a new tool so that I
could use the features of the IBM 3270 such as function keys.
<P>Fortunately, there are two tools to emulate the IBM 3270 type
terminal. One is known as tn3270, and the other is x3270.
<P>X3270 is a program that is available with man Linux distributions
and is available on ftp.x.org and other mirror sites.
<P>As a mainframe programmer, I have noticed the following advantages
over a dumb terminal:
<OL>
<LI>x3270 can print the screen contents on a network printer and
is easily configurable.
<LI>Key strokes can be mapped to the 3270 keys.
<LI>x3270 can operate under a script, or run a script, allowing
automated logons and data entry tasks.
<LI>There is a type-ahead feature. The dumb terminal won't accept
extra characters, but linux will.
</OL>
<P>X3270 comes with various resources that can be configured by
the user. Here is contents of my .Xdefaults file apropos x3270:
<pre>! Set the font used in the x3270 screen:
x3270.emulatorFont: 3270-12
! Set the model of 3270 family terminal
x3270.model: 3
! Set the default print command:
x3270.printTextCommand: lpr -Psmb
! Set the keymap translation to use. I found hp-pc to be the most
! compatible:
x3270.keymap: hp-pc
! The below is a user keymap which allows me to override the
! default keymapping. This way I can set the previous (page up)
! key to PF7 which is set to PREV on most ISPF edit panels,
! and page down to PF8 which is DOWN on edit
! EraseEOF is a function to erase a field to end of field
! here I map both ctrl delete and alt delete to this function.
x3270.keymap.hp-pc.user: \
&lt;Key&gt;Prior: PF(7)\n\
&lt;Key&gt;Next: PF(8)\n\
Ctrl&lt;Key&gt;Delete: EraseEOF()\n\
Meta&lt;Key&gt;Delete: EraseEOF()\n
</pre>
<P>X3270 has several other features. One nice feature is the file
/usr/lib/X11/x3270/ibm_hosts which contains a list of IBM hosts
to appear on a logon menu.
<P>I would say that this is a great program and makes logining on to
an IBM Mainframe a breeze.
<P>X3270 comes with manual pages and some documentation. Here are the
copyrights from the x3270 manual page:
<P><B>COPYRIGHTS</B>
<P>Modifications Copyright 1993, 1994, 1995, 1996, 1997 by Paul Mattes.
Original X11 Port Copyright 1990 by Jeff Sparkes.
Permission to use, copy, modify and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in supporting
documentation.
<P>Copyright 1989 by Georgia Tech Research Corporation, Atlanta, GA 30332.
All rights Reserved. GTRC hereby grants public use of this software.
Derivative works based on this software must incorporate this copyright
notice.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Chris Mason<BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./wkndmech_dec97/wkndmech.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./lg_backpage23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<center>
<H1><IMG SRC="../gx/backpage.gif" alt="Linux Gazette Back Page"></H1>
<H5>Copyright &copy; 1997 Specialized Systems Consultants, Inc.<br>
For information regarding copying and distribution of this material see the
<A HREF="../copying.html">Copying License</A>.</H5>
</center>
<P> <hr> <P>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_backpage23.html#authors">About This Month's Authors</a>
<li><a HREF="./lg_backpage23.html#notlinux">Not Linux</a>
</ul>
<a name="authors"></a>
<P> <HR> <P>
<!--======================================================================-->
<center><H3> About This Month's Authors </H3></center>
<P> <HR> <P>
<!--======================================================================-->
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Wayde Allen</H4>
Wayde Allen is an Electrical Engineer involved with the maintenance and
development of the U.S. primary rf power standards at the National
Institute of Standards and Technology (NIST). He has been using Linux
as his primary computing platform for about three years, and was
instrumental in the formation of the Boulder Linux Users Group.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Larry Ayers</H4>
Larry Ayers lives on a small farm
in northern Missouri, where he is currently engaged in building a
timber-frame house for his family. He operates a portable band-saw mill,
does general woodworking, plays the fiddle and searches for rare
prairie plants, as well as growing shiitake mushrooms. He is also
struggling with configuring a Usenet news server for his local ISP.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Andr&eacute; D. Balsa</H4>
Andr&eacute; Balsa lives in France, 80 miles south of Lyon. He currently runs
a small Internet consulting business. When not busy exploring Linux
performance issues, Andrew likes to spend his time with his 1-year old
daughter, or else try different French recipes on his friends.
He also helped set up the Linux Benchmarking Project pages at
<A HREF="http://www.tux.org/bench/">http://www.tux.org/bench/</A>.
and a web site at <A HREF="http://www.tux.org/~balsa/linux/cyrix">
http://www.tux.org/~balsa/linux/cyrix</A>,
about the use of Cyrix 6x86 processors with Linux,
which has had more than 9,000 visitors in less than two months uptime.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Chris Baron</H4>
Chris is employeed as IBM Mainframe COBOL Programmer at Lockheed-Martin
in Sunnyvale, California. His e-mail is <a
href="mailto:h.c.mason@lmco.com">h.c.mason@lmco.com</a>.
He works as an IBM Mainframe COBOL Programmer and use an Application
under linux called x3270. Perhaps others might be interested
in using this program because IBM 3270 terminals are hard to come by.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Jim Dennis</H4>
Jim Dennis
is the proprietor of <A href="http://www.starshine.org">
Starshine Technical Services</A>.
His professional experience includes work in the technical
support, quality assurance, and information services (MIS)
departments of software companies like
<A href="http://www.quarterdeck.com"> Quarterdeck</A>,
<A href="http://www.symantec.com"> Symantec/
Peter Norton Group</A>, and
<A href="http://www.mcafee.com"> McAfee Associates</A> -- as well as
positions (field service rep) with smaller VAR's.
He's been using Linux since version 0.99p10 and is an active
participant on an ever-changing list of mailing lists and
newsgroups. He's just started collaborating on the 2nd Edition
for a book on Unix systems administration.
Jim is an avid science fiction fan -- and was
married at the World Science Fiction Convention in Anaheim.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Carlie Fairchild</H4>
Carlie Fairchild is an Advertising Representative and Marketing expert for
<I>Linux Journal</I>.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">John M. Fisk</H4>
John Fisk is most noteworthy as the former editor of the <I>Linux Gazette</I>.
After three years as a General Surgery resident and
Research Fellow at the Vanderbilt University Medical Center,
John decided to &quot:hang up the stethoscope&quot:, and pursue a
career in Medical Information Management. He's currently a full
time student at the Middle Tennessee State University and hopes
to complete a graduate degree in Computer Science before
entering a Medical Informatics Fellowship. In his dwindling
free time he and his wife Faith enjoy hiking and camping in
Tennessee's beautiful Great Smoky Mountains. He has been an avid Linux fan,
since his first Slackware 2.0.0 installation a year and a half
ago.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Michael J. Hammel</H4>
Michael J. Hammel,
is a transient software engineer with a background in
everything from data communications to GUI development to Interactive Cable
systems--all based in Unix. His interests outside of computers
include 5K/10K races, skiing, Thai food and gardening. He suggests if you
have any serious interest in finding out more about him, you visit his home
pages at http://www.csn.net/~mjhammel. You'll find out more
there than you really wanted to know.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Mike List </H4>
Mike List is a father of four teenagers, musician, printer (not
laserjet), and recently reformed technophobe, who has been into computers
since April,1996, and Linux since July.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Giampaolo Montaletti</H4>
The old Monty is living in Italy and is a 36 years old guy, working as an
economist at the <a href="http://www.rer.camcom.it">Regional association
of the Chamber of Commerce</a> in Bologna (do you know Rimini?).
The old Monty is manager for many projects involving networks,
intranets, electronic commerce and so on, many of them granted by European
and national foundations. He like to eat, drink red wine and apple
distilled calvados.
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Jesper Pedersen</H4>
Jesper Pedersen lives in Odense, Denmark, where he has studied computer science
at Odense University since 1990. He expects to obtain his degree in a year and
a half. He has a great job as a system manager at the
university, and also teaches computer science two hours a week. He is very
proud of his &quot;child,&quot; The Dotfile Generator, which he wrote as part of his
job at the university. The idea for it came a year and a half ago, when he had
to learn how to configure Emacs by reading about 700 pages of the lisp manual.
It started small, but as time went by, it expanded into a huge project.
In his spare time, he does Yiu-Yitsu, listens to music, drinks beer and has fun with
his girl friend. He loves pets, and has a 200 litre aquarium and two very cute
rabbits.
<a name="notlinux"></a>
<P> <hr> <P>
<!--====================================================================-->
<center><H3> Not Linux </H3></center>
<P> <HR> <P>
<!--======================================================================-->
<P>
Thanks to all our authors, not just the ones above, but also those who wrote
giving us their tips and tricks and making suggestions. Thanks also to our
new mirror sites.
<P>
<IMG ALIGN=bottom ALT="" SRC="../gx/rose.gif">
While I'm passing out thanks I must include Amy Kukuk and Margie
Richardson,
who have done much of the work to get this issue out. Margie has been
working hard to get me up to speed on this task, but I've still a ways to
go. My professional background has been in the oil business as a
geophysicist, where I usually worked on dumb terminals connected to IBM
mainframes or Digital minicomputers. At home I've been a Macintosh man for
many years, so learning Linux/Unix, vi and HTML all at once has been, shall
we say, exciting.
<p>
As Margie has indicated in the past, we share a passion for the outdoors
which we satisfy via camping and motorcycling. With winter close upon us now my
adult son, Keith, and I will likely turn to cross country skiing in favor
of motorcycling. Although I've not done so lately, I also fly as a private
pilot and am rated for both single engine land and sea planes.
<p>
<IMG ALIGN=right ALT="Turkey" SRC="./gx/turkey.gif">
This last week of the month of November Margie and I indulged in that most American of
pastimes--eating too much at the Thanksgiving table. We split cooking duties
with my sister, Roxanne, who also hosted. The afternoon was grand, the
food great, and we even came home with enough leftover turkey meat
for several days worth of sandwiches.
<p>
As a final note, Margie and I will be out of town for the Christmas
holidays, so expect the next issue of <i>Linux Gazette</i> to be a little
late coming out.
<p>
Have fun!
<P> <hr> <P>
Riley P. Richardson<br>
Editor, <i>Linux Gazette</i> <A HREF="mailto:gazette@ssc.com">gazette@ssc.com</a>
<P> <HR> <P>
<!--====================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT
PAGE ]"></A>
<A HREF="./x3270.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<p><hr><p>
<I>Linux Gazette</I> Issue 23, December 1997, <A
HREF="http://www.linuxgazette.com/">http://www.linuxgazette.com/</A><BR>
This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P>
</BODY>
</HTML>