279 |
|
die("out of memory"); |
280 |
|
|
281 |
|
name = buf; |
282 |
+ |
if (strlen(name) == 2 && name[1] == ':') |
283 |
+ |
name[1] = '\0'; |
284 |
|
if (strncmp(name, "/dev/", 5) == 0) |
285 |
|
name += 5; |
286 |
|
while ((p = strchr(name, '/')) != NULL) |
371 |
|
if (page != NULL) { |
372 |
|
add_stat(LONG_LONG, &page->pages_pagein, "page", "in", NULL); |
373 |
|
add_stat(LONG_LONG, &page->pages_pageout, "page", "out", NULL); |
374 |
< |
add_stat(LONG_LONG, &page->systime, "page", "systime", NULL); |
374 |
> |
add_stat(TIME_T, &page->systime, "page", "systime", NULL); |
375 |
|
} |
376 |
|
} |
377 |
|
|
604 |
|
use_diffs = 1; |
605 |
|
|
606 |
|
select_interesting(argc - optind, &argv[optind]); |
607 |
+ |
|
608 |
+ |
/* We don't care if statgrab_init fails, because we can just display |
609 |
+ |
the statistics that can be read as non-root. */ |
610 |
+ |
statgrab_init(); |
611 |
+ |
#ifdef ALLBSD |
612 |
+ |
if (setegid(getgid()) != 0) |
613 |
+ |
die("Failed to lose effective group"); |
614 |
+ |
#endif |
615 |
|
|
616 |
|
switch (repeat_mode) { |
617 |
|
case REPEAT_NONE: |