HPE GreenLake Administration
Operating System - HP-UX
1833159
Members
2998
Online
110051
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2008 06:42 AM
12-02-2008 06:42 AM
I have a simple script in cron every 1/2 hour that scans syslog and looks for any scsi error. If it finds it it sends to my pager.
Is there a way, that when it finds an error and sends it, to stop sending the message over and over again? like a counter or something. besides, if condition is true, send message, then rename the script so cron cant find it. renaming the script is the only way I can think of ending the loop. dont have syslog-ng on this server and cant.
Is there a way, that when it finds an error and sends it, to stop sending the message over and over again? like a counter or something. besides, if condition is true, send message, then rename the script so cron cant find it. renaming the script is the only way I can think of ending the loop. dont have syslog-ng on this server and cant.
UNIX IS GOOD
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2008 06:55 AM
12-02-2008 06:55 AM
Solution
You have several options here.
1. Enhance your script to check dates in the syslog and only capture the most recent errors.
2. When the script finds errors and sends a page, have the script touch a file and use it as a flag. In the begining of the script check if the flag file exists and exit the script. You have to manually delete the flag file after you respond to the paging or have the script delete the file every few hours.
3. Use the "dmesg -" command to check for errors if those SCSI errors are sent to the kernel as well. The "-" option in dmesg will only show the new messages since the last time it was invoked.
I am sure other interesting suggestions will come up.
1. Enhance your script to check dates in the syslog and only capture the most recent errors.
2. When the script finds errors and sends a page, have the script touch a file and use it as a flag. In the begining of the script check if the flag file exists and exit the script. You have to manually delete the flag file after you respond to the paging or have the script delete the file every few hours.
3. Use the "dmesg -" command to check for errors if those SCSI errors are sent to the kernel as well. The "-" option in dmesg will only show the new messages since the last time it was invoked.
I am sure other interesting suggestions will come up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2008 06:59 AM
12-02-2008 06:59 AM
Re: Script
You can add the condition in your script:
if [ ! -f /etc/scsi_found ] {
///check for scsi erorrs
if (scsi errors found) { touch file /etc/scsi_found
}
else rm /etc/scsi_found
}
regards,
ivan
if [ ! -f /etc/scsi_found ] {
///check for scsi erorrs
if (scsi errors found) { touch file /etc/scsi_found
}
else rm /etc/scsi_found
}
regards,
ivan
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP