- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: New to UNIX, need help with script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО08-10-2009 02:28 PM
тАО08-10-2009 02:28 PM
Re: New to UNIX, need help with script
A better solution to your problem may be to add a one-line patch at line-388:
...
385 # Been there before but have we exceeded to INCR value? Note: we may
386 # be at 99% so the script will repeat.
387
388 [ -z "${INCR}" ] && INCR=${DEFINCR} #...patch...
389 LASTVALUE=$(echo $BEENTHERE | awk '{print $2}')
390 if [ $((LASTVALUE + INCR)) -le $PERCENT ]
...
This resets the default increment if it isn't defined. Now you can follow the documentation for the 'diskspace.conf' layout exactly.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:26 AM
тАО08-11-2009 06:26 AM
Re: New to UNIX, need help with script
/usr/local/bin/diskspace.sh -e "me@me.org"
Can I?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:30 AM
тАО08-11-2009 06:30 AM
Re: New to UNIX, need help with script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:40 AM
тАО08-11-2009 06:40 AM
Re: New to UNIX, need help with script
> How would I set that to a cronjob? I can't set the cron to run as
/usr/local/bin/diskspace.sh -e "me@me.org"
For example:
00,10,20,30,40,50 * * * * /usr/local/bin/diskspace.sh -e"me@me.org"
...would run the process every 10-minutes after every hour on every day of the week, etc.
There is more information in the 'crontab' manpages. You're doing fine :-)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:41 AM
тАО08-11-2009 06:41 AM
Re: New to UNIX, need help with script
/usr/local/bin/diskspace.sh -e "me@me.org"
as your command in the crontab entry.
If your scirpt has any output you may want to add
> /dev/null
to the end of the command so you don't get mailed from cron every time it runs.
If there is error output cron will still mail that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:51 AM
тАО08-11-2009 06:51 AM
Re: New to UNIX, need help with script
So I can in fact run it like that. ok.
And the >/dev/null will make it only send me an e-mail if the script finds something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:52 AM
тАО08-11-2009 06:52 AM
Re: New to UNIX, need help with script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:54 AM
тАО08-11-2009 06:54 AM
Re: New to UNIX, need help with script
> And the >/dev/null will make it only send me an e-mail if the script finds something?
You don't need to add that in this case. By default, 'cron' creates mail and sends it to the user's crontask _IF_ either STDOUT and/or STDERR has not been redirected (to a file).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 06:55 AM
тАО08-11-2009 06:55 AM
Re: New to UNIX, need help with script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2009 07:17 AM
тАО08-11-2009 07:17 AM
Re: New to UNIX, need help with script
- « Previous
-
- 1
- 2
- Next »