2002 09 19


                    LINUX NEWS
        Resources & Links From CramSession.com
           September 19, 2002 - Issue #99


TABLE OF CONTENTS

1) Sean’s Notes

2) Linux News

XFS Enters the Kernel
KDE and GNOME Brought Together in Null
Xandros Beta 3 Preview
Installing NVIDIA Drivers

3) Linux Resources

Where The Jobs Are
More on Certifications
Intrusion Detection
Develop Rock Solid Code in PHP
    Headline

4) App o’ the week

~~~~~~~~~~~~~~~~~~~~~~ ADVERTISEMENT ~~~~~~~~~~~~~~~~~~~~~~~

Better Practice Tests at a Better Price

PrepLogic is raising the bar. You deserve the highest quality practice tests but you shouldn’t have to pay the highest price. Our practice tests are written by experienced Certified IT Professionals and designed to help you pass the first time. PrepLogic gives you superb, affordable quality. Still not convinced? Download a FREE demo or buy it and try it!

http://ad.brainbuzz.com/?RC06&AIV43







For information on how to advertise in this newsletter
please contact mailto:adsales@CramSession.com or visit
http://cramsession.com/marketing/default.asp


-------------------------
1) Sean's Notes
-------------------------

UNIX has some really great inter process communication (IPC)
features.  Processes can share memory with each other, they
can send data over sockets and pipes, they can synchronize
with semaphores, and more.  Most of this is done through
system calls, but today I'll show you a technique that lets
you do it through the command line.

A "FIFO" is otherwise known as a named pipe.  FIFO stands
for "First In, First Out".  So, you throw two things into a
FIFO, they'll come out of it, in order.  Think of it like a
one lane tunnel...  Cars go in, and they have to come out
the other end in the same order.  With a FIFO, we can have
one process write, and the other process read.  We'll see
that like everything else in Unix, a FIFO is just a file, so
the reader and writers are none the wiser!

A simple example...

Open two terminal sessions.

In the first, run:

$ mkfifo output
$ echo "hi" > output

The first line builds our FIFO:

$ ls -l output
prw-rw-r--    1 sean     sean          0 Sep 18 20:23 output

The 'p' as the first letter in the permissions tells us that
this file is a pipe.  The second line simply dumps the
string "hi" to the output.  Note how the command "blocks",
that is, it doesn't return.  That's because the FIFO needs
someone to read it.

In the other terminal window, see what's in the FIFO:

$ cat output
hi


You'll also notice that the first window returns you to the
shell prompt.  Let's try something a bit different, namely
slowly feeding data to the FIFO without closing the file.

In your first terminal window, run:

$ perl -e 'open A, ">output";
  while (1) { print A `date`; sleep 1 }'


(this script opens the FIFO for writing, and continuously
prints the date and time every second)

In your second window run,

$ cat output

You'll see that data comes through the pipe, as expected.
When you stop one end, the other stops.  If you close the
reader (terminal #2), the writer says "broken pipe".  Close
the writer, and both exit gracefully.  That's because an end
of file is transmitted in the second case, but, in the first
case, there is just an abrupt closure.


What use is this portal we've created?  The original use I
learned thistechnique on was to compress the output of
tcpdump on the fly:

# mkfifo output
# gzip -c < output > output.gz &
# tcpdump -i eth0 -w output

Here, we create the FIFO in line one.  The second line
continually reads from the FIFO, and passes it through gzip
(to compress), and redirects the output the output.gz as a
compressed stream.  The ampersand (&) tosses it in the
background so that terminals aren't chewed up with blocked
processes.  Finally, tcpdump is run, with the output to the
FIFO.  Presto, the output is compressed without needing any
extra disk space.

Another use would be to have syslogd log to a FIFO, and then
pass it through an existing script that looks for key words
and flags alerts. For secure applications, a privileged
program could write to the FIFO, and have a lower level,
unprivileged, program read and process the output.


FIFOs are another powerful tool in the sysadmin's arsenal.
It'll let you hook two programs together that might normally
not speak, or to separate privilege levels.  It also speaks
volumes about the general design of the operating system --
as the admin, you have absolute control over the flow and
operation of your box.  Try doing that with your mouse!!!

Long live the Penguin,

Sean
swalberg@cramsession.com

-------------------------
2) Linux News
-------------------------

-------------------
XFS Enters the Kernel
-------------------
Kernel 2.5.36 marks the event where SGI's XFS becomes part of
the base Linux kernel.  While there are other journaling file
systems already there, this is one that's got some heritage
behind it, not to mention that it's been designed with
performance in mind.

http://lwn.net/Articles/9998/


-------------------
KDE and GNOME Brought Together in Null
-------------------
The next version of Red Hat, codenamed "Null", ships with the
GNOME and KDE desktops looking very similar.  This has drawn
the ire of people who worked hard to make these default
desktops look better than the other.  The manager of Red Hat's
desktop responds, putting any conspiracy theories to rest.
I, for one, think this is a great idea.

http://people.redhat.com/otaylor/rh-desktop.html


-------------------
Headline
-------------------
"Sun Microsystems will give away its StarOffice software to
ministries of education in Europe and Africa, the company is
expected to announce Tuesday, in an effort to undermine rival
Microsoft."

http://zdnet.com.com/2100-1104-958165.html


-------------------
Xandros Beta 3 Preview
-------------------
Xandros is the company that picked up the Corel Linux
distribution, and has apparently been pretty busy.  Here's
a review of their upcoming product.

http://www.osnews.com/story.php?news_id62

-------------------------
3) Linux Resources
-------------------------


---------------
Installing NVIDIA Drivers
---------------

NVIDIA distributes binary drivers for their 3D cards,
requiring both some kernel work and some digging in the X
server configuration.  This can be difficult if you've never
done it before, but the following article can guide you.

http://linuxjunkies.com/modules.php?name=Sections&op=viewarticle&ar
tid=1


-------------------
Where The Jobs Are
-------------------
Here's an interesting look at where Linux related jobs are,
what you need to snag them, and some other general tidbits.
Although it misses the fact that many jobs aren't
advertised, on the whole it has some good advice.

http://www.linuxjournal.com/article.php?mode=nested&sidb71

-------------------
More on Certifications
-------------------
This article looks at the return on investment of various
certifications, including Linux ones.  I found it interesting
that in the small solution provider realm, the RHCE is far
behind in ROI, but is number one in terms of the employers'
willingness to pay for all the costs.

http://www.crn.com/sections/special/certification/certification.asp
?ArticleID6937



-------------------
Intrusion Detection
-------------------
Security geek RobnHood has put together a good introduction to
intrusion detection, including a primer on getting Snort and
ACID speaking together.

http://infocenter.cramsession.com/techlibrary/gethtml.asp?ID92


-------------------
Develop Rock Solid Code in PHP
-------------------
Here's a link to the second part of a two part series in
developing rock solid code using PHP.  It has good advice on
making things easier to configure, and general coding practices
that will help you develop better (and more secure) code.

http://www-106.ibm.com/developerworks/web/library/wa-phprock2/?t=gr
,lnxw06=PHBvariables2


-------------------------
4) App o' the week
-------------------------

Looking for a cool, automated, way to store FAQs on the web,
and let people submit changes?  FAQ-O-Matic is for you!  It's
remarkably configurable, and easy to set up.

http://faqomatic.sourceforge.net/

-------------------------
(C) 2002 BrainBuzz.com, Inc. All Rights Reserved.
-------------------------

-------------------------

          This message is from CramSession

You are currently subscribed to the following list
   Hottest Linux News and Resources
   as: sean@ertw.com

To un-subscribe from this newsletter by e-mail,
   send a blank email message to:
   mailto:leave-linuxnews-3825955Y@list.cramsession.com

To subscribe to this newsletter and many others visit
our site at:
http://newsletters.cramsession.com/signup/default.asp

-------------------------------------------------------