Re: vmstat -s "boot time" Redhat Linux

  • From: Jared Still <jkstill@xxxxxxxxx>
  • To: post.ethan@xxxxxxxxx
  • Date: Fri, 13 Nov 2009 09:05:32 -0800

I'm no VMWare expert by any means, but if you don't have the
VM tools installed in the VM, the clock will not be synced properly.


Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com



On Fri, Nov 13, 2009 at 9:02 AM, Ethan Post <post.ethan@xxxxxxxxx> wrote:

> Maybe this is more VMWARE weirdness. The number is static for long periods
> of time, and then after a few days goes up (perhaps when the image is
> migrated to another server??).
>
> $ while ((1)); do
> > vmstat -s | grep "boot time"
> > sleep 600
> > done
>    1254804111 boot time
>    1254804111 boot time
>
>
>
> On Fri, Nov 13, 2009 at 10:05 AM, Matthew Zito <mzito@xxxxxxxxxxx> wrote:
>
>>
>> That is the actual time in seconds since the epoch (unix time) that the
>> machine was started.  It's stored in /proc/stat, and vmstat just grabs the
>> raw value and displays it with a slightly better label (it's btime in
>> /proc/stat).
>>
>> So, in other words, take that unix time, convert it to a human-readable
>> time, adn you've got when the machine was booted.
>>
>> Thanks,
>> Matt
>>
>> --
>> Matthew Zito
>> Chief Scientist
>> GridApp Systems
>> P: 646-452-4090
>> mzito@xxxxxxxxxxx
>> http://www.gridapp.com
>>
>>

Other related posts: