Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.embedded > #436

Re: Reading /proc/stat btime from user space

From Tauno Voipio <tauno.voipio@notused.fi.invalid>
Newsgroups comp.os.linux.embedded
Subject Re: Reading /proc/stat btime from user space
Date 2013-01-17 23:10 +0200
Organization A noiseless patient Spider
Message-ID <kd9pco$96j$1@dont-email.me> (permalink)
References <2ddadfb4-bd08-4ffa-9153-a009b722eb56@googlegroups.com> <a8c97d63-2856-45ca-802d-a539739c5343@googlegroups.com>

Show all headers | View raw


On 17.1.13 8:02 , SJC wrote:
> On Wednesday, January 16, 2013 10:37:20 PM UTC-8, SJC wrote:
>> I would like to read the value of /proc/stat btime in my user space program.  How can I do that?
>
> It is written in C.  How do I get that value into a C variable?


Are you asking how to read a file from C code?

The /proc pseudo-files read just in the same way as regular files
from the file system.

For details, please re-read your C programming manual.

-- 

Tauno Voipio

Back to comp.os.linux.embedded | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Reading /proc/stat btime from user space SJC <jobhunts02@aol.com> - 2013-01-16 22:37 -0800
  Re: Reading /proc/stat btime from user space Joerg Schmitz-Linneweber <joerg@schmitz-linneweber.name> - 2013-01-17 09:12 +0100
    Re: Reading /proc/stat btime from user space Joerg Schmitz-Linneweber <joerg@schmitz-linneweber.name> - 2013-01-17 09:17 +0100
  Re: Reading /proc/stat btime from user space SJC <jobhunts02@aol.com> - 2013-01-17 10:02 -0800
    Re: Reading /proc/stat btime from user space Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2013-01-17 23:10 +0200
  Re: Reading /proc/stat btime from user space SJC <jobhunts02@aol.com> - 2013-01-17 14:20 -0800
    Re: Reading /proc/stat btime from user space Joerg Schmitz-Linneweber <joerg@schmitz-linneweber.name> - 2013-01-18 16:41 +0100

csiph-web