2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * @(#)extern.h 8.3 (Berkeley) 4/2/94
39 extern int cflag, eval, fscale, nlistread, rawcpu;
40 extern unsigned long mempages;
42 extern int showthreads, sumrusage, termwidth, totwidth;
43 extern STAILQ_HEAD(velisthead, varent) varlist;
46 void arguments(KINFO *, VARENT *);
47 void command(KINFO *, VARENT *);
48 void cputime(KINFO *, VARENT *);
50 void elapsed(KINFO *, VARENT *);
51 void elapseds(KINFO *, VARENT *);
52 void emulname(KINFO *, VARENT *);
53 VARENT *find_varentry(VAR *);
54 const char *fmt_argv(char **, char *, size_t);
55 double getpcpu(const KINFO *);
56 void kvar(KINFO *, VARENT *);
57 void label(KINFO *, VARENT *);
58 void loginclass(KINFO *, VARENT *);
59 void logname(KINFO *, VARENT *);
60 void longtname(KINFO *, VARENT *);
61 void lstarted(KINFO *, VARENT *);
62 void maxrss(KINFO *, VARENT *);
63 void lockname(KINFO *, VARENT *);
64 void mwchan(KINFO *, VARENT *);
65 void nwchan(KINFO *, VARENT *);
66 void pagein(KINFO *, VARENT *);
67 void parsefmt(const char *, int);
68 void pcpu(KINFO *, VARENT *);
69 void pmem(KINFO *, VARENT *);
70 void pri(KINFO *, VARENT *);
71 void printheader(void);
72 void priorityr(KINFO *, VARENT *);
73 void egroupname(KINFO *, VARENT *);
74 void rgroupname(KINFO *, VARENT *);
75 void runame(KINFO *, VARENT *);
76 void rvar(KINFO *, VARENT *);
78 int s_cputime(KINFO *);
80 int s_loginclass(KINFO *);
81 int s_logname(KINFO *);
82 int s_egroupname(KINFO *);
83 int s_rgroupname(KINFO *);
84 int s_runame(KINFO *);
85 int s_systime(KINFO *);
87 int s_usertime(KINFO *);
89 void started(KINFO *, VARENT *);
90 void state(KINFO *, VARENT *);
91 void systime(KINFO *, VARENT *);
92 void tdev(KINFO *, VARENT *);
93 void tdnam(KINFO *, VARENT *);
94 void tname(KINFO *, VARENT *);
95 void ucomm(KINFO *, VARENT *);
96 void uname(KINFO *, VARENT *);
97 void upr(KINFO *, VARENT *);
98 void usertime(KINFO *, VARENT *);
99 void vsize(KINFO *, VARENT *);
100 void wchan(KINFO *, VARENT *);