Solved

Boot Time

Posted on 2001-07-03
7
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 65 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FTP on FreeBSD server 2 167
Unix process listing into CSV format 3 87
Where to get php 5.6 for AIX 7.1? 5 149
UNIX Script. Send email if failure 8 93
Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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

739 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