Need to push syslog daily to another server (197 Views)
Reply
Regular Advisor
coollllllllllll
Posts: 140
Registered: ‎12-28-2012
Message 1 of 2 (197 Views)

Need to push syslog daily to another server

[ Edited ]

Hi ,

 

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

hpx 11i v2

Please use plain text.
Honored Contributor
Patrick Wallek
Posts: 13,749
Registered: ‎06-21-2000
Message 2 of 2 (137 Views)

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.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation