Linux: add process->starttime and use it for STARTTIME column (#700)

this way a remount of /proc will not reset starttimes
and we can also see startup times for processes started before the mount
of /proc

also record btime (boot time in seconds since epoch) as Linux semi-global
This commit is contained in:
Shawn Landden
2018-08-18 21:29:03 -07:00
committed by Hisham Muhammad
parent ca1cce4ce7
commit bd1d719a61
4 changed files with 42 additions and 17 deletions

View File

@ -98,6 +98,7 @@ typedef struct LinuxProcess_ {
long m_drs;
long m_lrs;
long m_dt;
unsigned long long starttime;
#ifdef HAVE_TASKSTATS
unsigned long long io_rchar;
unsigned long long io_wchar;
@ -143,6 +144,8 @@ typedef struct LinuxProcess_ {
#endif
long long btime; /* semi-global */
extern ProcessFieldData Process_fields[];
extern ProcessPidColumn Process_pidColumns[];