HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- want to write script
Operating System - Linux
1826102
Members
4790
Online
109690
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
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
06-05-2007 09:22 PM
06-05-2007 09:22 PM
want to write script
Hi,
I want to write a script in unix. I want your support in forming the script. I am mentioning my aim for the script.
we have a unix servers in which we have certain jobs which continiously monitor the server errors. we have set the prirorities for that such as high, medium, low for which the log files are getting created which we can differentiate.
now my requirement of script is such that it should scan the these high priority logs only and should mail those to the concerned guys on there mail-id's.it will be such like alerts for these guys.
waiting for your solution,
Thanks and Regards,
Amit Phadnis.
Now my requirement for the script is such tha
I want to write a script in unix. I want your support in forming the script. I am mentioning my aim for the script.
we have a unix servers in which we have certain jobs which continiously monitor the server errors. we have set the prirorities for that such as high, medium, low for which the log files are getting created which we can differentiate.
now my requirement of script is such that it should scan the these high priority logs only and should mail those to the concerned guys on there mail-id's.it will be such like alerts for these guys.
waiting for your solution,
Thanks and Regards,
Amit Phadnis.
Now my requirement for the script is such tha
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2007 10:12 PM
06-05-2007 10:12 PM
Re: want to write script
You did not describe exactly how to identify the priority in the log messages.
If the priority information is embedded in the log messages, for example, if the high priority messages always have "" in them,
the solution is to use "grep" to scan for high priority messages and pipe the output to "mail" for sending.
This is usually done with just one line of script, like this:
grep "" /one/or/more/log/files.txt | mail -s "mail subject" one.or.more@mail.addresses
If there is no single identifier for high-priority messages, but you can list the kinds of messages that are high-priority, read "man grep" and pay attention to the -F option.
By the way, this is is a *very, very simple* script. If you cannot do this much on your own and you must work as Unix sysadmin, go to some "Unix basic system administration" course ASAP.
MK
If the priority information is embedded in the log messages, for example, if the high priority messages always have "
the solution is to use "grep" to scan for high priority messages and pipe the output to "mail" for sending.
This is usually done with just one line of script, like this:
grep "
If there is no single identifier for high-priority messages, but you can list the kinds of messages that are high-priority, read "man grep" and pay attention to the -F option.
By the way, this is is a *very, very simple* script. If you cannot do this much on your own and you must work as Unix sysadmin, go to some "Unix basic system administration" course ASAP.
MK
MK
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP