Your message dated Fri, 2 Oct 2020 15:22:09 +0200
with message-id 
<CAJ2a_DfwREfvr3Y7AtaSQQB4JuBpUFUPWZ+bMUxfLij9JCG=1...@mail.gmail.com>
and subject line Re: (Bug #673626) STARTTIME is mount time of /proc if mounted 
after start time
has caused the Debian Bug report #673626,
regarding STARTTIME is mount time of /proc if mounted after start time
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
673626: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673626
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: htop
Version: 1.0.1-1em1
Severity: normal
Tags: upstream

The starttime column can show inaccurate times if you remount your /proc, as
recently happened in my system. (well, I'm not sure this is what it is, but 
after
reading the source, this seems the most likely cause-I am using systemd if that 
means anything)
This is because the information is based of stat()ing the /proc/$PID 
directories.

Reading into the source, I am wondering what it has to do all these stat() and 
time() calls
for every process, even if the start column is not active in the main display,
especially when there is a "starttime" field in /proc/$PID/stat documented in 
man 5 proc.
(which we are already accessing and parsing)

I started working on a patch, but as the starttime given in /proc/$PID/stat is 
relative
to boot time, I am not sure how else than via /proc/uptime to access it, which 
UptimeMeter.c
does. It would make sense to cache this lookup, to use the /proc/$PID/stat 
source of
starttime's on processes.

As a side node: why are 
&process->utime, &process->stime, &process->cutime, &process->cstime, 
%llu, instead of %ld as documented in man 5 proc? Does the code use negative 
numbers on these
for some purpose, or can some memory be saved here?

-Shawn
-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable-grip
  APT policy: (200, 'unstable-grip'), (101, 'unstable'), (100, 'experimental')
Architecture: armel (armv5tel)

Kernel: Linux 3.4.0-rc1-tomoyo-00001-g69b407e (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages htop depends on:
ii  libc6         2.13-32em1
ii  libgcc1       1:4.7.0-8em1
ii  libncursesw5  5.9-7em1
ii  libtinfo5     5.9-7em1

htop recommends no packages.

htop suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 3.0.0-1

Fixed with: 
https://github.com/htop-dev/htop/commit/bd1d719a61bbca16f7dd373dcc1e234f3c8ea09b

--- End Message ---

Reply via email to