HPE GreenLake Administration
Operating System - Linux
1828586
Members
2497
Online
109982
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
05-03-2006 04:26 PM
05-03-2006 04:26 PM
Scripts
Hi ,
I have a linux server from where I need to run a script on the disk space availability which should create a file and that file has to be sent to my outlook inbox( my mailing system is Exchange) .
Any suggestions on this please or any scripts on this please
I have a linux server from where I need to run a script on the disk space availability which should create a file and that file has to be sent to my outlook inbox( my mailing system is Exchange) .
Any suggestions on this please or any scripts on this please
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 04:38 PM
05-03-2006 04:38 PM
Re: Scripts
Hi,
Did u mean u want a script to check the file system disk usage?
The below is a simple example :
if [ $OSTYPE = "Linux" ]; then
/bin/df -kl|grep -vi used|grep %|sed 's/\%//' > /tmp/disk.txt
awk '{if($5 > 90) print $5, $6}' /tmp/disk.txt > /tmp/alert.txt
/bin/mail -i -s "File system/s on $HOSTNAME is/are almost full @ $Date!! Please check!" your email address < /tmp/alert.txt
Provided your linux are able to send out mail.
Thanks & Best Regards
HM
Did u mean u want a script to check the file system disk usage?
The below is a simple example :
if [ $OSTYPE = "Linux" ]; then
/bin/df -kl|grep -vi used|grep %|sed 's/\%//' > /tmp/disk.txt
awk '{if($5 > 90) print $5, $6}' /tmp/disk.txt > /tmp/alert.txt
/bin/mail -i -s "File system/s on $HOSTNAME is/are almost full @ $Date!! Please check!" your email address < /tmp/alert.txt
Provided your linux are able to send out mail.
Thanks & Best Regards
HM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 05:04 PM
05-03-2006 05:04 PM
Re: Scripts
Hi,
You can use mailx in your script to mail the file to any email id. You should add the following in your script after creating the file:
/bin/mail/mailx -s "subject... " your-email-id@xyz.com < /file/to/be/mailed
You can use mailx in your script to mail the file to any email id. You should add the following in your script after creating the file:
/bin/mail/mailx -s "subject... " your-email-id@xyz.com < /file/to/be/mailed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 06:14 PM
05-03-2006 06:14 PM
Re: Scripts
There is diskcheck package (http://linux.maruhn.com/sec/diskcheck.html), which was into RHL/Fedora.
For some reason the latest RHEL/Fedora don't have it, but you can use diskcheck for reference anyway.
For some reason the latest RHEL/Fedora don't have it, but you can use diskcheck for reference anyway.
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