Solved

Boot Time

Posted on 2001-07-03
7
220 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

627 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