- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- syslog script nort run.
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
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
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-09-2012 03:48 AM
01-09-2012 03:48 AM
syslog script nort run.
Hi,
I want to copy earliar log messages daily.
but my script not run.
My script not run
Script:-vi .syslog.sh
cp /var/adm/syslog/syslog.log /tmp/oldsyslog
crontab setting:-
05 11 * * * /c03/.syslog.sh `date +%d%m%y`
its not run why.
Help me.....
aamir uddin
- Tags:
- crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2012 07:03 AM
01-09-2012 07:03 AM
Re: syslog script nort run.
What does /var/adm/cron/log say?
I am also confused as to why you have the `date...` line in your cron job line. What are you hoping to accomplish with it?
What are the permissions on the /c03/.syslog.sh script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2012 12:19 PM
01-09-2012 12:19 PM
Re: syslog script not run
>05 11 * * * /c03/.syslog.sh `date +%d%m%y`
You should replace this by: ... $(date +\%d\%m\%y)
The backslashes are needed for each "%", see crontab(1).
>I am also confused as to why you have the `date` line in your cron job line.
Perhaps .syslog.sh is a general script that needs to be able to run with arbitrary dates? ;-)
Unfortunately the contents of the script doesn't use $1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 01:44 AM
01-10-2012 01:44 AM
Re: syslog script not run
Hi,
There is no log on /var/adm/cron
and only default cron on that folder
billdev1#pwd
/var/adm/cron
billdev1#ls -lrt
total 3552 -r--r--r-- 1 bin bin 52 Feb 16 2007
.proto -r--r--r-- 1 bin bin 18 Feb 16 2007
at.allow -r--r--r-- 1 bin bin 14 Feb 16 2007
cron.allow -r--r--r-- 1 bin bin 17 Feb 16 2007
queuedefs prw------- 1 root root 0 Jan 9 17:04
FIFO -rw-r--r-- 1 root root 1646656 Jan 10 15:35
OLDlog
billdev1#
billdev1# billdev1#ll
total 33800996 -rwxrwxrwx 1 root sys 45 Jan 9 16:53 .syslog.sh (This is a permission)
My client told me.
make a script of logs than can copy all logs to any directory daily basis.
Please help me and give me any script.
aamir uddin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 02:57 AM
01-10-2012 02:57 AM
Re: syslog script nort run.
Hi,
I am awaiting of your soonest response.
aamir uddin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 10:12 AM - edited 01-10-2012 10:17 AM
01-10-2012 10:12 AM - edited 01-10-2012 10:17 AM
Re: syslog script not run
>There is no log in /var/adm/cron
You probably need to stop and restart cron to recreate that file.
> -rw-r--r-- 1 root root 1646656 Jan 10 15:35 OLDlog
This looks like you just restarted cron(1m).
>-rwxrwxrwx 1 root sys .syslog.sh (This is a permission)
The permission should be 755 or 555 but not world writable.
>make a script that can copy all logs to any directory daily basis.
Have you looked at logrotate?