Skip to Content
Beginning Shell Scripting
book

Beginning Shell Scripting

by John C. Welch, Eric Foster-Johnson, Micah Anderson
April 2005
Beginner
528 pages
12h 22m
English
Wrox
Content preview from Beginning Shell Scripting

Chapter 12. Graphing Data with MRTG

System administrators use scripts every day. Quite a lot of this activity involves using scripts to verify that systems continue to run properly, as well as to gather performance information.

MRTG, short for the Multi Router Traffic Grapher, was originally designed to monitor the network traffic from one or more routers. MRTG takes a very useful approach to network monitoring: It outputs web pages showing the network traffic data. The actual graphs are image files in PNG format. Thus, you need no special software to view the network statistics. In addition, you can view the data remotely if you have a web server running on the system on which MRTG runs.

One of the most useful aspects of MRTG is that the package can monitor just about anything. In addition, anything it can monitor, it can graph. Furthermore, MRTG uses a fixed amount of disk space for storing its statistics. (Older data get replaced by averages.) This means MRTG won't fill your hard disks with data files over time.

MRTG proves useful for all of the following purposes:

  • Monitoring network throughput, the purpose for which MRTG was originally designed

  • Monitoring CPU usage

  • Tracking disk usage

  • Watching for spikes in allocated memory

  • Ensuring that applications such as web servers, database managers, and network firewalls remain functioning

This chapter covers using MRTG to graph system, network, and application data. Using MRTG is fun, as you can get immediate visual feedback about your scripts. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Robust Shell Scripting

Robust Shell Scripting

Arnold Robbins

Publisher Resources

ISBN: 9780764583209Purchase book