Added fsusage.[ch]' and mountlist.[ch]'.

1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* sysdeps/common/Makefile.am (libgtop_common_la_SOURCES):
	Added `fsusage.[ch]' and `mountlist.[ch]'.

	* include/glibtop/signal.h: New file.

	* sysdeps/{kernel, linux, osf1, sun4, stub}/siglist.c: New files.
This commit is contained in:
Martin Baulig
1998-07-22 17:21:59 +00:00
committed by Martin Baulig
parent a584809b1c
commit 0dc0c2d7f0
14 changed files with 319 additions and 7 deletions

View File

@@ -1,3 +1,12 @@
1998-07-22 Martin Baulig <martin@home-of-linux.org>
* sysdeps/common/Makefile.am (libgtop_common_la_SOURCES):
Added `fsusage.[ch]' and `mountlist.[ch]'.
* include/glibtop/signal.h: New file.
* sysdeps/{kernel, linux, osf1, sun4, stub}/siglist.c: New files.
1998-07-22 Martin Baulig <martin@home-of-linux.org> 1998-07-22 Martin Baulig <martin@home-of-linux.org>
* lib/init.c (glibtop_init_s): Added this init function of * lib/init.c (glibtop_init_s): Added this init function of

View File

@@ -256,7 +256,6 @@ sysdeps/linux/Makefile
sysdeps/kernel/Makefile sysdeps/kernel/Makefile
src/Makefile src/Makefile
src/server/Makefile src/server/Makefile
src/proxy/Makefile
src/daemon/Makefile src/daemon/Makefile
lib/Makefile lib/Makefile
examples/Makefile examples/Makefile

45
include/glibtop/signal.h Normal file
View File

@@ -0,0 +1,45 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef __GLIBTOP_SIGNAL_H__
#define __GLIBTOP_SIGNAL_H__
#include <glibtop.h>
#ifdef HAVE_SYS_SIGNAL_H
#include <sys/signal.h>
#endif
__BEGIN_DECLS
typedef struct _glibtop_signame glibtop_signame;
struct _glibtop_signame
{
const int number;
const char *name, *label;
};
extern const glibtop_signame glibtop_sys_siglist [];
__END_DECLS
#endif

View File

@@ -8,6 +8,7 @@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_common.la libgtop_suid_common.la lib_LTLIBRARIES = libgtop_common.la libgtop_suid_common.la
libgtop_common_la_SOURCES = sysdeps.c xmalloc.c error.c gnuslib.c libgtop_common_la_SOURCES = sysdeps.c xmalloc.c error.c gnuslib.c \
fsusage.c fsusage.h mountlist.c mountlist.h
libgtop_suid_common_la_SOURCES = xmalloc.c error.c libgtop_suid_common_la_SOURCES = xmalloc.c error.c

View File

@@ -12,7 +12,7 @@ libgtop_sysdeps_la_SOURCES = open.c close.c kernel.s cpu.c mem.c swap.c \
uptime.c loadavg.c shm_limits.c msg_limits.c \ uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c proclist.c procstate.c procuid.c \ sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \ proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procsegment.c siglist.c
include_HEADERS = glibtop_server.h include_HEADERS = glibtop_server.h

58
sysdeps/kernel/siglist.c Normal file
View File

@@ -0,0 +1,58 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/signal.h>
const glibtop_signame glibtop_sys_siglist [] =
{ { 1, "SIGHUP", NULL }, /* Hangup (POSIX). */
{ 2, "SIGINT", NULL }, /* Interrupt (ANSI). */
{ 3, "SIGQUIT", NULL }, /* Quit (POSIX). */
{ 4, "SIGILL", NULL }, /* Illegal instruction (ANSI). */
{ 5, "SIGTRAP", NULL }, /* Trace trap (POSIX). */
{ 6, "SIGABRT", NULL }, /* Abort (ANSI). */
{ 7, "SIGBUS", NULL }, /* BUS error (4.2 BSD). */
{ 8, "SIGFPE", NULL }, /* Floating-point exception (ANSI). */
{ 9, "SIGKILL", NULL }, /* Kill, unblockable (POSIX). */
{ 10, "SIGUSR1", NULL }, /* User-defined signal 1 (POSIX). */
{ 11, "SIGSEGV", NULL }, /* Segmentation violation (ANSI). */
{ 12, "SIGUSR2", NULL }, /* User-defined signal 2 (POSIX). */
{ 13, "SIGPIPE", NULL }, /* Broken pipe (POSIX). */
{ 14, "SIGALRM", NULL }, /* Alarm clock (POSIX). */
{ 15, "SIGTERM", NULL }, /* Termination (ANSI). */
{ 16, "SIGSTKFLT", NULL }, /* ??? */
{ 17, "SIGCHLD", NULL }, /* Child status has changed (POSIX). */
{ 18, "SIGCONT", NULL }, /* Continue (POSIX). */
{ 19, "SIGSTOP", NULL }, /* Stop, unblockable (POSIX). */
{ 20, "SIGTSTP", NULL }, /* Keyboard stop (POSIX). */
{ 21, "SIGTTIN", NULL }, /* Background read from tty (POSIX). */
{ 22, "SIGTTOU", NULL }, /* Background write to tty (POSIX). */
{ 23, "SIGURG", NULL }, /* Urgent condition on socket (4.2 BSD). */
{ 24, "SIGXCPU", NULL }, /* CPU limit exceeded (4.2 BSD). */
{ 25, "SIGXFSZ", NULL }, /* File size limit exceeded (4.2 BSD). */
{ 26, "SIGVTALRM", NULL }, /* Virtual alarm clock (4.2 BSD). */
{ 27, "SIGPROF", NULL }, /* Profiling alarm clock (4.2 BSD). */
{ 28, "SIGWINCH", NULL }, /* Window size change (4.3 BSD, Sun). */
{ 29, "SIGIO", NULL }, /* I/O now possible (4.2 BSD). */
{ 30, "SIGPWR", NULL }, /* Power failure restart (System V). */
{ 31, "SIGUNUSED", NULL },
{ 0, NULL, NULL },
};

View File

@@ -12,6 +12,6 @@ libgtop_sysdeps_la_SOURCES = init.c open.c close.c cpu.c mem.c swap.c \
uptime.c loadavg.c shm_limits.c msg_limits.c \ uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c proclist.c procstate.c procuid.c \ sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \ proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procsegment.c siglist.c
include_HEADERS = glibtop_server.h glibtop_machine.h include_HEADERS = glibtop_server.h glibtop_machine.h

58
sysdeps/linux/siglist.c Normal file
View File

@@ -0,0 +1,58 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/signal.h>
const glibtop_signame glibtop_sys_siglist [] =
{ { 1, "SIGHUP", NULL }, /* Hangup (POSIX). */
{ 2, "SIGINT", NULL }, /* Interrupt (ANSI). */
{ 3, "SIGQUIT", NULL }, /* Quit (POSIX). */
{ 4, "SIGILL", NULL }, /* Illegal instruction (ANSI). */
{ 5, "SIGTRAP", NULL }, /* Trace trap (POSIX). */
{ 6, "SIGABRT", NULL }, /* Abort (ANSI). */
{ 7, "SIGBUS", NULL }, /* BUS error (4.2 BSD). */
{ 8, "SIGFPE", NULL }, /* Floating-point exception (ANSI). */
{ 9, "SIGKILL", NULL }, /* Kill, unblockable (POSIX). */
{ 10, "SIGUSR1", NULL }, /* User-defined signal 1 (POSIX). */
{ 11, "SIGSEGV", NULL }, /* Segmentation violation (ANSI). */
{ 12, "SIGUSR2", NULL }, /* User-defined signal 2 (POSIX). */
{ 13, "SIGPIPE", NULL }, /* Broken pipe (POSIX). */
{ 14, "SIGALRM", NULL }, /* Alarm clock (POSIX). */
{ 15, "SIGTERM", NULL }, /* Termination (ANSI). */
{ 16, "SIGSTKFLT", NULL }, /* ??? */
{ 17, "SIGCHLD", NULL }, /* Child status has changed (POSIX). */
{ 18, "SIGCONT", NULL }, /* Continue (POSIX). */
{ 19, "SIGSTOP", NULL }, /* Stop, unblockable (POSIX). */
{ 20, "SIGTSTP", NULL }, /* Keyboard stop (POSIX). */
{ 21, "SIGTTIN", NULL }, /* Background read from tty (POSIX). */
{ 22, "SIGTTOU", NULL }, /* Background write to tty (POSIX). */
{ 23, "SIGURG", NULL }, /* Urgent condition on socket (4.2 BSD). */
{ 24, "SIGXCPU", NULL }, /* CPU limit exceeded (4.2 BSD). */
{ 25, "SIGXFSZ", NULL }, /* File size limit exceeded (4.2 BSD). */
{ 26, "SIGVTALRM", NULL }, /* Virtual alarm clock (4.2 BSD). */
{ 27, "SIGPROF", NULL }, /* Profiling alarm clock (4.2 BSD). */
{ 28, "SIGWINCH", NULL }, /* Window size change (4.3 BSD, Sun). */
{ 29, "SIGIO", NULL }, /* I/O now possible (4.2 BSD). */
{ 30, "SIGPWR", NULL }, /* Power failure restart (System V). */
{ 31, "SIGUNUSED", NULL },
{ 0, NULL, NULL },
};

View File

@@ -8,7 +8,7 @@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la
libgtop_sysdeps_la_SOURCES = open.c close.c cpu.c mem.c swap.c \ 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 \ uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c sem_limits.c
libgtop_sysdeps_la_LIBADD = -lmach libgtop_sysdeps_la_LIBADD = -lmach

58
sysdeps/osf1/siglist.c Normal file
View File

@@ -0,0 +1,58 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/signal.h>
const glibtop_signame glibtop_sys_siglist [] =
{ { 1, "SIGHUP", N_("Hangup") },
{ 2, "SIGINT", N_("Interrupt") },
{ 3, "SIGQUIT", N_("Quit") },
{ 4, "SIGILL", N_("Illegal instruction") },
{ 5, "SIGTRAP", N_("Trace trap") },
{ 6, "SIGABRT", N_("Abort") },
{ 7, "SIGEMT", N_("EMT error") },
{ 8, "SIGFPE", N_("Floating-point exception") },
{ 9, "SIGKILL", N_("Kill") },
{ 10, "SIGBUS", N_("Bus error") },
{ 11, "SIGSEGV", N_("Segmentation violation") },
{ 12, "SIGSYS", N_("Bad argument to system call") },
{ 13, "SIGPIPE", N_("Broken pipe") },
{ 14, "SIGALRM", N_("Alarm clock") },
{ 15, "SIGTERM", N_("Termination") },
{ 16, "SIGURG", N_("Urgent condition on socket") },
{ 17, "SIGSTOP", N_("Stop") },
{ 18, "SIGTSTP", N_("Keyboard stop") },
{ 19, "SIGCONT", N_("Continue") },
{ 20, "SIGCHLD", N_("Child status has changed") },
{ 21, "SIGTTIN", N_("Background read from tty") },
{ 22, "SIGTTOU", N_("Background write to tty") },
{ 23, "SIGIO", N_("I/O now possible") },
{ 24, "SIGXCPU", N_("CPU limit exceeded") },
{ 25, "SIGXFSZ", N_("File size limit exceeded") },
{ 26, "SIGVTALRM", N_("Virtual alarm clock") },
{ 27, "SIGPROF", N_("Profiling alarm clock") },
{ 28, "SIGWINCH", N_("Window size change") },
{ 29, "SIGINFO", N_("Information request") },
{ 30, "SIGUSR1", N_("User defined signal 1") },
{ 31, "SIGUSR2", N_("User defined signal 2") },
{ 0, NULL, NULL },
};

View File

@@ -8,7 +8,7 @@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la lib_LTLIBRARIES = libgtop_sysdeps.la
libgtop_sysdeps_la_SOURCES = open.c close.c cpu.c mem.c swap.c \ 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 \ uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c proclist.c procstate.c procuid.c \ sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \ proctime.c procmem.c procsignal.c prockernel.c \

26
sysdeps/stub/siglist.c Normal file
View File

@@ -0,0 +1,26 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/signal.h>
const glibtop_signame glibtop_sys_siglist [] =
{ { 0, NULL, NULL } };

View File

@@ -8,7 +8,7 @@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la
libgtop_sysdeps_la_SOURCES = nosuid.c libgtop_sysdeps_la_SOURCES = nosuid.c siglist.c
libgtop_sysdeps_la_LIBADD = -lkvm libgtop_sysdeps_la_LIBADD = -lkvm
libgtop_sysdeps_suid_la_SOURCES = open.c close.c cpu.c mem.c swap.c \ libgtop_sysdeps_suid_la_SOURCES = open.c close.c cpu.c mem.c swap.c \

58
sysdeps/sun4/siglist.c Normal file
View File

@@ -0,0 +1,58 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/signal.h>
const glibtop_signame glibtop_sys_siglist [] =
{ { 1, "SIGHUP", N_("Hangup") },
{ 2, "SIGINT", N_("Interrupt") },
{ 3, "SIGQUIT", N_("Quit") },
{ 4, "SIGILL", N_("Illegal instruction") },
{ 5, "SIGTRAP", N_("Trace trap") },
{ 6, "SIGABRT", N_("Abort") },
{ 7, "SIGEMT", N_("EMT error") },
{ 8, "SIGFPE", N_("Floating-point exception") },
{ 9, "SIGKILL", N_("Kill") },
{ 10, "SIGBUS", N_("Bus error") },
{ 11, "SIGSEGV", N_("Segmentation violation") },
{ 12, "SIGSYS", N_("Bad argument to system call") },
{ 13, "SIGPIPE", N_("Broken pipe") },
{ 14, "SIGALRM", N_("Alarm clock") },
{ 15, "SIGTERM", N_("Termination") },
{ 16, "SIGURG", N_("Urgent condition on socket") },
{ 17, "SIGSTOP", N_("Stop") },
{ 18, "SIGTSTP", N_("Keyboard stop") },
{ 19, "SIGCONT", N_("Continue") },
{ 20, "SIGCHLD", N_("Child status has changed") },
{ 21, "SIGTTIN", N_("Background read from tty") },
{ 22, "SIGTTOU", N_("Background write to tty") },
{ 23, "SIGIO", N_("I/O now possible") },
{ 24, "SIGXCPU", N_("CPU limit exceeded") },
{ 25, "SIGXFSZ", N_("File size limit exceeded") },
{ 26, "SIGVTALRM", N_("Virtual alarm clock") },
{ 27, "SIGPROF", N_("Profiling alarm clock") },
{ 28, "SIGWINCH", N_("Window size change") },
{ 29, "SIGINFO", N_("Information request") },
{ 30, "SIGUSR1", N_("User defined signal 1") },
{ 31, "SIGUSR2", N_("User defined signal 2") },
{ 0, NULL, NULL },
};