Powershell

This will grab the contents of all of the log files on your VirtualCenter server. Normally there will be eleven of them: logs zero through nine are rotated through at each service startup, and the index umm, I forget what’s in it.  Anyway, here you go:

$log = Get-LogType | ? { $_.key -match "vpxd" } | % { Get-Log -Key $_.Key }

You may have to be patient. This took 175 seconds to run on my box.

And here’s how to get at the contents:

PS > $log[0].Entries | select -first 10
Log for VMware VirtualCenter, pid=1484, version=2.5.0, build=build-104215, option=Release, sec
tion=2
[2008-10-04 09:36:07.703 'App' 268 info] Current working directory: C:\WINDOWS\system32
[2008-10-04 09:36:07.703 'Libs' 268 info] HOSTINFO: Seeing Intel CPU, numCoresPerCPU 1 numThre
adsPerCore 2.
[2008-10-04 09:36:07.703 'Libs' 268 info] HOSTINFO: This machine has 1 physical CPUS, 1 total
cores, and 2 logical CPUs.
[2008-10-04 09:36:07.703 'App' 268 info] Log path: C:\Documents and Settings\All Users\Applica
tion Data\VMware\VMware VirtualCenter\Logs
[2008-10-04 09:36:07.703 'App' 268 info] Initializing SSL
[2008-10-04 09:36:08.093 'Libs' 268 info] Using system libcrypto, version 90709F
[2008-10-04 09:36:17.109 'App' 268 info] Vmacore::InitSSL: doVersionCheck = true, handshakeTim
eoutUs = 30000000
[2008-10-04 09:36:17.343 'App' 268 info] Starting VMware VirtualCenter 2.5.0 build-104215
[2008-10-04 09:36:17.453 'App' 268 info] Log directory: C:\Documents and Settings\Default User
\Local Settings\Application Data\VMware\vpx.

: http://halr9000.com/article/624

No comments yet.

Comments for this post will be closed on 2 January 2009.

  • Microblog

  • Recent Posts

  • Recent Comments

  • meta