1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. 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 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. 16 * 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 27 * SUCH DAMAGE. 28 * 29 * @(#)extern.h 8.3 (Berkeley) 4/2/94 30 * $FreeBSD: extern.h,v 1.8 1998/05/25 05:07:17 steve Exp $ 31 */ 32 33struct kinfo; 34struct nlist; 35struct var; 36struct varent; 37 38extern fixpt_t ccpu; 39extern int cflag, eval, fscale, nlistread, rawcpu; 40#ifdef __APPLE__ 41extern uint64_t mempages; 42#else 43extern unsigned long mempages; 44#endif 45extern time_t now; 46extern int showthreads, sumrusage, termwidth, totwidth; 47extern STAILQ_HEAD(velisthead, varent) varlist; 48 49__BEGIN_DECLS 50int get_task_info(KINFO *); 51void command(KINFO *, VARENT *); 52void just_command(KINFO *, VARENT *); 53void args(KINFO *, VARENT *); 54int s_command(KINFO *); 55int s_just_command(KINFO *); 56int s_args(KINFO *); 57void cputime(KINFO *, VARENT *); 58void pstime(KINFO *, VARENT *); 59void p_etime(KINFO *, VARENT *); 60int s_etime(KINFO *); 61void putime(KINFO *, VARENT *); 62int donlist(void); 63void evar(KINFO *, VARENT *); 64VARENT *find_varentry(VAR *); 65const char *fmt_argv(char **, char *, size_t); 66int getpcpu(KINFO *); 67double getpmem(KINFO *); 68void logname(KINFO *, VARENT *); 69void longtname(KINFO *, VARENT *); 70void lstarted(KINFO *, VARENT *); 71void maxrss(KINFO *, VARENT *); 72void nlisterr(struct nlist *); 73void p_rssize(KINFO *, VARENT *); 74void pagein(KINFO *, VARENT *); 75void parsefmt(const char *, int); 76void pcpu(KINFO *, VARENT *); 77void pmem(KINFO *, VARENT *); 78void pri(KINFO *, VARENT *); 79void rtprior(KINFO *, VARENT *); 80void printheader(void); 81void pvar(KINFO *, VARENT *); 82void runame(KINFO *, VARENT *); 83void rvar(KINFO *, VARENT *); 84int s_runame(KINFO *); 85int s_uname(KINFO *); 86void showkey(void); 87void started(KINFO *, VARENT *); 88void state(KINFO *, VARENT *); 89void tdev(KINFO *, VARENT *); 90void tname(KINFO *, VARENT *); 91void tsize(KINFO *, VARENT *); 92void ucomm(KINFO *, VARENT *); 93void uname(KINFO *, VARENT *); 94void uvar(KINFO *, VARENT *); 95void vsize(KINFO *, VARENT *); 96void wchan(KINFO *, VARENT *); 97void wq(KINFO *, VARENT *); 98__END_DECLS 99