VMware Cloud Community
vishalch
Enthusiast
Enthusiast
Jump to solution

ESXi 5.1 Uptime Report

Hi Folks,

Is it possible to fetch Uptime report for ESXi 5.1 host for last year.

The report should show host up/down and disconnections with timestamp.

Thanks in Advance.

Tags (1)
1 Solution

Accepted Solutions
jmbrav0
Enthusiast
Enthusiast
Jump to solution

Hi



When I get reports from vmksummary.log file I sort it with grep. Like that:


cat /var/log/vmksummary.log | grep booted

2015-06-26T06:25:27Z bootstop: Host has booted

2015-06-26T06:47:23Z bootstop: Host has booted

2015-06-26T06:58:19Z bootstop: Host has booted

2015-06-26T07:05:26Z bootstop: Host has booted

2015-06-26T07:09:50Z bootstop: Host has booted

2015-07-08T05:32:17Z bootstop: Host has booted

This file contains a lot of extra information, maybe with grep you could  "aim" better.

With PowerCLI I have used this sometimes:

Connect-VIServer -Server XXX.XXX.XXX.XXX -User YYYYYYY -Password ZZZZZZZZ

Get-VMHost | Get-View | select Name, @{N="Uptime"; E={(Get-Date) - $_.Summary.Runtime.BootTime}}|fl

Regards, JM

View solution in original post

9 Replies
jmbrav0
Enthusiast
Enthusiast
Jump to solution

Hi,

You can do from:

Host > Performance > Advanced > Chart options > Power

or System > Uptime

You can edit the date as you want.

Regards, JM
vishalch
Enthusiast
Enthusiast
Jump to solution

Hi jmBrav0

Thanks for your reply.

I have checked the same. It shows me Power Usage/Capacity, etc.

However, the requirement is to fetch a Uptime or you can say host availability report for last one year.

Regards

Reply
0 Kudos
jmbrav0
Enthusiast
Enthusiast
Jump to solution

Have you tried in System?

borrar.JPG

Regards, JM
vishalch
Enthusiast
Enthusiast
Jump to solution

Thanks JM Smiley Happy

I can see uptime counter when I switched to System. However the latest data available is only from one month.

I believe this is due to our vCenter retention policy.

Is there any other medium ( host specific ) where we can find old data as well?

Regards

Reply
0 Kudos
jmbrav0
Enthusiast
Enthusiast
Jump to solution

Hi,

Try with this command (SSH):

cat /var/log/vmksummary.log


This file contains all information about uptime, reboots, etc.


Regards, JM
vishalch
Enthusiast
Enthusiast
Jump to solution

Hi JM

Thanks again for your reply Smiley Happy

I have already tried this option. vmksummary.log file has alot of the extra details, which are basically not required.

In short, manual efforts are involved here to prepare the report in well formatted way.

I am looking for some smart way to fetch the report. Some of sort of PowerCLI command or something.

The performance chart option is one of the smart ways. However it doesn't apply in my case due to my vCenter retention policy.

Regards

Reply
0 Kudos
jmbrav0
Enthusiast
Enthusiast
Jump to solution

Hi



When I get reports from vmksummary.log file I sort it with grep. Like that:


cat /var/log/vmksummary.log | grep booted

2015-06-26T06:25:27Z bootstop: Host has booted

2015-06-26T06:47:23Z bootstop: Host has booted

2015-06-26T06:58:19Z bootstop: Host has booted

2015-06-26T07:05:26Z bootstop: Host has booted

2015-06-26T07:09:50Z bootstop: Host has booted

2015-07-08T05:32:17Z bootstop: Host has booted

This file contains a lot of extra information, maybe with grep you could  "aim" better.

With PowerCLI I have used this sometimes:

Connect-VIServer -Server XXX.XXX.XXX.XXX -User YYYYYYY -Password ZZZZZZZZ

Get-VMHost | Get-View | select Name, @{N="Uptime"; E={(Get-Date) - $_.Summary.Runtime.BootTime}}|fl

Regards, JM
vishalch
Enthusiast
Enthusiast
Jump to solution

Thanks JM

cat /var/log/vmksummary.log | grep booted worked for me Smiley Happy


Regards

newuserguy
Contributor
Contributor
Jump to solution

Good tip - f the command line- it's 2017 and this applies to esxi 6+ even. This is proper info.

Reply
0 Kudos