- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron and syslog
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
01-27-2004 07:14 PM
01-27-2004 07:14 PM
Cron and syslog
Is there a way to re-direct messages of cron to syslog.log? I know that messages of cron are logged in cron.log, but I would have them recorded also into syslog.log.
Any hints?
Thanks
Juan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2004 07:22 PM
01-27-2004 07:22 PM
Re: Cron and syslog
YOu can get messages into syslog.log by through either a facility configured in syslog.conf or by the API command logger. I don't think you can redirect cron's messages by either of them. Ofcourse, you can write a script the checks cron's log and appends the new messages to syslog by logger command.
One way is to link /var/adm/cron/log to syslog.log but I haven't tried that.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2004 07:33 PM
01-27-2004 07:33 PM
Re: Cron and syslog
I don't think it will be easy to have cron activity also copied to syslog, but you could potentially write scripts to merge the 2 files periodically.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2004 07:59 PM
01-27-2004 07:59 PM
Re: Cron and syslog
You can redirect the output >> to /var/adm/syslog/syslog.log
What we actually do is direct the messages as email to a folder on our exchange server
example:
10 1 * * * jobname 2>&1 mailx -s "job output" someaddress@your.net
This collects the output nicely.
I have too much cron output to put it in syslog.
Just another idea.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2004 08:28 PM
01-27-2004 08:28 PM
Re: Cron and syslog
I have tried with logger on 11.i and it works, unfortunately on 10.20 cron is not recognized as a facility (msg "unknown facility name").
Thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2004 08:54 PM
01-27-2004 08:54 PM
Re: Cron and syslog
Looking at the man page (man 3c syslog), there is an entry for LOG_CRON if this is enabled.
This means that if that patch is installed on your system, you can add the entry
cron.* /var/adm/syslog/syslog.log
to /etc/syslog.conf. If you then restart syslogd, this should start to put cron messages into syslog.