Deleted Added
full compact
pdb.c (50479) pdb.c (99829)
1/*
2 * Copyright (c) 1994 Christopher G. Demetriou
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef lint
32static const char rcsid[] =
1/*
2 * Copyright (c) 1994 Christopher G. Demetriou
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef lint
32static const char rcsid[] =
33 "$FreeBSD: head/usr.sbin/sa/pdb.c 50479 1999-08-28 01:35:59Z peter $";
33 "$FreeBSD: head/usr.sbin/sa/pdb.c 99829 2002-07-11 22:11:20Z alfred $";
34#endif /* not lint */
35
36#include <sys/types.h>
37#include <sys/acct.h>
38#include <err.h>
39#include <errno.h>
40#include <fcntl.h>
41#include <stdio.h>

--- 353 unchanged lines hidden (view full) ---

395 if (cflag) {
396 if (cip != totalcip)
397 printf(" %4.2f%% ", cip->ci_stime / (double) totalcip->ci_stime);
398 else
399 printf(" %4s ", "");
400 }
401 }
402
34#endif /* not lint */
35
36#include <sys/types.h>
37#include <sys/acct.h>
38#include <err.h>
39#include <errno.h>
40#include <fcntl.h>
41#include <stdio.h>

--- 353 unchanged lines hidden (view full) ---

395 if (cflag) {
396 if (cip != totalcip)
397 printf(" %4.2f%% ", cip->ci_stime / (double) totalcip->ci_stime);
398 else
399 printf(" %4s ", "");
400 }
401 }
402
403 if (tflag)
403 if (tflag) {
404 if (!uflow)
404 if (!uflow)
405 printf("%8.2fre/cp ", cip->ci_etime / (double) (cip->ci_utime + cip->ci_stime));
405 printf("%8.2fre/cp ",
406 cip->ci_etime /
407 (double) (cip->ci_utime + cip->ci_stime));
406 else
407 printf("*ignore* ");
408 else
409 printf("*ignore* ");
410 }
408
409 if (Dflag)
410 printf("%10qutio ", cip->ci_io);
411 else
412 printf("%8.0favio ", cip->ci_io / c);
413
414 if (Kflag)
415 printf("%10quk*sec ", cip->ci_mem);
416 else
417 printf("%8.0fk ", cip->ci_mem / t);
418
419 printf(" %s\n", cip->ci_comm);
420}
411
412 if (Dflag)
413 printf("%10qutio ", cip->ci_io);
414 else
415 printf("%8.0favio ", cip->ci_io / c);
416
417 if (Kflag)
418 printf("%10quk*sec ", cip->ci_mem);
419 else
420 printf("%8.0fk ", cip->ci_mem / t);
421
422 printf(" %s\n", cip->ci_comm);
423}