xref: /dragonfly/usr.bin/kcollect/kcollect.h (revision 145205d1)
1f9c8e4acSMatthew Dillon /*
2f9c8e4acSMatthew Dillon  * Copyright (c) 2017 The DragonFly Project.  All rights reserved.
3f9c8e4acSMatthew Dillon  *
4f9c8e4acSMatthew Dillon  * This code is derived from software contributed to The DragonFly Project
5f9c8e4acSMatthew Dillon  * by Matthew Dillon <dillon@backplane.com>
6f9c8e4acSMatthew Dillon  *
7f9c8e4acSMatthew Dillon  * Redistribution and use in source and binary forms, with or without
8f9c8e4acSMatthew Dillon  * modification, are permitted provided that the following conditions
9f9c8e4acSMatthew Dillon  * are met:
10f9c8e4acSMatthew Dillon  *
11f9c8e4acSMatthew Dillon  * 1. Redistributions of source code must retain the above copyright
12f9c8e4acSMatthew Dillon  *    notice, this list of conditions and the following disclaimer.
13f9c8e4acSMatthew Dillon  * 2. Redistributions in binary form must reproduce the above copyright
14f9c8e4acSMatthew Dillon  *    notice, this list of conditions and the following disclaimer in
15f9c8e4acSMatthew Dillon  *    the documentation and/or other materials provided with the
16f9c8e4acSMatthew Dillon  *    distribution.
17f9c8e4acSMatthew Dillon  *
18f9c8e4acSMatthew Dillon  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19f9c8e4acSMatthew Dillon  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20f9c8e4acSMatthew Dillon  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21f9c8e4acSMatthew Dillon  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
22f9c8e4acSMatthew Dillon  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23f9c8e4acSMatthew Dillon  * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24f9c8e4acSMatthew Dillon  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25f9c8e4acSMatthew Dillon  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26f9c8e4acSMatthew Dillon  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27f9c8e4acSMatthew Dillon  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28f9c8e4acSMatthew Dillon  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29f9c8e4acSMatthew Dillon  * SUCH DAMAGE.
30f9c8e4acSMatthew Dillon  */
31f9c8e4acSMatthew Dillon 
32f9c8e4acSMatthew Dillon #include <sys/types.h>
33f9c8e4acSMatthew Dillon #include <sys/sysctl.h>
34f9c8e4acSMatthew Dillon #include <sys/kcollect.h>
35f9c8e4acSMatthew Dillon #include <time.h>
36f9c8e4acSMatthew Dillon #include <stdio.h>
37f9c8e4acSMatthew Dillon #include <stdlib.h>
38f9c8e4acSMatthew Dillon #include <unistd.h>
39f9c8e4acSMatthew Dillon #include <string.h>
40f9c8e4acSMatthew Dillon #include <libutil.h>
41f9c8e4acSMatthew Dillon 
42f9c8e4acSMatthew Dillon extern FILE *OutFP;
43f9c8e4acSMatthew Dillon extern int UseGMT;
44f9c8e4acSMatthew Dillon extern int OutputWidth;
45f9c8e4acSMatthew Dillon extern int OutputHeight;
46b038db3dSMatthew Dillon extern int SmoothOpt;
47f9c8e4acSMatthew Dillon 
48*56160b9cSMatthew Dillon void start_gnuplot(int ac, char **av, const char *plotfile);
49*56160b9cSMatthew Dillon void dump_gnuplot(kcollect_t *ary, size_t count);
50