Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials



Sawing Linux Logs with Simple Tools
Syslog, The Dumping Ground

Carla Schroder
Monday, September 20, 2004 11:22:15 AM

The syslog--/var/log/syslog--is a dumping ground for log entries from all kinds of daemons, such as Samba and cron:

$ grep -i samba /var/log/syslog
Sep 13 08:50:47 windbag nmbd[1123]:   become_logon_server_success: Samba is now a 
logon server for workgroup HOMENET on subnet 192.168.1.5
Sep 13 08:50:51 windbag nmbd[1123]:   Samba server WINDBAG is now a domain master 
browser for workgroup HOMENET on subnet 192.168.1.5
Sep 13 08:51:06 windbag nmbd[1123]:   Samba name server WINDBAG is now a local 
master browser for workgroup HOMENET on subnet 192.168.1.5

$ grep -i cron /var/log/syslog

Aug 18 21:18:01 windbag /USR/SBIN/CRON[1752]: (amavis) CMD (test -e /usr/bin/sa-
learn && test -e
 /usr/sbin/amavisd-new && /usr/bin/sa-learn —rebuild >/dev/null 2>&1)

These two snippets demonstrate that you can verify that certain Samba functions are working correctly, and that your cron jobs are running when you want.

Another useful item in /var/log/syslog is those strange-looking MARK messages:

Sep 13 19:10:30 windbag — MARK —
Sep 13 19:30:30 windbag — MARK —
Sep 13 19:50:30 windbag — MARK —

This is where you find out if your system rebooted during the night when it wasn't supposed to; the MARK sequence will be interrupted, and you'll see shutdown and startup messages.

Next month's Scripting Clinic will show how to set up automated email alerts, so when something nasty that requires your attention shows up in your logs, you won't be left in the dark.

Resources

  • See the man pages for grep, cut, and wc.
  • Linux in a Nutshell, by Ellen Siever, is my #1 indispensable Linux command reference

[Editor's Note: This article originally appeared on CrossNodes, a JupiterWeb site. -BKP]

« Back: Good Ole grep

Skip Ahead

1 Good Ole grep
2 More Simple Stuff
3 Syslog, The Dumping Ground





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers