Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

How to Check logs on F5 for troubleshooting purpose.

Please let me know how do we check logs on F5 for troubleshooting purpose

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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!

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

You can also add the -f option for showing logs as they are added for live troubleshooting:

tail -f /var/log/ltm 
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi,

What about something like that:

show sys log ltm range [date]

check help time for possible definitions of [date]

Piotr

0
Comments on this Answer
Comment made 21-Jun-2017 by immu 64

Thanks all for the answers posted all are helpful for me

0
Comment made 21-Jun-2017 by LoyalSoldier 106

Another option:

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|---'"
0