Please let me know how do we check logs on F5 for troubleshooting purpose
Hey Imran, it depends exactly which type of logs you are looking for.
If you are logged in to the web console, you can go to Security > Event Logs.
However, because you are troubleshooting, it sounds like maybe you are needing the LTM logs (since that is where my troubleshooting steps usually go to).
If you log in to your box via SSH, you can type "tmsh" to switch to your virtual terminal. From here, type "show /sys log type" replacing 'type' with the type of log you are looking for. You can type "show /sys log all" to view the different types of logs. For instance you can use "show /sys log ltm" which for me has helped a lot.
From outside of tmsh, you can just cd to /var/log to see multiple log files. The equivalent of viewing the LTM log would be "tail /var/log/ltm"
Hope that helps!
You can view the logs using the below command in cli
tail /var/log/ltm ----- Shows the last few lines of the latest logs
cat /var/log/ltm ----- Shows the complete log of the present day
cat /var/log/ltm.* ----- Shows the logs for any of the previous days unto one week.
Alternatively, you can view the logs in GUI under SYSTEM --> Logs.
Let me know if this answer was helpful.
You can also add the -f option for showing logs as they are added for live troubleshooting:
tail -f /var/log/ltm
Really appreciate the answers give by all...but if I need to filter the logs for one particular day and time then how can do it..
Thanks in advance
What about something like that:
show sys log ltm range [date]
check help time for possible definitions of [date]
Thanks all for the answers posted all are helpful for me
bash prompt #: more /var/log/ltm | grep <string to look for>
Can use "| grep" on tmsh prompt as well.
FYI - there is also an egrep function.
Example uses of egrep:
Live CPU and Memory Performance
watch -n 2 "tmsh show sys tmm-info | egrep -w 'Sys:|Seconds|Minute|Minutes'"
watch -n 2 "tmsh show sys tmm-info | egrep -w 'Sys:|Seconds|Minute|Minutes|Memory|Total|Used'"
watch -n 2 "tmsh show sys cpu | egrep -w 'System CPU|Utilization|CPU:|User|System|Idle|Util|---'"