Solved

Boot Time

Posted on 2001-07-03
7
195 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now