by July 7, 2001 0 comments



Having
decided to use Linux and installing it, you’ll also need to keep track of
what goes on, which new software is out, updates to the distribution, etc.
Obviously, the right place to do all this is the Net. Tracking Linux on the
Net can get overwhelming, if you don’t have the correct starting points.
So, here are some good resources.

Along with the URLs, we’ll
give you a brief idea about the content of the site too. This’ll help you
nose-dive into the site that’s right for you, the first time round.

You can also go through the
fairly long list of Websites listed by category on the accompanying Linux CD
at /mnt/cdrom/PCQ/articles/index.html. The top bar gives you the categories
that point to the respective resources on the Net.

General

www.linux.org

All about Linux, its origins,
its flavors, and everything you ever wanted to know about Linux. Go there if
you want to show that geeky friend of yours that he doesn’t exactly live
in a crystal palace. The pages here will demystify Linux and make you want
to give it a try. The information is well indexed and you shouldn’t have
much trouble finding what you want. The fainthearted, the bull-headed, the
warriors, and the knights, whatever you are…this has something for each of
you.

www.linux.com

If you could
think of a company named Linux, this could be its Website. Latest
applications, articles-some very techie and some not so techie-dos and
don’ts, lots of tips…if you’re really into Linux, give this a shot.
There’s a lot of difference between Linux.com and the Linux.org. As the
name suggests, one is commercial and the other one, the official no-nonsense
site.

www.linuxdoc.org

This is the
official site of the Linux Documentation Project. You’ll find guides,
HOWTOs, mini HOWTOs , FAQs, manual pages, and Linux Gazette online magazine.

News

http://lwn.net

This is for
after you’ve taken that bold leap into Linux (I’m sure you’ll want to
stick with it). This site will help you keep in touch with the Linux world
and advances in Linux technology. The pros and cons, new releases, books,
patches, in short, anything that has changed, you’ll find it here.

www.slashdot.org

The essential
discussions room for praising, bashing, and whatever else you want to do. If
you feel like saying something, do it here. Sometimes, however, the argument
does get a bit too hot. In fact, once a guy said “Hey, just you and me,
after school, in the parking lot. Let’s go”.

Linux
kernel

www.kernelnotes.org,
www.kernel.org

So, you’ve
got Linux up and running on your machine; you’re content and all is
working fine. And then you decide to take a little peek inside. Did it scare
you? It’s time you came to these sites for hardcore Linux at work. Visit
these sites, and if you feel at home, then you’re in a very elite group.

Applications

With Linux very comfortably
lodged in your computer, you would no doubt want some applications to run.
If you know the type but don’t know the specifics or where to find them,
then it’s worth your time to give the sites here a look.

http://metalab.unc.edu/pub/Linux/welcome.html

Tons of
downloads, all well classified. You get all sorts of Linux software here,
including full distributions and demos of commercial stuff. There’s also a
search engine to make your search easier.

www.freshmeat.net

Don’t let
the name put you off, in case you’re a vegetarian. This site provides a
very well indexed set of utilities that the community contributes. If there’s
a utility you need, get here, type in the keyword, and bingo, you should
have a few downloadables.

Security

www.securityfocus.com

This is the
monster of all the security sites out there. Daily updates on news,
vulnerabilities, etc. The Bugtraq mailing list-the mailing list where all
the exploits and advisories in the world are listed-resides here. A
must-visit daily site for all users who are using Linux as a server. The
site also has loads of good technical articles on security.

www.redhat.com/support/updates.html

This is the
Official Red Hat errata page. You’ll find latest bug fixes, advisories,
and a lot of other stuff.

Others

If you’re getting a little
too bugged with /usr/local/bin, but are still enamored with Linux, then you
could chill out with these sites.

www.linux-india.org

This is the
official site of the Linux India organization. You’ll find various mailing
lists specific to Indian users. Keeps you in touch with the Linux scene in
India.

www.userfriendly.org/static

This is a
comic strip page. The other side of the geek world.

www.themes.org

Just when you
get bored with your existing desktop, this is the site for you. Tons of
themes for KDE, GNOME, and WindowMaker.

www.linuxgames.com

So you
said bye-bye to games when you shifted to Linux? Time to wake up. This site
has loads of heavy-duty games for Linux. Also includes HOWTO’s and
documents on how to install and configure different games.

To understand what logrotate can do….

To understand what logrotate
can do, first ask yourself what you want to do with your log files. The
table "Planning for a log processing and archiving policy" might
help you to start. The first row lists the processing and reporting to be
done, while the first column lists the files on which the processing is to
be done. Put down the different log files in column 1, tick out the log
processing of your choice, and you can come up with a policy for using
logrotate.

Let me briefly explain what
each column implies. A "yes" on column 2 indicates that you want
to retain the log file as a record, so it’s best kept compressed.
Similarly, a "yes" in column 3 indicates that you merely want to
scan the file, look for the unusual, and then discard it. You might want to
mail this file to yourself or to the relevant administrator. Column 4 says
that you want to discard the file straightaway. In the sysadmin world, this
obviously doesn’t qualify for best practice. Columns 5 and 6
mention the actions you want to perform before and after you do the log
processing. Column 7 is for an e-mail address to which errors during log
processing are to be reported, and column 8 indicates how often you want the
processing to be done. Note that you might want a time threshold with a
granularity of a day or choose to have a file size threshold to rotate the
logs. This table is not exhaustive or mandatory in nature-it’s is merely
an example of how you would go about the policy-making exercise. So, don’t
implement this, as is, as a policy. Evolve one to suit your needs.

If you’re ready with a
table such as the one above, you have a policy. You can now use logrotate to
implement this policy.

The policy is specified using
keywords, as well as with a script-like language comprising keywords
specific to logrotate. The script is intuitive and easy to understand. By
default, most logs are rotated four times, uncompressed, before they’re
removed from the system. This should explain the presence of files with the
extensions .1, .2, .3 and .4 in the /var/log directory. Take the file /var/log/messages
as an example. After a certain time period or after a certain file size is
reached (as specified in /etc/logrotate. conf), this file is renamed to
messages.1 and an empty file called messages is created to take in the new
log input. This is repeated until they’re rotated four times.

Let’s look at a portion of
the configuration from /etc/logrotate.conf from a standard install. The
first line mentions the name of the file for which the policy is laid out.
Notice the intuitive keywords-"monthly" indicates that the
rotation cycle is monthly, "create" specifies the permissions and
ownerships to be used when the old file is moved to another name and an
empty file is created. "Rotate 1" indicates that one rotated
logfile will be retained:

/var/log/wtmp
{ monthly

create 0664
root utmp

rotate 1

}

Here’s a portion of the
file /etc/logrotate.d/apache-the policy for processing apache log files.
The keyword missingok implies that if the log file isn’t found, continue
processing the rest. Notice the command in between the keywords postrotate
and endscript. This command is executed after log processing is done.
Surprisingly, you don’t find any other instructions such as the frequency
of rotation or the number of rotations, as in the previous case. When there’s
no explicit mention made, the definitions in the global configuration file
will apply.

/var/log/httpd/access_log
{

missingok

postrotate

/usr/bin/killall -HUP httpd 2> /dev/null || true

endscript

}

logrotate is typically run
once a day by the cron. If you are logged in as superuser, you would see an
entry similar to the one below in the crontab file:

0 0 * * * /usr/sbin/logrotate

The utility runs every
midnight. You can run it more often if you need to.

A good start towards
minimizing disk storage space would be to uncomment the compress option in
/etc/logrotate. conf, so that all the rotated log files are kept compressed.

Avinash
Shenoy
is a systems and network administrator at the NCBS, Bangalore,
and Gopi Garge is a technology
consultant with Exocore Consulting <www.exocore.com>

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<