1 /* Copyright (C) 1998-99 Martin Baulig 2 This file is part of LibGTop 1.0. 3 4 Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998. 5 6 LibGTop is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, 9 or (at your option) any later version. 10 11 LibGTop is distributed in the hope that it will be useful, but WITHOUT 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with LibGTop; see the file COPYING. If not, write to the 18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __GLIBTOP_SYSDEPS_H__ 23 #define __GLIBTOP_SYSDEPS_H__ 24 25 #include <glibtop.h> 26 27 G_BEGIN_DECLS 28 29 #define GLIBTOP_SYSDEPS_FEATURES 0 30 #define GLIBTOP_SYSDEPS_CPU 1 31 #define GLIBTOP_SYSDEPS_MEM 2 32 #define GLIBTOP_SYSDEPS_SWAP 3 33 #define GLIBTOP_SYSDEPS_UPTIME 4 34 #define GLIBTOP_SYSDEPS_LOADAVG 5 35 #define GLIBTOP_SYSDEPS_SHM_LIMITS 6 36 #define GLIBTOP_SYSDEPS_MSG_LIMITS 7 37 #define GLIBTOP_SYSDEPS_SEM_LIMITS 8 38 #define GLIBTOP_SYSDEPS_PROCLIST 9 39 #define GLIBTOP_SYSDEPS_PROC_STATE 10 40 #define GLIBTOP_SYSDEPS_PROC_UID 11 41 #define GLIBTOP_SYSDEPS_PROC_MEM 12 42 #define GLIBTOP_SYSDEPS_PROC_TIME 13 43 #define GLIBTOP_SYSDEPS_PROC_SIGNAL 14 44 #define GLIBTOP_SYSDEPS_PROC_KERNEL 15 45 #define GLIBTOP_SYSDEPS_PROC_SEGMENT 16 46 #define GLIBTOP_SYSDEPS_PROC_ARGS 17 47 #define GLIBTOP_SYSDEPS_PROC_MAP 18 48 #define GLIBTOP_SYSDEPS_MOUNTLIST 19 49 #define GLIBTOP_SYSDEPS_FSUSAGE 20 50 #define GLIBTOP_SYSDEPS_NETLOAD 21 51 #define GLIBTOP_SYSDEPS_PPP 22 52 #define GLIBTOP_SYSDEPS_NETLIST 23 53 #define GLIBTOP_SYSDEPS_PROC_OPEN_FILES 24 54 #define GLIBTOP_SYSDEPS_PROC_WD 25 55 #define GLIBTOP_SYSDEPS_PROC_AFFINITY 26 56 #define GLIBTOP_SYSDEPS_PROC_IO 27 57 58 #define GLIBTOP_MAX_SYSDEPS 28 59 60 /* The 'features' args to glibtop_init_* is an unsigned long */ 61 G_STATIC_ASSERT((1UL << (GLIBTOP_MAX_SYSDEPS - 1)) <= ULONG_MAX); 62 63 #define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1) 64 65 typedef struct _glibtop_sysdeps glibtop_sysdeps; 66 67 struct _glibtop_sysdeps 68 { 69 guint64 flags; 70 guint64 features; /* server features */ 71 guint64 cpu; /* glibtop_cpu */ 72 guint64 mem; /* glibtop_mem */ 73 guint64 swap; /* glibtop_swap */ 74 guint64 uptime; /* glibtop_uptime */ 75 guint64 loadavg; /* glibtop_loadavg */ 76 guint64 shm_limits; /* glibtop_shm_limits */ 77 guint64 msg_limits; /* glibtop_msg_limits */ 78 guint64 sem_limits; /* glibtop_sem_limits */ 79 guint64 proclist; /* glibtop_proclist */ 80 guint64 proc_state; /* glibtop_proc_state */ 81 guint64 proc_uid; /* glibtop_proc_uid */ 82 guint64 proc_mem; /* glibtop_proc_mem */ 83 guint64 proc_time; /* glibtop_proc_time */ 84 guint64 proc_signal; /* glibtop_proc_signal */ 85 guint64 proc_kernel; /* glibtop_proc_kernel */ 86 guint64 proc_segment; /* glibtop_proc_segment */ 87 guint64 proc_args; /* glibtop_proc_args */ 88 guint64 proc_map; /* glibtop_proc_map */ 89 guint64 proc_open_files; /* glibtop_proc_open_files */ 90 guint64 mountlist; /* glibtop_mountlist */ 91 guint64 fsusage; /* glibtop_fsusage */ 92 guint64 netlist; /* glibtop_netlist */ 93 guint64 netload; /* glibtop_netload */ 94 guint64 ppp; /* glibtop_ppp */ 95 guint64 proc_wd; /* glibtop_proc_wd */ 96 guint64 proc_affinity; /* glibtop_proc_affinity */ 97 guint64 proc_io; /* glibtop_proc_io */ 98 guint64 reserved0; 99 guint64 reserved1; 100 guint64 reserved2; 101 guint64 reserved3; 102 guint64 reserved4; 103 guint64 reserved5; 104 guint64 reserved6; 105 guint64 reserved7; 106 }; 107 108 void glibtop_get_sysdeps (glibtop_sysdeps *buf); 109 void glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf); 110 111 112 G_END_DECLS 113 114 #endif 115