7.2.2 ログをリモート運用端末に転送する
ftpコマンドを使用して,採取したログをリモート運用端末に転送する手順を次に示します。
> show logging > log.txt > show logging reference > log_ref.txt > ftp 192.168.0.1 <---1 Connected to 192.168.0.1. 220 192.168.0.1 FTP server ready. Name (192.168.0.1:staff1): staff1 331 Password required for staff1. Password: 230 User staff1 logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> ascii <---2 200 Type set to A. ftp> cd /usr/home/staff1 <---3 250 CWD command successful. ftp> put log.txt <---4 local: log.txt remote: log.txt 200 EPRT command successful. 150 Opening ASCII mode data connection for 'log.txt'. 100% |************************| 251 KiB 11.13 MiB/s --:-- ETA 226 Transfer complete. 257490 bytes sent in 00:00 (1.21 MiB/s) ftp> ftp> put log_ref.txt <---4 local: log_ref.txt remote: log_ref.txt 200 EPRT command successful. 150 Opening ASCII mode data connection for 'log_ref.txt'. 100% |************************| 33165 7.48 MiB/s --:-- ETA 226 Transfer complete. 33165 bytes sent in 00:00 (160.98 KiB/s) ftp> bye 221 Thank you for using the FTP service on 192.168.0.1. > |
-
転送先の端末アドレスを指定します。
-
アスキーモードに設定します。
-
転送先ディレクトリを指定します。
-
ログを転送します。