Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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