Cramsession Linux Newsletter

Cramsession.com Linux News Archive

Please note that I've stopped writing the Linux News as of January 30, 2003, as Cramsession has cancelled most of their newsletters. You can send any questions or comments about this content to me (sean at ertw . com)
People have been asking for a downloadable version of the archives. [My mbox (one big file, 1.4MB)] [Individual files, text, tarball] [Individual files, html, tarball]
If you're looking for more Linux content, you might like my blog.
Jan 30, 2003
  Linux News - Issue #117
Jan 23, 2003
  Linux News - Issue #116
Jan 16, 2003
  Linux News - Issue #115
Jan 9, 2003
  Linux News - Issue #114
Jan 2, 2003
  Linux News - Issue #113
Dec 19, 2002
  Linux News - Issue #112
Dec 12, 2002
  Linux News - Issue #111
Dec 5, 2002
  Linux News - Issue #110
Nov 28, 2002
  Linux News - Issue #109
Nov 21, 2002
  Linux News - Issue #108
Nov 14, 2002
  Linux News - Issue #107
Nov 7, 2002
  Linux News - Issue #106
Oct 31, 2002
  Linux News - Issue #105
Oct 24, 2002
  Linux News - Issue #104
Oct 17, 2002
  Linux News - Issue #103
Oct 10, 2002
  Linux News - Issue #102
Oct 3, 2002
  Linux News - Issue #101
Sep 26, 2002
  Linux News - Issue #100
Sep 19, 2002
  Linux News - Issue #99
Sep 12, 2002
  Linux News - Issue #98
Sep 5, 2002
  Linux News - Issue #97
Aug 29, 2002
  Linux News - Issue #96
Aug 22, 2002
  Linux News - Issue #95
Aug 15, 2002
  Linux News - Issue #94
Aug 8, 2002
  Linux News - Issue #93
Aug 1, 2002
  Linux News - Issue #92
Jul 25, 2002
  Linux News - Issue #91
Jul 18, 2002
  Linux News - Issue #90
Jul 11, 2002
  Linux News - Issue #89
Jul 4, 2002
  Linux News - Issue #88
Jun 27, 2002
  Linux News - Issue #87
Jun 20, 2002
  Linux News - Issue #86
Jun 13, 2002
  Linux News - Issue #85
Jun 6, 2002
  Linux News - Issue #84
May 30, 2002
  Linux News - May 30, 2002
May 23, 2002
  Pearl In The Shell
May 16, 2002
  Linux Filesystems - Part Two
May 9, 2002
  Inside The Linux Filesystem
May 2, 2002
  CD Burning Under Linux
Apr 25, 2002
  Star Office Vs. Open Office
Apr 18, 2002
  Surfing With Mozilla
Apr 11, 2002
  "We Don't Support Linux..."
Apr 4, 2002
  Visit The UNIX Library
Mar 28, 2002
  Linux and World Domination
Mar 21, 2002
  Working With Keyservers
Mar 14, 2002
  A Look At Public Key Cryptography
Mar 7, 2002
  Monitoring Systems With "vmstat"
Feb 28, 2002
  Star Office 6 Not to be Free for Linux?
Feb 21, 2002
  How Can Programming Benefit a Systems Administrator?
Feb 14, 2002
  Alias: It's Not Just a TV Show
Feb 8, 2002
  Using The diff and patch Utilities
Jan 31, 2002
  How To Detect Cracks
Jan 24, 2002
  Using Razor to Shave Away Spam
Jan 17, 2002
  Stomping Spam
Jan 10, 2002
  Sair Linux Courseware Review
Jan 3, 2002
  2002: The Year of the Penguin!
Dec 27, 2001
  UNIX Apps on a Windows Box?
Dec 20, 2001
  Directory Assistance
Dec 13, 2001
  How Do You Kill Zombies?
Dec 6, 2001
  Using Hard and Soft Symlinks
Nov 29, 2001
  Change Terminal-Based Apps Into Network Apps
Nov 22, 2001
  Adventures In Booting
Nov 15, 2001
  Getting To Know PAM
Nov 8, 2001
  Know Your Enemy
Nov 1, 2001
  Do Mulder and Scully Use X-Windows?
Oct 25, 2001
  A Quick Look at the RHCE Certification
Oct 18, 2001
  What's Up With Linux Certification?
Oct 11, 2001
  Express Yourself Regularly
Oct 4, 2001
  Advice For Lazy Penguins?
Sep 27, 2001
  NVIDIA Jumps On Linux Bandwagon
Sep 20, 2001
  Understanding DNS in a Linux Environment
Sep 13, 2001
  Be Careful With Binaries
Sep 6, 2001
  Party Like It's 999,999,999
Aug 30, 2001
  Rooting Out Memory Hogs
Aug 23, 2001
  Spin Your 'Top'
Aug 16, 2001
  Keeping Time With NTP
Aug 9, 2001
  Supporting True Type Fonts
Aug 2, 2001
  Getting Perl To Fetch
Jul 26, 2001
  Who's The Man?!
Jul 19, 2001
  Adobe Cracks The DMCA Whip
Jul 12, 2001
  Due Processes
Jul 5, 2001
  Going Adobe Free
Jun 28, 2001
  Don't Send Mixed SIgnals
Jun 21, 2001
  Everything is a File. (almost)
Jun 14, 2001
  Know Your Partitions
Jun 7, 2001
  Where it's "at"!
May 31, 2001
  A Sneak Peek at RedHat 7.1
May 24, 2001
  Scheduling Tasks With cron - Part 2
May 17, 2001
  Scheduling Tasks With cron
May 10, 2001
  Open Source - Seeing Through The FUD
May 3, 2001
  A Look At Ximian's New Release
Apr 26, 2001
  Rev Up Your X-Windows Session
Apr 19, 2001
  Wrangling With GNU Cash
Apr 12, 2001
  Tame the syslogd Daemon
Apr 5, 2001
  Test Your Admin Skills At Honeynet
Mar 29, 2001
  Software RAID on Your Linux Box
Mar 22, 2001
  Prevent Disasters: Back It Up
Mar 15, 2001
  Notes From Underground!
Mar 8, 2001
  SuSE 7.1 - A First Look
Mar 1, 2001
  Certification Boot Camp
Feb 22, 2001
  Understanding Runlevels
Feb 15, 2001
  What Are The Advantages of Joining a LUG?
Feb 8, 2001
  Diving For Perls
Feb 1, 2001
  How To Secure Your Linux Installation
Jan 25, 2001
  Linux Problem Solving
Jan 18, 2001
  Stand up and Be Counted!
Jan 11, 2001
  2.4.0 is Here!
Jan 4, 2001
  When will Mom use Linux?
Dec 28, 2000
  The Year in Review
Dec 21, 2000
  The SourceForge Solution
Dec 15, 2000
  How to Compile and Install the New Kernel
Dec 7, 2000
  Put Your E-mail Into A Blackberry Basket
Nov 30, 2000
  Using Perl With Linux
Nov 23, 2000
  Working With MP3's Under Linux
Nov 16, 2000
  Apache 2.0 alpha 4
Nov 9, 2000
  Dell loves Linux!
Nov 2, 2000
  What's Up With RedHat 7?
===========================================================
                        LINUX NEWS
            Resources & Links From CramSession.com
                Thursday, December 13, 2001
===========================================================

-----------------
TABLE OF CONTENTS
-----------------

1) Sean's Notes

2) Linux News

	2.4 Maintainer Marcelo Tosatti Answers Your Questions
	Red Hat Starts Clamping Down
	Ximian to Offer Proprietary Exchange Connector
	VA Linux is now VA Software

3) Linux Resources

	DNS For Dummies
	Some Linux+ Practice Questions
	Bynari Insight 2.6 Free Download
	Multicast Video Server
	What Are Your Expectations?

4) App o' the Week


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

Get your hands on the best training resources available for
Win2K certifications. Unmatched quality at an incredibly low
price gets you $10,000 worth of training for only $299.

Click below to view a sample clip...
http://ad.brainbuzz.com/?RC06&AI$59

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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
===========================================================

Signals, in the Unix sense, are messages sent between
processes, much like an interrupt is a signal sent from the
hardware to the CPU.  I've talked about signals in the past:

http://ertw.com/~sean/newsletter/June+28%2C+2001

With respect to killing off processes, the "kill" command is
used to send a signal (SIGTERM) to a process, in this case,
processid 1234

# kill 1234

Upon receipt of the signal, the process gets the chance to
exit gracefully.  If it wasn't expecting the signal, the
operating system just turfs it.

Sometimes, processes misbehave.  They either ignore SIGTERM,
or maybe are stuck in IO and can't get time on the CPU to
quit.  In this case, we can send a stronger signal, SIGKILL.
There is no ignoring this one, and the kernel will do its
best to get rid of the process.

# kill -9 1234

However, there is a third class of processes that can't be
killed, no matter what signal you send them.  These are
called "zombies".  While they take up no CPU (because they're
technically dead), they're usually a symptom of another
problem with the application.  They also take up resources,
such as process table space.  Thus, dealing with zombies is
something a Unix admin will have to do at some point in their
career.  Rebooting is not an option, either!  You can see
zombies in the ps listing; they are marked with the <defunct>
tag.

At this point, it's probably a good thing if I explain parent
and child processes.  If a process wants to create a new
process to handle some work, it does so by calling the fork()
system call.  The operating system then creates a new process,
called a child process, which is exactly like the original,
or parent process.  Execution of both processes continues after
the fork() call.  Depending on the result of the call, the
process knows if it is the parent or the child.  A parent can
have many children, but the children can only have one parent.

A more in depth look at fork() can be found in the July 12th
edition of Linux News:

http://ertw.com/~sean/newsletter/July+12%2C+2001

This is commonly used in web servers.  The parent process
creates a bunch of children, and farms out the requests to
them.  This way, many requests can be handled simultaneously.

If the parent process quits before the child does, this is no
problem.  The child gets adopted by process #1, init.  However,
if the child dies before the parent, we have a problem.  Create
the following file, zombie1.c:

#include <stdlib.h>

void main(void) {
	int pid;

	printf("Parent's pid is %d\n", getpid());
	if ((pid = fork()) > 0) { /* Parent */
		while (1) sleep(10); /* Sit around */
	} else {  /* Child */
		sleep(1);
		printf("Child %d exiting\n", getpid());
		exit;
	}
}

Now compile, and execute it:

$ gcc zombie1.c -o zombie1
$ ./zombie1
Parent's pid is 24751
Child 24752 exiting

zombie1 basically creates a process, tells you the processid,
then creates a child.  The parent then idles, while the child
exits after printing its pid.

In another window, do a "ps -ef":
$ ps -ef
...
sean     24758 24675  0 18:09 pts/2    00:00:00 ./zombie1
sean     24759 24758  0 18:09 pts/2    00:00:00 [zombie1 <defunct>]
...

There -- process 24752 is a zombie.  It was supposed to have
quit, since it called exit().  Now, try to kill it.

$ kill -9 24759
$ ps -ef | grep zombie1
sean     24758 24675  0 18:09 pts/2    00:00:00 ./zombie1
sean     24759 24758  0 18:09 pts/2    00:00:00 [zombie1 <defunct>]

As many times as you try to kill the child, it isn't going to
go away.

So just how do you kill a zombie?

The answer isn't as exciting as you'd think.  To kill a zombie,
kill its parent.  The reason for this will shortly be evident.

$ kill 24758
$ ps -ef | grep zombie
$

If a process is creating zombie children, there is a good
chance that it's not operating correctly in the first place.
Left to its own devices, it'll do so until it brings the system
to its knees.  I should mention, though, that some applications
do create one or two zombies because of a design oversight, so
you'll have to become familiar with the natural behavior of
your applications.

The reason the zombie gets created is because of a negligent
parent.  When a child process dies, the parent process is
notified with the SIGCHLD signal.  The parent process must
either explicitly ignore the signal entirely, or install a
signal handler that uses the wait() system call to acknowledge
the child's exit.  As in life, there are responsibilities to
becoming a parent.  (OK, I'm done with the bad analogies for
this week).

zombie2.c will fix the problem by ignoring the SIGCHLD signal.

#include <stdlib.h>
#include <signal.h>

void main(void) {
	int pid;

	/* Ignore SIGCHLD to prevent zombies */
	signal(SIGCHLD, SIG_IGN);
	printf("Parent's pid is %d\n", getpid());
	if ((pid = fork()) > 0) { /* parent */
		while (1) sleep(10); /* Sit around */
	} else {
		sleep(1);
		printf("Child %d exiting\n", getpid());
		exit;
	}
}

$ gcc zombie2.c -o zombie2
$ ./zombie2
Parent's pid is 24847
Child 24848 exiting

In my other window:

$ ps -ef | grep zombie
sean     24847 24675  0 18:19 pts/2    00:00:00 ./zombie2

As you can see, the child (24848) got a clean exit, and the
parent (24847) can idle freely.

The alternative, to handle the SIGCHLD signal, is a bit more
work, but allows the parent to clean up after the child.  If
you're interested, check out the man page for wait(2) to see
how to properly acknowledge a child's exit.

Creating zombie processes is the operating system's way of
handling the odd situation where the child dies before the
parent.  In a properly designed application, there should not
be any zombie processes.  Zombies tend to be indicators of a
misbehaving application.  In this case, you can clean up all
the zombie children by killing the parent process (from ps -ef).

Long live the Penguin,

Sean
swalberg@cramsession.com

===========================================================
2) Linux News
===========================================================

-----------------------------------------------------
2.4 Maintainer Marcelo Tosatti Answers Your Questions
-----------------------------------------------------
Now that 2.5 is started, Linus has turned the job of
maintaining the 2.4 tree to Marcelo Tosatti, an 18-year-old
programmer from Brazil. In the latest Slashdot interview,
Marcelo answers some questions on his vision for 2.5, and
of course, questions about his age. The answers are terse
to say the least, but well worth the time to read.

http://slashdot.org/article.pl?sid/12/10/1656226&mode=nocomment

----------------------------
Red Hat Starts Clamping Down
----------------------------
Since it's freely downloadable, there is nothing stopping
someone from selling copies of Red Hat (or other distros, for
that matter) for cheap. Red Hat has started to clamp down on
this activity, insisting that if one redistributes the
software that it not be called Red Hat, since the CDs will
not come with any support. Personally, I think this is a
perfectly fine way of protecting their trademark, though once
you read the comments in this article, you'd think that the
company had committed murder...

http://www.newsforge.com/article.pl?sid/12/10/2014239

----------------------------------------------
Ximian to Offer Proprietary Exchange Connector
----------------------------------------------
Ximian is that company that brings a great GNOME desktop to
your Linux box. They have also put a lot of work into the
Evolution project, which is to create an Outlook-like
mail/calendar/etc. client for Linux. Their latest announcement
is that they'll soon be offering a connector that will let you
use Evolution with an Exchange server. Single user licences
are around $69, a pittance to pay if Outlook is the only
application that's keeping you running Windows.

http://techupdate.zdnet.com/techupdate/stories/main/0,14179,5100241
,00.html

---------------------------
VA Linux is now VA Software
---------------------------
VA Linux used to be a big vendor of Linux-ready hardware.
They're also the parent company of SourceForge and Slashdot,
among many others. To reflect the change of focus to
software, they've changed their name appropriately.

http://www.valinux.com/about/pr/120501.php

===========================================================
3) Linux Resources
===========================================================

---------------
DNS For Dummies
---------------
Here's another look at DNS, this time covering off everything
from the local resolver, to the BIND server itself. It's
written with Solaris in mind, though everything mentioned
is the same under Linux.

http://everythingsolaris.org/articles/dfd/frameset.html

------------------------------
Some Linux+ Practice Questions
------------------------------
Here are 25 Linux+ practice questions, complete with
explanations. What's good about these is that they're
intentionally ambiguous, which should help you get a feel
for what you can expect on the real exam. The assumptions
made are listed with the answer.

http://www.unixreview.com/documents/s81/urm0112b/0112b.htm

--------------------------------
Bynari Insight 2.6 Free Download
--------------------------------
I had to read this offer over a few times to figure out what it
was they were giving away. Version 2.6 of the Insight client
is an Microsoft Exchange compatible mail/calendar client for
Linux. 2.6 is not the latest version, though, as 3.0 is coming
out soon and that won't be free. However, a good thing is a
good thing, so I'll be trying this one out at work next week!

http://www.bynari.net/Products/TradeXCH/body_tradexch.html

----------------------
Multicast Video Server
----------------------
When I was studying for the Cisco Switching exam, I really
could have used some multicast software to test out multicast
network configurations. The software on this page will stream
out MPEG videos using multicasts, which cuts down on the
bandwidth required to serve up multiple clients.

http://www.videolan.org/vlms/

---------------------------
What Are Your Expectations?
---------------------------
One of the driving forces behind Linux's popularity is that
it is free. This means that most of the development of Linux
and its applications, is performed by volunteers. Sometimes
we tend to forget this. The AbiWord project's development
team decided to write down their thoughts on it.

http://www.abisource.com/support/expectations.phtml

===========================================================
4) App o' the week
===========================================================
Long time readers will recognize this link, but given the
latest Goner virus, I thought it fitting to repost.

The Anomy Mailtool filters incoming (and outgoing, if you
want) mail for possible viruses. You can hook in a commercial
virus scanner, but Anomy's strength lies in its ability to
act on filenames using regular expressions. I use it myself,
and it has caught new viruses without even touching the
configuration.

http://mailtools.anomy.net/

===========================================================
(C) 2001 BrainBuzz.com, Inc. All Rights Reserved.
===========================================================
_______________________________________________________

         This message is from CramSession.com.

You are currently subscribed to the
   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 by e-mail:
   send a blank email message to:
   mailto:join-linuxnews@list.cramsession.com
_______________________________________________________