• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Boot Time

How to get boot time of a machine directly from a kernel.

who -b
gives me the last reboot time. but I would like to get it from Kernel.

I'm using DYNIX/PTX
0
prashant_n_mhatre
Asked:
prashant_n_mhatre
  • 4
  • 3
1 Solution
 
chris_calabreseCommented:
The kernel couldn't care less when the system booted and can not tell you.  This is a basic premise of Unix systems.  The kernel does what it needs to, and nothing else.
0
 
prashant_n_mhatreAuthor Commented:
Then how to get boot time in C program?
0
 
chris_calabreseCommented:
This information is kept in the wtmp file.  See the wtmp man page.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
prashant_n_mhatreAuthor Commented:
I read it but wtmp doesn't talk about boot time.
0
 
chris_calabreseCommented:
wtmp will record boot entries with ut_type=BOOT_TIME
0
 
prashant_n_mhatreAuthor Commented:
Thanks chris_calabrese
0
 
chris_calabreseCommented:
You're welcome.  Glad to help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now