diff options
Diffstat (limited to 'libbb/procps.c')
-rw-r--r-- | libbb/procps.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 6bc16d166..015ad80ef 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -243,7 +243,8 @@ procps_status_t *procps_scan(procps_status_t* sp, int flags) | |||
243 | "%lu %lu " /* utime, stime */ | 243 | "%lu %lu " /* utime, stime */ |
244 | "%*s %*s %*s " /* cutime, cstime, priority */ | 244 | "%*s %*s %*s " /* cutime, cstime, priority */ |
245 | "%ld " /* nice */ | 245 | "%ld " /* nice */ |
246 | "%*s %*s %*s " /* timeout, it_real_value, start_time */ | 246 | "%*s %*s " /* timeout, it_real_value */ |
247 | "%lu " /* start_time */ | ||
247 | "%lu " /* vsize */ | 248 | "%lu " /* vsize */ |
248 | "%lu " /* rss */ | 249 | "%lu " /* rss */ |
249 | /* "%lu %lu %lu %lu %lu %lu " rss_rlim, start_code, end_code, start_stack, kstk_esp, kstk_eip */ | 250 | /* "%lu %lu %lu %lu %lu %lu " rss_rlim, start_code, end_code, start_stack, kstk_esp, kstk_eip */ |
@@ -254,6 +255,7 @@ procps_status_t *procps_scan(procps_status_t* sp, int flags) | |||
254 | &sp->pgid, &sp->sid, &tty, | 255 | &sp->pgid, &sp->sid, &tty, |
255 | &sp->utime, &sp->stime, | 256 | &sp->utime, &sp->stime, |
256 | &tasknice, | 257 | &tasknice, |
258 | &sp->start_time, | ||
257 | &vsz, | 259 | &vsz, |
258 | &rss); | 260 | &rss); |
259 | if (n != 10) | 261 | if (n != 10) |
@@ -280,7 +282,8 @@ procps_status_t *procps_scan(procps_status_t* sp, int flags) | |||
280 | sp->stime = fast_strtoul_10(&cp); | 282 | sp->stime = fast_strtoul_10(&cp); |
281 | cp = skip_fields(cp, 3); /* cutime, cstime, priority */ | 283 | cp = skip_fields(cp, 3); /* cutime, cstime, priority */ |
282 | tasknice = fast_strtoul_10(&cp); | 284 | tasknice = fast_strtoul_10(&cp); |
283 | cp = skip_fields(cp, 3); /* timeout, it_real_value, start_time */ | 285 | cp = skip_fields(cp, 2); /* timeout, it_real_value */ |
286 | sp->start_time = fast_strtoul_10(&cp); | ||
284 | /* vsz is in bytes and we want kb */ | 287 | /* vsz is in bytes and we want kb */ |
285 | sp->vsz = fast_strtoul_10(&cp) >> 10; | 288 | sp->vsz = fast_strtoul_10(&cp) >> 10; |
286 | /* vsz is in bytes but rss is in *PAGES*! Can you believe that? */ | 289 | /* vsz is in bytes but rss is in *PAGES*! Can you believe that? */ |