ProductsDesktop Server For Scientific Computing For IBM POWER For IBM System z For SAP Business Applications Red Hat Network Satellite ManagementExtended Update Support High Availability High Performance Network Load Balancer Resilient Storage Scalable File System Smart Management Extended Lifecycle SupportWeb Server Developer Studio Portfolio Edition JBoss Operations Network FuseSource Integration Products Web Framework Kit Application Platform Data Grid Portal Platform SOA Platform Business Rules Management System (BRMS) Data Services Platform Messaging JBoss Community or JBoss enterprise
SolutionsApplication development Business process management Enterprise application integration Interoperability Operational efficiency Security VirtualizationMigrate to Red Hat Enterprise Linux Systems management Upgrading to Red Hat Enterprise Linux JBoss Enterprise Middleware IBM AIX to Red Hat Enterprise Linux HP-UX to Red Hat Enterprise Linux Solaris to Red Hat Enterprise Linux UNIX to Red Hat Enterprise Linux Start a conversation with Red Hat Migration services
TrainingPopular and new courses JBoss Middleware Administration curriculum Core System Administration curriculum JBoss Middleware Development curriculum Advanced System Administration curriculum Linux Development curriculum Cloud Computing and Virtualization curriculum
ConsultingStandard Operating Environment (SOE) Strategic Migration Planning Service-oriented architecture (SOA) Enterprise Data Solutions Business Process Management
Issue #12 October 2005
- Adding encryption support to HAL: A user's experience with Fedora development
- Python programming on Linux
- Integrating your applications into the desktop, Part 1
- The state of Java on Linux
- Maintaining an autotools-enabled package
- Performance tuning with GCC, Part 2: Analyzing performance problems
- Using OProfile to analyze an RPM package build
- Remix culture comes to film at the Internet Archive
- Video: Red Hat and TSANet coordinate customer support
- Summit 2006: Not just country
- Video: Red Hat and BEA have no time for downtime
- Video: Red Hat Learning Services get real-world results
From the Inside
In each Issue
- Editor's blog
- Red Hat speaks
- Ask Shadowman
- Tips & tricks
- Fedora status report
- Magazine archive
Last month's contest: Favorite performance tool
Last month's contest asked you to tell us about your favorite Linux performance tuning or monitoring tool.
We have to give props to all the fans of
top out there. It's one of our favorite tools toosometimes after a particularly large lunch we just sit and watch it run all afternoon.
But we had to hand ultimate honors to Matthew Nuzum, who shared with us his favorite script for monitoring servers:
"As you know, when managing servers, sometimes freaky unexpected things can happen. The worst thing in the world is to have a user or your boss call you and say, 'is the server having problems?' while you stand clueless. I created a quick little script that runs every five minutes via cron and monitors the cpu load and the number of database connections. If they exceed a certain threshold, the server logs important data and sends a message to my pager."
Here's Matthew's script:
#!/bin/sh # who should be notified upon event: # separate multiple email addresses with a space CONTACTS="email@example.com firstname.lastname@example.org" # Create some messages HOSTNAME=`hostname` WARNING_DB="Database connections on $HOSTNAME is rather high" WARNING_CPU="CPU load on $HOSTNAME is rather high" WARN=0 #calculate the db load DB_LOAD=`ps -ax | grep postgres | wc -l` if (($DB_LOAD > 150)) then WARN=1 echo "$WARNING_DB ($DB_LOAD) " | mail -s "db_load is high ($DB_LOAD)" $CONTACTS fi #calculate the processor load CPU_LOAD=`cat /proc/loadavg | cut --delimiter=" " -f 2 | cut --delimiter="." -f 1` if (($CPU_LOAD > 8)) then WARN=1 echo "$WARNING_CPU ($CPU_LOAD) " | mail -s "CPU_load is high ($CPU_LOAD)" $CONTACTS fi if (($WARN > 0)) then echo -=-=-=-=-=-=-=-=- W A R N I N G -=-=-=-=-=-=-=-=- >> /tmp/warn.txt NOW=`date` echo -=-=-=-=-=-$NOW-=-=-=-=-=- >> /tmp/warn.txt echo CPU LOAD: $CPU_LOAD DB LOAD: $DB_LOAD >> /tmp/warn.txt echo >> /tmp/warn.txt top -bn 1 >> /tmp/warn.txt echo >> /tmp/warn.txt fi
For his efforts, we are sending him a Cool Stuff Store gift certificate.
October contest: Write our Summit 2006 theme song
This month, we want to see what sort of song-writing talent we have out there in Red Hat Magazine reader-land. Below is a link to a musical score written by our good friend Brent Fox, a Red Hat Technical Account Manager with an obviously golden ear. It's two minutes of delicate country stylings, and just needs a few verses and a good chorus to become the hit song of next year's Summit. We've provided the tune in three formats:
Give it a listen or two, then put your creative mind to work. Bonus points, of course, for sending us a link to an audio or video performance of your Grammy-worthy effort.
The work must be original and cannot borrow in part or wholesale from previously existing works. We will not accept any entries that are inappropriate or derogatory, and may alter the work for time or effect.
The winning lyrics will receive a Cool Stuff Store gift certificate.
The information provided in this article is for your information only. The origin of this information may be internal or external to Red Hat. While Red Hat attempts to verify the validity of this information before it is posted, Red Hat makes no express or implied claims to its validity.
This article is protected by the Open Publication License, V1.0 or later. Copyright © 2004 by Red Hat, Inc.