sldr
Contributor
Contributor

Can I get contents of hostd.log from VI SDK

Jump to solution

I don't see a way to get the contents of hostd.log from the VI SDK. I notice that some way the VI Client software has access to it (hostd.log) as well as other logs. I assume that VI Client is using same API (may be bad assumption), so I figure it is possible.

Can anyone tell me if it is possible to get logs from VI SDK and how to do it?

SLDR (Stephen L. De Rudder)
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
hrobinson
VMware Employee
VMware Employee

Yes, you can.

The DiagnosticManager (from the ServiceContent) has a BrowseDiagnosticLog method. The key value of hostd is "hostd".

You can use this to cycle through hostd for any host.

Hope this helps..

Henry

View solution in original post

0 Kudos
2 Replies
hrobinson
VMware Employee
VMware Employee

Yes, you can.

The DiagnosticManager (from the ServiceContent) has a BrowseDiagnosticLog method. The key value of hostd is "hostd".

You can use this to cycle through hostd for any host.

Hope this helps..

Henry

0 Kudos
ssurana
VMware Employee
VMware Employee

Yes, you are correct in assuming that one should be able to browse through the logs for both the VC as well as ESX using the VI SDK . If you are connecting to VC then VC logs would be available and by directly connecting to ESX you would be able to view the hostd logs.

In the SDK you might want to look at the following object:

Managed Object - DiagnosticManager and the BrowseDiagnosticLog method.

http://pubs.vmware.com/vi301/sdk/ReferenceGuide/vim.DiagnosticManager.html

I hope the above information helps

~ Sidharth