diff --git a/sysdeps/kernel/Makefile.am b/sysdeps/kernel/Makefile.am new file mode 100644 index 00000000..35b8ea65 --- /dev/null +++ b/sysdeps/kernel/Makefile.am @@ -0,0 +1,17 @@ +LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + +INCLUDES = @INCLUDES@ + +lib_LTLIBRARIES = libgtop_sysdeps.la + +libgtop_sysdeps_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \ + uptime.c loadavg.c shm_limits.c msg_limits.c \ + sem_limits.c proclist.c procstate.c procuid.c \ + proctime.c procmem.c procsignal.c prockernel.c \ + procsegment.c procargs.c procmap.c netload.c \ + ppp.c + +libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) + +include_HEADERS = glibtop_server.h + diff --git a/sysdeps/kernel/close.c b/sysdeps/kernel/close.c new file mode 100644 index 00000000..4262d2f0 --- /dev/null +++ b/sysdeps/kernel/close.c @@ -0,0 +1,30 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include + +/* Closes pipe to gtop server. */ + +void +glibtop_close_s (glibtop *server) +{ } diff --git a/sysdeps/kernel/cpu.c b/sysdeps/kernel/cpu.c new file mode 100644 index 00000000..3ddfdfb8 --- /dev/null +++ b/sysdeps/kernel/cpu.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_cpu = 0; + +/* Init function. */ + +void +glibtop_init_cpu_s (glibtop *server) +{ + server->sysdeps.cpu = _glibtop_sysdeps_cpu; +} + +/* Provides information about cpu usage. */ + +void +glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) +{ + memset (buf, 0, sizeof (glibtop_cpu)); +} diff --git a/sysdeps/kernel/glibtop_server.h b/sysdeps/kernel/glibtop_server.h new file mode 100644 index 00000000..b3822d47 --- /dev/null +++ b/sysdeps/kernel/glibtop_server.h @@ -0,0 +1,52 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef __GLIBTOP_SERVER_H__ +#define __GLIBTOP_SERVER_H__ + +BEGIN_LIBGTOP_DECLS + +#define GLIBTOP_SUID_CPU 0 +#define GLIBTOP_SUID_MEM 0 +#define GLIBTOP_SUID_SWAP 0 +#define GLIBTOP_SUID_UPTIME 0 +#define GLIBTOP_SUID_LOADAVG 0 +#define GLIBTOP_SUID_SHM_LIMITS 0 +#define GLIBTOP_SUID_MSG_LIMITS 0 +#define GLIBTOP_SUID_SEM_LIMITS 0 +#define GLIBTOP_SUID_PROCLIST 0 +#define GLIBTOP_SUID_PROC_STATE 0 +#define GLIBTOP_SUID_PROC_UID 0 +#define GLIBTOP_SUID_PROC_MEM 0 +#define GLIBTOP_SUID_PROC_TIME 0 +#define GLIBTOP_SUID_PROC_SIGNAL 0 +#define GLIBTOP_SUID_PROC_KERNEL 0 +#define GLIBTOP_SUID_PROC_SEGMENT 0 +#define GLIBTOP_SUID_PROC_ARGS 0 +#define GLIBTOP_SUID_PROC_MAP 0 +#define GLIBTOP_SUID_NETLOAD 0 +#define GLIBTOP_SUID_PPP 0 + +END_LIBGTOP_DECLS + +#endif diff --git a/sysdeps/kernel/loadavg.c b/sysdeps/kernel/loadavg.c new file mode 100644 index 00000000..9bf900f5 --- /dev/null +++ b/sysdeps/kernel/loadavg.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_loadavg = 0; + +/* Init function. */ + +void +glibtop_init_loadavg_s (glibtop *server) +{ + server->sysdeps.loadavg = _glibtop_sysdeps_loadavg; +} + +/* Provides load averange. */ + +void +glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf) +{ + memset (buf, 0, sizeof (glibtop_loadavg)); +} diff --git a/sysdeps/kernel/mem.c b/sysdeps/kernel/mem.c new file mode 100644 index 00000000..8a2c31a5 --- /dev/null +++ b/sysdeps/kernel/mem.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_mem = 0; + +/* Init function. */ + +void +glibtop_init_mem_s (glibtop *server) +{ + server->sysdeps.mem = _glibtop_sysdeps_mem; +} + +/* Provides information about memory usage. */ + +void +glibtop_get_mem_s (glibtop *server, glibtop_mem *buf) +{ + memset (buf, 0, sizeof (glibtop_mem)); +} diff --git a/sysdeps/kernel/msg_limits.c b/sysdeps/kernel/msg_limits.c new file mode 100644 index 00000000..adee0dae --- /dev/null +++ b/sysdeps/kernel/msg_limits.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_msg_limits = 0; + +/* Init function. */ + +void +glibtop_init_msg_limits_s (glibtop *server) +{ + server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits; +} + +/* Provides information about sysv ipc limits. */ + +void +glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf) +{ + memset (buf, 0, sizeof (glibtop_msg_limits)); +} diff --git a/sysdeps/kernel/netload.c b/sysdeps/kernel/netload.c new file mode 100644 index 00000000..beebedba --- /dev/null +++ b/sysdeps/kernel/netload.c @@ -0,0 +1,45 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , October 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include + +static const unsigned long _glibtop_sysdeps_netload = 0; + +/* Init function. */ + +void +glibtop_init_netload_s (glibtop *server) +{ + server->sysdeps.netload = _glibtop_sysdeps_netload; +} + +/* Provides network statistics. */ + +void +glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, + const char *interface) +{ + memset (buf, 0, sizeof (glibtop_netload)); +} diff --git a/sysdeps/kernel/open.c b/sysdeps/kernel/open.c new file mode 100644 index 00000000..eef22d71 --- /dev/null +++ b/sysdeps/kernel/open.c @@ -0,0 +1,33 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include + +/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */ + +void +glibtop_open_s (glibtop *server, const char *program_name, + const unsigned long features, const unsigned flags) +{ + server->name = program_name; +} diff --git a/sysdeps/kernel/ppp.c b/sysdeps/kernel/ppp.c new file mode 100644 index 00000000..6d0905d5 --- /dev/null +++ b/sysdeps/kernel/ppp.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , October 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include + +static const unsigned long _glibtop_sysdeps_ppp = 0; + +/* Init function. */ + +void +glibtop_init_ppp_s (glibtop *server) +{ + server->sysdeps.ppp = _glibtop_sysdeps_ppp; +} + +/* Provides PPP/ISDN information. */ + +void +glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device) +{ + memset (buf, 0, sizeof (glibtop_ppp)); +} diff --git a/sysdeps/kernel/procargs.c b/sysdeps/kernel/procargs.c new file mode 100644 index 00000000..7d010d5e --- /dev/null +++ b/sysdeps/kernel/procargs.c @@ -0,0 +1,47 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_args = 0; + +/* Init function. */ + +void +glibtop_init_proc_args_s (glibtop *server) +{ + server->sysdeps.proc_args = _glibtop_sysdeps_proc_args; +} + +/* Provides detailed information about a process. */ + +char * +glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf, + pid_t pid, unsigned max_len) +{ + memset (buf, 0, sizeof (glibtop_proc_args)); + return NULL; +} diff --git a/sysdeps/kernel/prockernel.c b/sysdeps/kernel/prockernel.c new file mode 100644 index 00000000..d06f6cab --- /dev/null +++ b/sysdeps/kernel/prockernel.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_kernel = 0; + +/* Init function. */ + +void +glibtop_init_proc_kernel_s (glibtop *server) +{ + server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_kernel)); +} diff --git a/sysdeps/kernel/proclist.c b/sysdeps/kernel/proclist.c new file mode 100644 index 00000000..7794cdba --- /dev/null +++ b/sysdeps/kernel/proclist.c @@ -0,0 +1,52 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +#define GLIBTOP_PROCLIST_FLAGS 3 + +static const unsigned long _glibtop_sysdeps_proclist = 0; + +/* Init function. */ + +void +glibtop_init_proclist_s (glibtop *server) +{ + server->sysdeps.proclist = _glibtop_sysdeps_proclist; +} + +/* Fetch list of currently running processes. + * + * IMPORTANT NOTE: + * On error, this function MUST return NULL and set buf->flags to zero ! + * On success, it returnes a pointer to a list of buf->number elements + * each buf->size big. The total size is stored in buf->total. */ + +unsigned * +glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, + int64_t which, int64_t arg) +{ + memset (buf, 0, sizeof (glibtop_proclist)); + return NULL; +} diff --git a/sysdeps/kernel/procmap.c b/sysdeps/kernel/procmap.c new file mode 100644 index 00000000..5a6c479a --- /dev/null +++ b/sysdeps/kernel/procmap.c @@ -0,0 +1,50 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + + +#include +#include +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_map = 0; + +/* Init function. */ + +void +glibtop_init_proc_map_s (glibtop *server) +{ + server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; +} + +/* Provides detailed information about a process. */ + +glibtop_map_entry * +glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid) +{ + glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0); + + memset (buf, 0, sizeof (glibtop_proc_map)); + + return NULL; +} diff --git a/sysdeps/kernel/procmem.c b/sysdeps/kernel/procmem.c new file mode 100644 index 00000000..ab0c4170 --- /dev/null +++ b/sysdeps/kernel/procmem.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_mem = 0; + +/* Init function. */ + +void +glibtop_init_proc_mem_s (glibtop *server) +{ + server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_mem)); +} diff --git a/sysdeps/kernel/procsegment.c b/sysdeps/kernel/procsegment.c new file mode 100644 index 00000000..b03709d4 --- /dev/null +++ b/sysdeps/kernel/procsegment.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_segment = 0; + +/* Init function. */ + +void +glibtop_init_proc_segment_s (glibtop *server) +{ + server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_segment)); +} diff --git a/sysdeps/kernel/procsignal.c b/sysdeps/kernel/procsignal.c new file mode 100644 index 00000000..540960f5 --- /dev/null +++ b/sysdeps/kernel/procsignal.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_signal = 0; + +/* Init function. */ + +void +glibtop_init_proc_signal_s (glibtop *server) +{ + server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_signal)); +} diff --git a/sysdeps/kernel/procstate.c b/sysdeps/kernel/procstate.c new file mode 100644 index 00000000..227f52ee --- /dev/null +++ b/sysdeps/kernel/procstate.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_state = 0; + +/* Init function. */ + +void +glibtop_init_proc_state_s (glibtop *server) +{ + server->sysdeps.proc_state = _glibtop_sysdeps_proc_state; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_state)); +} diff --git a/sysdeps/kernel/proctime.c b/sysdeps/kernel/proctime.c new file mode 100644 index 00000000..4c060235 --- /dev/null +++ b/sysdeps/kernel/proctime.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_time = 0; + +/* Init function. */ + +void +glibtop_init_proc_time_s (glibtop *server) +{ + server->sysdeps.proc_time = _glibtop_sysdeps_proc_time; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_time)); +} diff --git a/sysdeps/kernel/procuid.c b/sysdeps/kernel/procuid.c new file mode 100644 index 00000000..f9f68311 --- /dev/null +++ b/sysdeps/kernel/procuid.c @@ -0,0 +1,44 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_proc_uid = 0; + +/* Init function. */ + +void +glibtop_init_proc_uid_s (glibtop *server) +{ + server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid; +} + +/* Provides detailed information about a process. */ + +void +glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, + pid_t pid) +{ + memset (buf, 0, sizeof (glibtop_proc_uid)); +} diff --git a/sysdeps/kernel/sem_limits.c b/sysdeps/kernel/sem_limits.c new file mode 100644 index 00000000..474ce8c7 --- /dev/null +++ b/sysdeps/kernel/sem_limits.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_sem_limits = 0; + +/* Init function. */ + +void +glibtop_init_sem_limits_s (glibtop *server) +{ + server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits; +} + +/* Provides information about sysv sem limits. */ + +void +glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf) +{ + memset (buf, 0, sizeof (glibtop_sem_limits)); +} diff --git a/sysdeps/kernel/shm_limits.c b/sysdeps/kernel/shm_limits.c new file mode 100644 index 00000000..8a024b4a --- /dev/null +++ b/sysdeps/kernel/shm_limits.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_shm_limits = 0; + +/* Init function. */ + +void +glibtop_init_shm_limits_s (glibtop *server) +{ + server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits; +} + +/* Provides information about sysv ipc limits. */ + +void +glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf) +{ + memset (buf, 0, sizeof (glibtop_shm_limits)); +} diff --git a/sysdeps/kernel/siglist.c b/sysdeps/kernel/siglist.c new file mode 100644 index 00000000..94abfdc6 --- /dev/null +++ b/sysdeps/kernel/siglist.c @@ -0,0 +1,28 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +const glibtop_signame glibtop_sys_siglist [] = +{ { 0, NULL, NULL } }; diff --git a/sysdeps/kernel/swap.c b/sysdeps/kernel/swap.c new file mode 100644 index 00000000..4731b8e3 --- /dev/null +++ b/sysdeps/kernel/swap.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_swap = 0; + +/* Init function. */ + +void +glibtop_init_swap_s (glibtop *server) +{ + server->sysdeps.swap = _glibtop_sysdeps_swap; +} + +/* Provides information about swap usage. */ + +void +glibtop_get_swap_s (glibtop *server, glibtop_swap *buf) +{ + memset (buf, 0, sizeof (glibtop_swap)); +} diff --git a/sysdeps/kernel/uptime.c b/sysdeps/kernel/uptime.c new file mode 100644 index 00000000..a6189448 --- /dev/null +++ b/sysdeps/kernel/uptime.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include +#include + +static const unsigned long _glibtop_sysdeps_uptime = 0; + +/* Init function. */ + +void +glibtop_init_uptime_s (glibtop *server) +{ + server->sysdeps.uptime = _glibtop_sysdeps_uptime; +} + +/* Provides uptime and idle time. */ + +void +glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf) +{ + memset (buf, 0, sizeof (glibtop_uptime)); +}