I have several crontabs running at various times of the day and night. All generate copious output. All the jobs produce copious output, and some of them I need to see, while others are 's are just a pain in the butt to have t look at. is there some method I can use to selectively monitor cron's output of the one's I want to, while ignoring the others? Thanks... Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20051204/7a135c39/attachment-0002.html>
On 12/4/05, Sam Drinkard <sam at wa4phy.net> wrote:> I have several crontabs running at various times of the day and night. All > generate copious output. All the jobs produce copious output, and some of > them I need to see, while others are 's are just a pain in the butt to have > t look at. is there some method I can use to selectively monitor cron's > output of the one's I want to, while ignoring the others? Thanks...Change the output of what you're running with redirects. Output the stuff you don't care about to /dev/null and output the stuff you want to an email or text file. The advanced bash scripting guide is good for stuff like this. See http://www.faqs.org/docs/abs/HTML/ioredirintro.html for details. -- Jim Perrin System Architect - UIT Ft Gordon & US Army Signal Center
On Sun, 2005-12-04 at 02:48 -0500, Sam Drinkard wrote:> I have several crontabs running at various times of the day and night. > All generate copious output. All the jobs produce copious output, and > some of them I need to see, while others are 's are just a pain in the > butt to have t look at. is there some method I can use to > selectively monitor cron's output of the one's I want to, while > ignoring the others? Thanks...I append the following to the end of the crontab command for any jobs that I do NOT want to see the output from: >/dev/null 2>&1 It sends all stdout output and stderr output to the bit bucket...> Sam > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos-- Rich Huff <rich at richhuff.com>
On Sun, 2005-12-04 at 02:48, Sam Drinkard wrote:> I have several crontabs running at various times of the day and night. > All generate copious output. All the jobs produce copious output, and > some of them I need to see, while others are 's are just a pain in the > butt to have t look at. is there some method I can use to > selectively monitor cron's output of the one's I want to, while > ignoring the others? Thanks...You can try what I do with some cron jobs that send email. I use my email clients filters to examine the results that are generated. If the results are OK I mark the message as read and put them in a folder. If the results are not OK I just put the message in a folder. If I see that there are unread messages in that folder I take a look at the results. An example of this is tripwire. I use the evolutions filters to examine the report output for the words "No violation" and "No Errors". If those are found the message is marked as read and placed in the a folder. That filter is set to stop processing at that point. If the message does not contain either of those phrases a second filter just moves the message to the folder. A quick scan each morning shows me any unread messages in that folder that require additional attention. You should be able to do this with most reports, just setup a filter to find something that either indicates and error occurred or that everything was OK then take the appropriate actions. By having a filter handle the initial checks I don't have to waste my time looking over every single report. But I still have all of them if I need to review them. This is what I do for my personal systems. In a work environment I would use a tool like Big Brother or one of its variations to monitor systems an reports of that type. Those tools provide a nice dashboard that will show you problems on specific systems.