Unix Technical Forum

getting uptime from c

This is a discussion on getting uptime from c within the AIX Operating System forums, part of the Unix Operating Systems category; --> Im running 5.2 and soon going to 5.3 and using gcc from the AIX Linux site. I'm trying to ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 10:29 AM
aixhack
 
Posts: n/a
Default getting uptime from c

Im running 5.2 and soon going to 5.3 and using gcc from the AIX Linux
site.

I'm trying to get system uptime in seconds and wonder if anyone has an
example I can use, and works in 64 bit mode.

thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 10:29 AM
Gary R. Hook
 
Posts: n/a
Default Re: getting uptime from c

aixhack wrote:
> I'm trying to get system uptime in seconds and wonder if anyone has an
> example I can use, and works in 64 bit mode.


Get the boot time from the utmp file and subtract from the
current time.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com