Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Boot Time

Posted on 2001-07-03
7
Medium Priority
?
231 Views
Last Modified: 2010-04-21
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
Comment
Question by:prashant_n_mhatre
  • 4
  • 3
7 Comments
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6249877
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
 
LVL 4

Author Comment

by:prashant_n_mhatre
ID: 6249883
Then how to get boot time in C program?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6249896
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!

 
LVL 4

Author Comment

by:prashant_n_mhatre
ID: 6249917
I read it but wtmp doesn't talk about boot time.
0
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 260 total points
ID: 6249943
wtmp will record boot entries with ut_type=BOOT_TIME
0
 
LVL 4

Author Comment

by:prashant_n_mhatre
ID: 6249988
Thanks chris_calabrese
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6250032
You're welcome.  Glad to help.
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question