Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix Monitoring with awk

Status
Not open for further replies.

Mag0007

MIS
Feb 15, 2005
829
US
I know you can do this with ksh, but is it possible to write a system monitoring script with awk?

For example, I would like to constantly check my /var/adm/messages file, for an entry, if the entry is found...email the system admins.

Or on AIX, if there is a perm error in the errpt, email the admins.

Ofcourse, this in awk, if possible.
 
awk '/entry/ { system("<mail_command>")}' /var/adm/message

-or-

errpt -a | awk '/error/ {syste,("<mail_command>") }'

could work for you?

Chacal, Inc.[wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top