ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/statgrab_deprecated.h
Revision: 1.1
Committed: Tue Apr 6 16:37:34 2004 UTC (20 years ago) by tdb
Content type: text/plain
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_17, LIBSTATGRAB_0_16, LIBSTATGRAB_0_15, LIBSTATGRAB_0_14, LIBSTATGRAB_0_13, LIBSTATGRAB_0_12, LIBSTATGRAB_0_11_1, LIBSTATGRAB_0_11, LIBSTATGRAB_0_10_3, LIBSTATGRAB_0_10_2, LIBSTATGRAB_0_10_1, LIBSTATGRAB_0_10, HEAD
Log Message:
Add compatibility code. This provides a working pre-0.10 API for old
applications. To use simply change the #include line to:

#define SG_ENABLE_DEPRECATED
#include <statgrab.h>

This can be disabled at build time completely using --disable-deprecated.

File Contents

# Content
1 /*
2 * i-scream libstatgrab
3 * http://www.i-scream.org
4 * Copyright (C) 2000-2004 i-scream
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 * 02111-1307 USA
20 *
21 * $Id$
22 */
23
24 #include <sys/types.h>
25
26 int statgrab_init(void);
27 int statgrab_drop_privileges(void);
28
29 typedef sg_host_info general_stat_t;
30
31 general_stat_t *get_general_stats();
32
33 typedef sg_cpu_stats cpu_states_t;
34
35 cpu_states_t *get_cpu_totals();
36 cpu_states_t *get_cpu_diff();
37
38 typedef sg_cpu_percents cpu_percent_t;
39
40 cpu_percent_t *cpu_percent_usage();
41
42 typedef sg_mem_stats mem_stat_t;
43
44 mem_stat_t *get_memory_stats();
45
46 typedef sg_load_stats load_stat_t;
47
48 load_stat_t *get_load_stats();
49
50 typedef sg_user_stats user_stat_t;
51
52 user_stat_t *get_user_stats();
53
54 typedef sg_swap_stats swap_stat_t;
55
56 swap_stat_t *get_swap_stats();
57
58 typedef sg_fs_stats disk_stat_t;
59
60 disk_stat_t *get_disk_stats(int *entries);
61
62 typedef sg_disk_io_stats diskio_stat_t;
63
64 diskio_stat_t *get_diskio_stats(int *entries);
65 diskio_stat_t *get_diskio_stats_diff(int *entries);
66
67 typedef sg_network_io_stats network_stat_t;
68
69 network_stat_t *get_network_stats(int *entries);
70 network_stat_t *get_network_stats_diff(int *entries);
71
72 /* Changed in statgrab.h 1.33 */
73 typedef enum{
74 FULL_DUPLEX,
75 HALF_DUPLEX,
76 UNKNOWN_DUPLEX
77 }statgrab_duplex;
78
79 typedef sg_network_iface_stats network_iface_stat_t;
80
81 network_iface_stat_t *get_network_iface_stats(int *entries);
82
83 typedef sg_page_stats page_stat_t;
84
85 page_stat_t *get_page_stats();
86 page_stat_t *get_page_stats_diff();
87
88 typedef sg_process_count process_stat_t;
89
90 process_stat_t *get_process_stats();
91