[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Uptime?



Hvordan bærer jeg mig lettest ad med at få fat i maskinens oppetid (målt
i år?, dage, timer og minutter)i f.eks. et perl eller C program? Jeg
havde forestillet mig at man bare kunne konvertere fra /proc/uptime, men
efter at have studeret denne fil med "watch -n 1 cat /proc/uptime", kan
jeg se at den ikke følger med tiden og de to værdier ændres ikke med
samme hastighed. Eller er det watch som er upræcis?
Jeg har kigget lidt i sourcen til procps, der læses godtnok fra
/proc/uptime, men samtidig bliver der åbenbart taget højde for
processorens MHz??
Er der nogen der har noget dokumentation til /proc/uptime, eller har en
stump kode der gør dette? Perl eller C er ligemeget (eller shell for den
sags skyld).
-- 
Hroi Kristjan Sigurdsson  
sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *