- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cron troubles
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
Forums
Discussions
Discussions
Discussions
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
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
03-16-2006 05:37 AM
03-16-2006 05:37 AM
Cron troubles
It sends an e-mail to the user (root) which should be forwarded to my e-mail address. This works properly won my L2000 server but doesn’t seem to be working on my rp3440 server.
The log file doesn’t show me any useful information other than the script ran. I am not getting any e-mails. What could be the problem?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 05:42 AM
03-16-2006 05:42 AM
Re: Cron troubles
How do you do 'forwarding'? Is your "email" address merely on your server or does it live elsewhere? Do you have a 'DS' entry in:
'/etc/mail/sendmail.cf'
...for example:
DSxxx.abc.com
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 05:43 AM
03-16-2006 05:43 AM
Re: Cron troubles
Check also '/var/adm/syslog/mail.log' for indications of mail problems.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 05:45 AM
03-16-2006 05:45 AM
Re: Cron troubles
Do you PATH setup in your script to find sendmail or mailx ?
Try put to run in cron this form:
0 0 * * * /your_script.sh 2>/tmp/err.log >/tmp/your_script.log
Look for the errors in theses logs.
Try put "set -x" in first line in script if you can figure out yet.
Look for errors in /var/adm/syslog/mail.log
Be sure your script in the log /var/adm/cron/log
Schimidt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 05:45 AM
03-16-2006 05:45 AM
Re: Cron troubles
#!/bin/
and then looking at its output on what is wrong. Additionally make sure the PATH variable in your script is defined as cron has a very limited one.
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 05:47 AM
03-16-2006 05:47 AM
Re: Cron troubles
Mail not configured the same?
Can you post the script?
In your crontab, ad looging for the cron job:
0 0 0 0 0 /root/yourscript > /tmp/yourscript.cronlog 2>&1
What happens when you run the script from the command line on the rp3440?
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 05:59 AM
03-16-2006 05:59 AM
Re: Cron troubles
Here is the script that I am running on both servers:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 06:01 AM
03-16-2006 06:01 AM
Re: Cron troubles
If the paths are defined differently between the two machines then it could cause a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 06:06 AM
03-16-2006 06:06 AM
Re: Cron troubles
LOG=/tmp/genadmin.log
#zero the old log
>$LOG
bdf >>$LOG
swapinfo -tam >> $LOG
and so on...
Then mail the log file:
mailx -s "genadmin report" you@yourdomain.com < $LOG
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 06:07 AM
03-16-2006 06:07 AM
Re: Cron troubles
Rp3440 w/11.23:
root: /var/spool/cron/crontabs ==> more root
# Entry(s) in /opt/hpservices/RemoteSupport are for HP Instant Support Enterpris
e Edition
0 0 * * 1 /opt/hpservices/RemoteSupport/config/pruneIncidents.sh
50 23 * * * /root/genadmin
0,15,30,45 * * * * /opt/omni/sbin/omnitrig
root: /var/spool/cron/crontabs ==>
L2000 w/11.0:
root: /etc/mail ==> more /var/spool/cron/crontabs/root
50 23 * * * /home/root/genadmin
# omnitrig entry was automatically added by
0,15,30,45 * * * * /opt/omni/sbin/omnitrig
root: /etc/mail ==>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 06:16 AM
03-16-2006 06:16 AM
Re: Cron troubles
/usr/bin/bdf
I also noticed the first line in your script:
#\!/bin/ksh
should be
#!/bin/ksh
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 07:15 AM
03-16-2006 07:15 AM
Re: Cron troubles
root: /root ==> more gravinadate
#!/bin/ksh -x
/usr/bin/date
# mail lvol list to root
/usr/bin/bdf
root: /root ==>
Here is my crontabs file:
root: /var/spool/cron/crontabs ==> more root
# Entry(s) in /opt/hpservices/RemoteSupport are for HP Instant Support Enterpris
e Edition
0 0 0 0 0 /root/gravinadate > /tmp/gravinadate.cronlog 2>&1
0 0 * * 1 /opt/hpservices/RemoteSupport/config/pruneIncidents.sh
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /root/gravinadate
50 23 * * * /root/genadmin
0,15,30,45 * * * * /opt/omni/sbin/omnitrig
root: /var/spool/cron/crontabs ==>
Here is my .forward too:
root: /root ==> more .forward
jgoldsmith@co.fairbanks.ak.us
# ssmith@co.fairbanks.ak.us
root: /root ==>
I checked the mail part and it looks correct.
Any other ideas as to what could be my problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 07:38 AM
03-16-2006 07:38 AM
Re: Cron troubles
You mail setup is working well?
# cat /root/.profile | mailx jgoldsmith@co.fairbanks.ak.us
Use the command mailq to see if anything hangs...
Regards, MB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 07:39 AM
03-16-2006 07:39 AM
Re: Cron troubles
I also found this:
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062904859
MB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 07:41 AM
03-16-2006 07:41 AM
Re: Cron troubles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 08:10 AM
03-16-2006 08:10 AM
Re: Cron troubles
------------------------
#!/bin/sh
exec > /home/whatever/logfile 2>@1
MAIL_TO=you@somewhere.net
echo "From:yourserver@somewhere.net"
echo "Subject:whatever you want.
your script here:
bottom of script
cat /home/whatever/logfile | sendmail $MAIL_TO
----------------------------
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2006 09:03 AM
03-16-2006 09:03 AM
Re: Cron troubles
/etc/mail
look at the aliases file and sendmail.cf
Main macros to check in cf:
DS
DM
Check it on the L2000 - then make changes to the sendmail.cf on the RP3440.
DS is the "smart relay" - like an exchange or notes server
DSyourexchangeserver
DM - is masquerade - so instead of root@someserver.internaldomain.net it will be root@yourdomain.com
DMyourdomain.com
Rgds...Geoff