[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
 

Re: [CPROG] Uptime?



----- Original Message -----
From: Hroi Sigurdsson <sslug@sslug>
Newsgroups: sslug.cprog,sslug.perl
To: <sslug@sslug>
Sent: 4. april 1999 21:20
Subject: [CPROG] 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?

/proc/uptime indeholder to værdier på min maskine, den ene tæller oppetid
i sekunder den anden idletid i sekunder (/usr/src/linux er den bedste
odkumentation for indholdet af /proc).

>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??

Hmm...

>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).

Som sagt virker det som forventet på min maskine.

Mvh,
Sune Kirkeby




 
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] *