Operating System - HP-UX
1752801 Members
5791 Online
108789 Solutions
New Discussion

Need to push syslog daily to another server

 
coollllllllllll
Regular Advisor

Need to push syslog daily to another server

Hi ,

 

I need to push syslog.log date wise daily on windows box thru ftp .

hpx 11i v2

1 REPLY 1
Patrick Wallek
Honored Contributor

Re: Need to push syslog daily to another server

Are you rotating your syslog.log daily on the HP-UX server?  If not, then your first step is to start doing that.

 

Which server do you want to initiate the FTP process from?  HP-UX or Windows?  If you want to FTP from HP-UX to Windows then you'll need an FTP server on your Windows box.  IIS on Windows has this functionality.

 

Then you'll need to write a script to initiate the FTP connection and transfer the file.

 

At it's most basic, something like this may work:

 

#!/usr/bin/sh

cd /var/adm/syslog

ftp -inv servername << EOF
user username password

bin
put syslog.log.somedate
bye
EOF

 

There may need to be some calculations for the file name if you have it named something like syslog.log.20130508 for yesterdays log.

 

Hopefully this will get you started.