[Buildroot] htop - "No btime in /proc/stat: Success"

Peter Seiderer ps.report at gmx.net
Wed Oct 20 18:10:53 UTC 2021


Hello Steve, Arnout,

On Wed, 20 Oct 2021 14:55:47 +0200, Steve <sleepy_dog at gmx.de> wrote:

>  
> > I don't understand how btime can be 0 though. Is the uptime (in /proc/uptime) also 0?

Most Raspberry Pi's are delivered without RTC and /proc/stat btime is set to
'...the time read off the RTC. This is represented in Unix time (aka POSIX time
or Epoch time).' (see [1]) and so will always be '0' (until you change the
date per cmdline or ntp)...

The htop misleading error message is fixed upstream by [2] and the current version
used on buildroot git master (htop-3.1.1) already contains the fix...

Regards,
Peter

[1] https://support.cumulusnetworks.com/hc/en-us/articles/204364887-Error-Message-Seen-missing-btime-in-proc-stat-
[2] https://github.com/htop-dev/htop/commit/7433bf4b18278080fb2ac22c5828490883066570

>  
> No, it's now "11014.58 22892.09"
>  
> Von: "Arnout Vandecappelle" <arnout at mind.be>
> 
> On 20/10/2021 14:29, Steve wrote:
> > > Is /proc mounted?
> > if "mount" outputting a line, among others, saying "proc on /proc type proc
> > (rw,relatime)" means that, then yes
> >
> > > What is the contents of /proc/stat?
> >
> > # cat /proc/stat
> > cpu  75 0 917 3631474 47 0 4 0 0 0
> > cpu0 26 0 336 907872 1 0 2 0 0 0
> > cpu1 23 0 536 907241 17 0 0 0 0 0
> > cpu2 19 0 22 908242 7 0 0 0 0 0
> > cpu3 7 0 23 908117 21 0 2 0 0 0
> > intr 123556 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 169 2275 0 3 0 0 0 0 0 0 0 0 0
> > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 60 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 644 0 0 0 0
> > 0 0 0 0 553 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> > 0 0 0 257 45046 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> > 0 0 0 0 0 0 0 0 74548 0 0 0
> > ctxt 184781
> > btime 0
> 
> Ah, so btime is there, but it's zero, and htop apparently doesn't like that.
> 
> I don't understand how btime can be 0 though. Is the uptime (in /proc/uptime)
> also 0?
> 
> 
> Regards,
> Arnout
> 
> 
> > processes 184
> > procs_running 1
> > procs_blocked 0
> > softirq 156657 0 70619 33 535 553 0 10351 72206 0 2360
> > *Von:* "Arnout Vandecappelle" <arnout at mind.be>
> >
> > On 20/10/2021 13:22, Steve wrote:
> > > Hello,
> > > a Linux image built with a recently downloaded buildroot, starting with the
> > > defconfig for RaspberryPi3 and adding some things (htop if it wasn't already,
> > > nano, openssh, openvpn; also the linux-menuconfig was altered, concerning USB
> > > driver stuff).
> > >
> > > When, in menuconfig, I search with / for htop, it shows that htop and all
> > > dependencies are met (all positive dependencies are [=y] and the one negative
> > > (static libs) is [=n].
> > > But when I call htop on the running system, I only get the line given in the
> > topic.
> > > What could be the problem?
> >
> > This is squarely in the "this shouldn't happen" domain...
> >
> > Is /proc mounted?
> >
> > What is the contents of /proc/stat?
> >
> >
> > Regards,
> > Arnout
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
> > <https://lists.buildroot.org/mailman/listinfo/buildroot>
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
> >
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 



More information about the buildroot mailing list