CTS gather log files when GUI is unavailable via regular SSH
1. Login via SSH with regular credentials
admin:utils logs generate other
Generating log files... this may take a while
0% preparing to get logs
10% add system state
15% add application state
35% add phone state
40% add application logs
60% add configuration files
65% add calendar files
70% add boot log files
75% add secondary logs
80% compress log files
100% get logs complete
2. Send logs to FTP server
admin:utils logs ftp gogasca cisco 10.82.246.189
Logs (logFiles_SEP0019AA043E58_2009.08.17.2110_tar.gz) sent successfully
3. In case new logs are not being generate, try with utils log abort command or verify with TAC if
files need to be removed from tmp directoy
In case you have root access:
1. Create remote account
admin:utils remote_account enable
Remote Support is now enabled
admin:
admin:utils remote_account create ciscotac 1
2. Login via SSH using remote account credentials
Checking when last Log files were generated:
CTS:>pwd
/var
CTS:>cat LastLogGenDate
1249951029
CTS:>cat LastLogGenDateFormatted
Mon Aug 10 17:37:09 PDT 2009
3. Go to /nv/logs directory
cd /nv/logs
4. Compress directories into a single file
tar -cvf filename.tar
With this format we will be able to extract this file using WinZip or any other common tool (7-zip, WinRAR, etc)
Example:
CTS:>tar -cvf logs.tar admingui apacheAccPipe apacheErrPipe apache_acc apache_err
admingui/
admingui/admingui.bin
admingui/admingui00000.log
admingui/admingui00001.log
admingui/admingui00002.log
admingui/admingui00003.log
apacheAccPipe
apacheErrPipe
apache_acc/
apache_acc/access.bin
apache_acc/access00000.log
apache_acc/access00001.log
apache_err/
apache_err/error.bin
apache_err/error00000.log
apache_err/error00001.log
apache_err/error00002.log
CTS:>ls -al l*
-rw-r-r- 1 root root 573440 Jul 1 15:45 logs.tar
Note* Dont create file from /nv/ since file wont be created and will generate an error, folders need to be entered one by one.
5. SFTP files to SFTP server (Minicore SFTP or FreeFTPd)
CTS:>ls -al l*
-rw-r-r- 1 root root 573440 Jul 1 15:45 logs.tar
CTS:>sftp cisco@171.69.55.109
Connecting to 171.69.55.109...
cisco@171.69.55.109's password:
sftp>
sftp> put logs.tar
Once in the sftp shell, you can run commands similar to those available on FTP,
such as cd, lcd, ls, chmod, chgrp, get, put, rename, and rmdir. You can end the session by typing exit at the prompt
No comments:
Post a Comment