A collegue of mine just gave a me a few tips on how to view the logfiles on an ESX Host in Real-time. Normally I would export all of the logs via the VIC or the vm-support command. But this limits me to only seeing what has happened, not what is currently happening.
Using the VMware Infrastructure Client, you can view some of the logs in real-time, but there is only a small amount of logs to choose from.
So how is it done? tail
This will display the logfile you wish to view in Real-time. You can also use;
This would show the last 100 lines of the logfile. You can change the number accordingly.
This reloads the file when rotated.
Another VMworld is upon us!!! Sadly, it's only virtual again this year. However, that does…
As part of my recent move to Google, I'm working on quickly getting up to…
I am delighted to announce the next chapter in my career. Today is my first…
In episode thirteen of The VCDX Podcast, I am joined by two special guests who…
In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…
In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…
View Comments
You can even use tail -F to reload the file when rotated ;)
Thanks Raphael, i'll add that to the post.
Simon
You're welcome. Note that this switch is not available on ESXi
Are the others?
Maybe nice to do an article on where the logs are and what they do as an addition to this. I found a nice one:
/var/log/vmware/esxupdate.log
It shows the progress of update manager when updating your esx servers. Useful when it seems hung at 33% remediating.
Hi Dan, thanks for the article idea. I do have an ESX3.5 and VC2 Log post here: http://www.simonlong.co.uk/blog/2009/04/14/vmware-esx-3-and-vcenter-2-logs/
But i think i might look into ESX4 and vCenter4 Logs.
Simon
Love the tail command seen a collegue using it on a Solaris host some time ago and thought I'd give it ago on the ESX console, been using it ever since, really useful for trouble shooting management agents etc.
Tail's cool but I prefer to uses less as I find it's more of a one-stop shop for devling into log files.
With less you can open the file you want to take a look at, move up and down it (unlike more), then if you want some real time action just hit Ctrl+f. This puts less into realtime mode. Once you've had your fix of realtime updates, just hit ctrl+c and your back to viewing the file. Very cool.
On a seperate note be warned that having an excessive amount of log files open for real-time updates can have a detremental effect on the service consoles performance.
Great site by the way :-)
Steve
Less? I've not heard of that. But i will go and check it out, it sounds really handy.
Thanks Steve
i am getting a Unable to open /dev/sdb when i try to mount it