libgtop-GNOME-2-0-branch moved to HEAD.

2003-10-19  Carlos Perelló Marín <carlos@gnome.org>

	* libgtop-GNOME-2-0-branch moved to HEAD.
This commit is contained in:
Carlos Perelló Marín
2003-10-19 16:10:39 +00:00
committed by Carlos Perelló Marín
parent 5e28a55218
commit bae16b467f
148 changed files with 29273 additions and 26459 deletions

View File

@@ -1 +1,10 @@
SUBDIRS = common names
## if GUILE
## guile_SUBDIRS = guile
## else
guile_SUBDIRS =
## endif
SUBDIRS = common @sysdeps_dir@ names $(guile_SUBDIRS)
DIST_SUBDIRS = common guile linux kernel names osf1 \
stub stub_suid sun4 freebsd solaris aix

View File

@@ -1,25 +1,3 @@
2001-04-21 Martin Baulig <baulig@suse.de>
* Makefile.am: Install this as a backend.
* libgtop-common.backend, backend.c: New files.
* inodedb.c: Removed; moved to ~/lib.
2000-11-22 Martin Baulig <martin@home-of-linux.org>
* error_suid.c: New file, formerly known as error.c.
* fsusage.c, moutlist.c: Don't call glibtop_init_s() anymore,
this is deprecated.
* Makefile.am: Don't install libgtop_common.la
2000-02-24 Martin Baulig <martin@home-of-linux.org>
* fsusage.c: True64 fix from Aron Griffis: we need to
`#include <sys/bitypes.h>' here.
2000-01-20 Martin Baulig <martin@home-of-linux.org>
* fsusage.c (adjust_blocks): Use `u_int64_t' arguments and
@@ -28,14 +6,3 @@
* fsusage.h (struct fs_usage): Use `u_int64_t' here as well.
1999-10-24 Martin Baulig <martin@home-of-linux.org>
* fsusage.c (_glibtop_sysdeps_fsusage): New static variable.
(glibtop_get_fsusage_s): Return -1 on error; otherwise set the
features and return 0.
* xmalloc.c: Use glib's malloc functions when compiled
with LIBGTOP_USE_GLIB_MALLOC.
* xmalloc_suid.c: New file.

View File

@@ -1,21 +1,28 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = @INCLUDES@
INCLUDES = @INCLUDES@
backenddir = @LIBGTOP_BACKEND_DIR@
if INODEDB
inodedb_SRCLIST = inodedb.c
inodedb_DEFS = -DSYSTEM_INODEDB=\"$(prefix)/var/libgtop/inodedb.db\"
else
inodedb_SRCLIST =
inodedb_DEFS =
endif
backend_DATA = libgtop-common.backend
CFLAGS = @CFLAGS@ $(inodedb_DEFS)
backend_LTLIBRARIES = libgtop_backend_common.la
lib_LTLIBRARIES = libgtop_common-2.0.la libgtop_suid_common-2.0.la
EXTRA_DIST = $(backend_DATA)
libgtop_common_2_0_la_SOURCES = xmalloc.c error.c gnuslib.c \
fsusage.c fsusage.h mountlist.c mountlist.h \
$(inodedb_SRCLIST)
libgtop_backend_common_la_SOURCES = \
backend.c fsusage.c mountlist.c
libgtop_common_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_common_2_0_la_LIBADD = $(LIBGTOP_EXTRA_LIBS)
libgtop_backend_common_la_LIBADD = \
@GLIB_LIBS@
libgtop_suid_common_2_0_la_SOURCES = xmalloc.c error.c sysdeps_suid.c
libgtop_backend_common_la_LDFLAGS = \
$(LT_VERSION_INFO)
libgtop_suid_common_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
EXTRA_DIST = inodedb.c

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* fsusage.c -- return space usage of mounted filesystems
Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
@@ -23,9 +21,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_BITYPES_H
#include <sys/bitypes.h>
#endif
#include "fsusage.h"
int statfs ();
@@ -71,11 +66,6 @@ int statvfs ();
#include <glibtop/error.h>
#include <glibtop/fsusage.h>
static const unsigned long _glibtop_sysdeps_fsusage =
(1L << GLIBTOP_FSUSAGE_BLOCKS) + (1L << GLIBTOP_FSUSAGE_BFREE) +
(1L << GLIBTOP_FSUSAGE_BAVAIL) + (1L << GLIBTOP_FSUSAGE_FILES) +
(1L << GLIBTOP_FSUSAGE_FFREE);
static int
get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp);
@@ -90,16 +80,16 @@ adjust_blocks (blocks, fromsize, tosize)
u_int64_t blocks;
int fromsize, tosize;
{
if (tosize <= 0)
abort ();
if (fromsize <= 0)
return -1;
if (tosize <= 0)
abort ();
if (fromsize <= 0)
return -1;
if (fromsize == tosize) /* e.g., from 512 to 512 */
return blocks;
else if (fromsize > tosize) /* e.g., from 2048 to 512 */
if (fromsize == tosize) /* e.g., from 512 to 512 */
return blocks;
else if (fromsize > tosize) /* e.g., from 2048 to 512 */
return blocks * (u_int64_t)(fromsize / tosize);
else /* e.g., from 256 to 512 */
else /* e.g., from 256 to 512 */
return (blocks + (blocks < 0 ? -1 : 1)) / (u_int64_t)(tosize / fromsize);
}
@@ -119,25 +109,25 @@ get_fs_usage (path, disk, fsp)
#ifdef STAT_STATFS3_OSF1
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_fsize, 512)
struct statfs fsd;
struct statfs fsd;
if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
return -1;
if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
return -1;
#endif /* STAT_STATFS3_OSF1 */
#ifdef STAT_STATFS2_FS_DATA /* Ultrix */
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), 1024, 512)
struct fs_data fsd;
struct fs_data fsd;
if (statfs (path, &fsd) != 1)
return -1;
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.fd_req.btot);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.fd_req.bfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.fd_req.bfreen);
fsp->fsu_files = fsd.fd_req.gtot;
fsp->fsu_ffree = fsd.fd_req.gfree;
if (statfs (path, &fsd) != 1)
return -1;
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.fd_req.btot);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.fd_req.bfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.fd_req.bfreen);
fsp->fsu_files = fsd.fd_req.gtot;
fsp->fsu_ffree = fsd.fd_req.gfree;
#endif /* STAT_STATFS2_FS_DATA */
@@ -148,54 +138,54 @@ get_fs_usage (path, disk, fsp)
# define CONVERT_BLOCKS(B) \
adjust_blocks ((u_int64_t)(B), (fsd.s_type == Fs2b ? 1024 : 512), 512)
struct filsys fsd;
int fd;
struct filsys fsd;
int fd;
if (! disk)
{
errno = 0;
return -1;
}
if (! disk)
{
errno = 0;
return -1;
}
fd = open (disk, O_RDONLY);
if (fd < 0)
return -1;
lseek (fd, (long) SUPERBOFF, 0);
if (safe_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd)
{
close (fd);
return -1;
}
close (fd);
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.s_fsize);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.s_tfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.s_tfree);
fsp->fsu_files = (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1);
fsp->fsu_ffree = fsd.s_tinode;
fd = open (disk, O_RDONLY);
if (fd < 0)
return -1;
lseek (fd, (long) SUPERBOFF, 0);
if (safe_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd)
{
close (fd);
return -1;
}
close (fd);
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.s_fsize);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.s_tfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.s_tfree);
fsp->fsu_files = (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1);
fsp->fsu_ffree = fsd.s_tinode;
#endif /* STAT_READ_FILSYS */
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_bsize, 512)
struct statfs fsd;
struct statfs fsd;
if (statfs (path, &fsd) < 0)
return -1;
if (statfs (path, &fsd) < 0)
return -1;
# ifdef STATFS_TRUNCATES_BLOCK_COUNTS
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
struct statfs are truncated to 2GB. These conditions detect that
truncation, presumably without botching the 4.1.1 case, in which
the values are not truncated. The correct counts are stored in
undocumented spare fields. */
if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0)
{
fsd.f_blocks = fsd.f_spare[0];
fsd.f_bfree = fsd.f_spare[1];
fsd.f_bavail = fsd.f_spare[2];
}
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
struct statfs are truncated to 2GB. These conditions detect that
truncation, presumably without botching the 4.1.1 case, in which
the values are not truncated. The correct counts are stored in
undocumented spare fields. */
if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0)
{
fsd.f_blocks = fsd.f_spare[0];
fsd.f_bfree = fsd.f_spare[1];
fsd.f_bavail = fsd.f_spare[2];
}
# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
#endif /* STAT_STATFS2_BSIZE */
@@ -203,10 +193,10 @@ get_fs_usage (path, disk, fsp)
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_fsize, 512)
struct statfs fsd;
struct statfs fsd;
if (statfs (path, &fsd) < 0)
return -1;
if (statfs (path, &fsd) < 0)
return -1;
#endif /* STAT_STATFS2_FSIZE */
@@ -225,13 +215,13 @@ get_fs_usage (path, disk, fsp)
# endif
# endif
struct statfs fsd;
struct statfs fsd;
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
return -1;
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
return -1;
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
#endif /* STAT_STATFS4 */
@@ -239,26 +229,26 @@ get_fs_usage (path, disk, fsp)
# define CONVERT_BLOCKS(B) \
adjust_blocks ((u_int64_t)(B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
struct statvfs fsd;
struct statvfs fsd;
if (statvfs (path, &fsd) < 0)
return -1;
/* f_frsize isn't guaranteed to be supported. */
if (statvfs (path, &fsd) < 0)
return -1;
/* f_frsize isn't guaranteed to be supported. */
#endif /* STAT_STATVFS */
#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS)
/* !Ultrix && !SVR2 */
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail);
fsp->fsu_files = fsd.f_files;
fsp->fsu_ffree = fsd.f_ffree;
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail);
fsp->fsu_files = fsd.f_files;
fsp->fsu_ffree = fsd.f_ffree;
#endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */
return 0;
return 0;
}
#if defined(_AIX) && defined(_I386)
@@ -269,46 +259,44 @@ statfs (path, fsb)
char *path;
struct statfs *fsb;
{
struct stat stats;
struct dustat fsd;
struct stat stats;
struct dustat fsd;
if (stat (path, &stats))
return -1;
if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd)))
return -1;
fsb->f_type = 0;
fsb->f_bsize = fsd.du_bsize;
fsb->f_blocks = fsd.du_fsize - fsd.du_isize;
fsb->f_bfree = fsd.du_tfree;
fsb->f_bavail = fsd.du_tfree;
fsb->f_files = (fsd.du_isize - 2) * fsd.du_inopb;
fsb->f_ffree = fsd.du_tinode;
fsb->f_fsid.val[0] = fsd.du_site;
fsb->f_fsid.val[1] = fsd.du_pckno;
return 0;
if (stat (path, &stats))
return -1;
if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd)))
return -1;
fsb->f_type = 0;
fsb->f_bsize = fsd.du_bsize;
fsb->f_blocks = fsd.du_fsize - fsd.du_isize;
fsb->f_bfree = fsd.du_tfree;
fsb->f_bavail = fsd.du_tfree;
fsb->f_files = (fsd.du_isize - 2) * fsd.du_inopb;
fsb->f_ffree = fsd.du_tinode;
fsb->f_fsid.val[0] = fsd.du_site;
fsb->f_fsid.val[1] = fsd.du_pckno;
return 0;
}
#endif /* _AIX && _I386 */
int
glibtop_get_fsusage_s (glibtop_server *server, glibtop_closure *machine,
glibtop_fsusage *buf, const char *disk)
void
glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
const char *disk)
{
struct fs_usage fsp;
struct fs_usage fsp;
memset (buf, 0, sizeof (glibtop_fsusage));
glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_fsusage));
memset (&fsp, 0, sizeof (struct fs_usage));
if (get_fs_usage (disk, disk, &fsp))
return -1;
if (get_fs_usage (disk, disk, &fsp))
return;
buf->blocks = fsp.fsu_blocks;
buf->bfree = fsp.fsu_bfree;
buf->bavail = fsp.fsu_bavail;
buf->files = fsp.fsu_files;
buf->ffree = fsp.fsu_ffree;
buf->flags = _glibtop_sysdeps_fsusage;
return 0;
buf->blocks = fsp.fsu_blocks;
buf->bfree = fsp.fsu_bfree;
buf->bavail = fsp.fsu_bavail;
buf->files = fsp.fsu_files;
buf->ffree = fsp.fsu_ffree;
}

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* fsusage.h -- declarations for filesystem space usage info
Copyright (C) 1991, 1992 Free Software Foundation, Inc.

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* mountlist.c -- return a list of mounted filesystems
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
@@ -119,22 +117,22 @@ static int
xatoi (cp)
char *cp;
{
int val;
int val;
val = 0;
while (*cp)
{
if (*cp >= 'a' && *cp <= 'f')
val = val * 16 + *cp - 'a' + 10;
else if (*cp >= 'A' && *cp <= 'F')
val = val * 16 + *cp - 'A' + 10;
else if (*cp >= '0' && *cp <= '9')
val = val * 16 + *cp - '0';
else
break;
cp++;
}
return val;
val = 0;
while (*cp)
{
if (*cp >= 'a' && *cp <= 'f')
val = val * 16 + *cp - 'a' + 10;
else if (*cp >= 'A' && *cp <= 'F')
val = val * 16 + *cp - 'A' + 10;
else if (*cp >= '0' && *cp <= '9')
val = val * 16 + *cp - '0';
else
break;
cp++;
}
return val;
}
#endif /* MOUNTED_GETMNTENT1. */
@@ -143,95 +141,95 @@ static char *
fstype_to_string (t)
short t;
{
switch (t)
{
switch (t)
{
#ifdef MOUNT_PC
case MOUNT_PC:
return "pc";
case MOUNT_PC:
return "pc";
#endif
#ifdef MOUNT_MFS
case MOUNT_MFS:
return "mfs";
case MOUNT_MFS:
return "mfs";
#endif
#ifdef MOUNT_LO
case MOUNT_LO:
return "lo";
case MOUNT_LO:
return "lo";
#endif
#ifdef MOUNT_TFS
case MOUNT_TFS:
return "tfs";
case MOUNT_TFS:
return "tfs";
#endif
#ifdef MOUNT_TMP
case MOUNT_TMP:
return "tmp";
case MOUNT_TMP:
return "tmp";
#endif
#ifdef MOUNT_UFS
case MOUNT_UFS:
return "ufs" ;
case MOUNT_UFS:
return "ufs" ;
#endif
#ifdef MOUNT_NFS
case MOUNT_NFS:
return "nfs" ;
case MOUNT_NFS:
return "nfs" ;
#endif
#ifdef MOUNT_MSDOS
case MOUNT_MSDOS:
return "msdos" ;
case MOUNT_MSDOS:
return "msdos" ;
#endif
#ifdef MOUNT_LFS
case MOUNT_LFS:
return "lfs" ;
case MOUNT_LFS:
return "lfs" ;
#endif
#ifdef MOUNT_LOFS
case MOUNT_LOFS:
return "lofs" ;
case MOUNT_LOFS:
return "lofs" ;
#endif
#ifdef MOUNT_FDESC
case MOUNT_FDESC:
return "fdesc" ;
case MOUNT_FDESC:
return "fdesc" ;
#endif
#ifdef MOUNT_PORTAL
case MOUNT_PORTAL:
return "portal" ;
case MOUNT_PORTAL:
return "portal" ;
#endif
#ifdef MOUNT_NULL
case MOUNT_NULL:
return "null" ;
case MOUNT_NULL:
return "null" ;
#endif
#ifdef MOUNT_UMAP
case MOUNT_UMAP:
return "umap" ;
case MOUNT_UMAP:
return "umap" ;
#endif
#ifdef MOUNT_KERNFS
case MOUNT_KERNFS:
return "kernfs" ;
case MOUNT_KERNFS:
return "kernfs" ;
#endif
#ifdef MOUNT_PROCFS
case MOUNT_PROCFS:
return "procfs" ;
case MOUNT_PROCFS:
return "procfs" ;
#endif
#ifdef MOUNT_AFS
case MOUNT_AFS:
return "afs" ;
case MOUNT_AFS:
return "afs" ;
#endif
#ifdef MOUNT_CD9660
case MOUNT_CD9660:
return "cd9660" ;
case MOUNT_CD9660:
return "cd9660" ;
#endif
#ifdef MOUNT_UNION
case MOUNT_UNION:
return "union" ;
case MOUNT_UNION:
return "union" ;
#endif
#ifdef MOUNT_DEVFS
case MOUNT_DEVFS:
return "devfs" ;
case MOUNT_DEVFS:
return "devfs" ;
#endif
#ifdef MOUNT_EXT2FS
case MOUNT_EXT2FS:
return "ext2fs" ;
case MOUNT_EXT2FS:
return "ext2fs" ;
#endif
default:
return "?";
}
default:
return "?";
}
}
#endif /* MOUNTED_GETMNTINFO */
@@ -240,13 +238,13 @@ static char *
fstype_to_string (t)
int t;
{
struct vfs_ent *e;
struct vfs_ent *e;
e = getvfsbytype (t);
if (!e || !e->vfsent_name)
return "none";
else
return e->vfsent_name;
e = getvfsbytype (t);
if (!e || !e->vfsent_name)
return "none";
else
return e->vfsent_name;
}
#endif /* MOUNTED_VMOUNT */
@@ -261,385 +259,386 @@ static struct mount_entry *
read_filesystem_list (need_fs_type, all_fs)
int need_fs_type, all_fs;
{
struct mount_entry *mount_list;
struct mount_entry *me;
struct mount_entry *mtail;
struct mount_entry *mount_list;
struct mount_entry *me;
struct mount_entry *mtail;
/* Start the list off with a dummy entry. */
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_next = NULL;
mount_list = mtail = me;
/* Start the list off with a dummy entry. */
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_next = NULL;
mount_list = mtail = me;
#ifdef MOUNTED_LISTMNTENT
{
struct tabmntent *mntlist, *p;
struct mntent *mnt;
struct mount_entry *me;
{
struct tabmntent *mntlist, *p;
struct mntent *mnt;
struct mount_entry *me;
/* the third and fourth arguments could be used to filter mounts,
but Crays doesn't seem to have any mounts that we want to
remove. Specifically, automount create normal NFS mounts.
*/
/* the third and fourth arguments could be used to filter mounts,
but Crays doesn't seem to have any mounts that we want to
remove. Specifically, automount create normal NFS mounts.
*/
if(listmntent(&mntlist, KMTAB, NULL, NULL) < 0)
return NULL;
p = mntlist;
while(p){
mnt = p->ment;
me = (struct mount_entry*) xmalloc(sizeof (struct mount_entry));
me->me_devname = xstrdup(mnt->mnt_fsname);
me->me_mountdir = xstrdup(mnt->mnt_dir);
me->me_type = xstrdup(mnt->mnt_type);
me->me_dev = -1;
me->me_next = NULL;
mtail->me_next = me;
mtail = me;
p = p->next;
}
freemntlist(mntlist);
if(listmntent(&mntlist, KMTAB, NULL, NULL) < 0)
return NULL;
p = mntlist;
while(p){
mnt = p->ment;
me = (struct mount_entry*) xmalloc(sizeof (struct mount_entry));
me->me_devname = xstrdup(mnt->mnt_fsname);
me->me_mountdir = xstrdup(mnt->mnt_dir);
me->me_type = xstrdup(mnt->mnt_type);
me->me_dev = -1;
me->me_next = NULL;
mtail->me_next = me;
mtail = me;
p = p->next;
}
freemntlist(mntlist);
}
#endif
#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */
{
struct mntent *mnt;
char *table = MOUNTED;
FILE *fp;
char *devopt;
{
struct mntent *mnt;
char *table = MOUNTED;
FILE *fp;
char *devopt;
fp = setmntent (table, "r");
if (fp == NULL)
return NULL;
fp = setmntent (table, "r");
if (fp == NULL)
return NULL;
while ((mnt = getmntent (fp)))
{
if (!all_fs && (!strcmp (mnt->mnt_type, "ignore")
|| !strcmp (mnt->mnt_type, "auto")))
continue;
while ((mnt = getmntent (fp)))
{
if (!all_fs && (!strcmp (mnt->mnt_type, "ignore")
|| !strcmp (mnt->mnt_type, "auto")))
continue;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt->mnt_fsname);
me->me_mountdir = xstrdup (mnt->mnt_dir);
me->me_type = xstrdup (mnt->mnt_type);
devopt = strstr (mnt->mnt_opts, "dev=");
if (devopt)
{
if (devopt[4] == '0' && (devopt[5] == 'x' || devopt[5] == 'X'))
me->me_dev = xatoi (devopt + 6);
else
me->me_dev = xatoi (devopt + 4);
}
else
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt->mnt_fsname);
me->me_mountdir = xstrdup (mnt->mnt_dir);
me->me_type = xstrdup (mnt->mnt_type);
devopt = strstr (mnt->mnt_opts, "dev=");
if (devopt)
{
if (devopt[4] == '0' && (devopt[5] == 'x' || devopt[5] == 'X'))
me->me_dev = xatoi (devopt + 6);
else
me->me_dev = xatoi (devopt + 4);
}
else
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
if (endmntent (fp) == 0)
return NULL;
}
if (endmntent (fp) == 0)
return NULL;
}
#endif /* MOUNTED_GETMNTENT1. */
#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */
{
struct statfs *fsp;
int entries;
{
struct statfs *fsp;
int entries;
entries = getmntinfo (&fsp, MNT_NOWAIT);
if (entries < 0)
return NULL;
while (entries-- > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsp->f_mntfromname);
me->me_mountdir = xstrdup (fsp->f_mntonname);
entries = getmntinfo (&fsp, MNT_NOWAIT);
if (entries < 0)
return NULL;
while (entries-- > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsp->f_mntfromname);
me->me_mountdir = xstrdup (fsp->f_mntonname);
#if defined(__NetBSD__) || defined(__OpenBSD__)
me->me_type = xstrdup (fsp->f_fstypename);
me->me_type = xstrdup (fsp->f_fstypename);
#else
me->me_type = xstrdup (fstype_to_string (fsp->f_type));
me->me_type = xstrdup (fstype_to_string (fsp->f_type));
#endif
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
fsp++;
}
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
fsp++;
}
}
#endif /* MOUNTED_GETMNTINFO */
#ifdef MOUNTED_GETMNT /* Ultrix. */
{
int offset = 0;
int val;
struct fs_data fsd;
{
int offset = 0;
int val;
struct fs_data fsd;
while ((val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
(char *) 0)) > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsd.fd_req.devname);
me->me_mountdir = xstrdup (fsd.fd_req.path);
me->me_type = xstrdup (gt_names[fsd.fd_req.fstype]);
me->me_dev = fsd.fd_req.dev;
me->me_next = NULL;
while ((val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
(char *) 0)) > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsd.fd_req.devname);
me->me_mountdir = xstrdup (fsd.fd_req.path);
me->me_type = xstrdup (gt_names[fsd.fd_req.fstype]);
me->me_dev = fsd.fd_req.dev;
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
if (val < 0)
return NULL;
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
if (val < 0)
return NULL;
}
#endif /* MOUNTED_GETMNT. */
#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
{
int numsys, counter, bufsize;
struct statfs *stats;
{
int numsys, counter, bufsize;
struct statfs *stats;
numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
if (numsys < 0)
return (NULL);
numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
if (numsys < 0)
return (NULL);
bufsize = (1 + numsys) * sizeof (struct statfs);
stats = (struct statfs *)xmalloc (bufsize);
numsys = getfsstat (stats, bufsize, MNT_WAIT);
if (numsys < 0)
{
free (stats);
return (NULL);
}
for (counter = 0; counter < numsys; counter++)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (stats[counter].f_mntfromname);
me->me_mountdir = xstrdup (stats[counter].f_mntonname);
me->me_type = xstrdup (mnt_names[stats[counter].f_type]);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
bufsize = (1 + numsys) * sizeof (struct statfs);
stats = (struct statfs *)xmalloc (bufsize);
numsys = getfsstat (stats, bufsize, MNT_WAIT);
if (numsys < 0)
{
free (stats);
}
return (NULL);
}
for (counter = 0; counter < numsys; counter++)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (stats[counter].f_mntfromname);
me->me_mountdir = xstrdup (stats[counter].f_mntonname);
me->me_type = xstrdup (mnt_names[stats[counter].f_type]);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
free (stats);
}
#endif /* MOUNTED_GETFSSTAT */
#if defined (MOUNTED_FREAD) || defined (MOUNTED_FREAD_FSTYP) /* SVR[23]. */
{
struct mnttab mnt;
char *table = "/etc/mnttab";
FILE *fp;
{
struct mnttab mnt;
char *table = "/etc/mnttab";
FILE *fp;
fp = fopen (table, "r");
if (fp == NULL)
return NULL;
fp = fopen (table, "r");
if (fp == NULL)
return NULL;
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
#ifdef GETFSTYP /* SVR3. */
me->me_devname = xstrdup (mnt.mt_dev);
me->me_devname = xstrdup (mnt.mt_dev);
#else
me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6);
strcpy (me->me_devname, "/dev/");
strcpy (me->me_devname + 5, mnt.mt_dev);
me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6);
strcpy (me->me_devname, "/dev/");
strcpy (me->me_devname + 5, mnt.mt_dev);
#endif
me->me_mountdir = xstrdup (mnt.mt_filsys);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_type = xstrdup ("");
me->me_mountdir = xstrdup (mnt.mt_filsys);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_type = xstrdup ("");
#ifdef GETFSTYP /* SVR3. */
if (need_fs_type)
{
struct statfs fsd;
char typebuf[FSTYPSZ];
if (need_fs_type)
{
struct statfs fsd;
char typebuf[FSTYPSZ];
if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1
&& sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1)
me->me_type = xstrdup (typebuf);
}
if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1
&& sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1)
me->me_type = xstrdup (typebuf);
}
#endif
me->me_next = NULL;
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
if (fclose (fp) == EOF)
return NULL;
}
if (fclose (fp) == EOF)
return NULL;
}
#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */
#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes it's own way */
{
struct mntent **mnttbl=getmnttbl(),**ent;
for (ent=mnttbl;*ent;ent++)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup ( (*ent)->mt_resource);
me->me_mountdir = xstrdup( (*ent)->mt_directory);
me->me_type = xstrdup ((*ent)->mt_fstype);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
{
struct mntent **mnttbl=getmnttbl(),**ent;
for (ent=mnttbl;*ent;ent++)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup ( (*ent)->mt_resource);
me->me_mountdir = xstrdup( (*ent)->mt_directory);
me->me_type = xstrdup ((*ent)->mt_fstype);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
endmnttbl();
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
endmnttbl();
}
#endif
#ifdef MOUNTED_GETMNTENT2 /* SVR4. */
{
struct mnttab mnt;
char *table = MNTTAB;
FILE *fp;
int ret;
{
struct mnttab mnt;
char *table = MNTTAB;
FILE *fp;
int ret;
fp = fopen (table, "r");
if (fp == NULL)
return NULL;
fp = fopen (table, "r");
if (fp == NULL)
return NULL;
while ((ret = getmntent (fp, &mnt)) == 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt.mnt_special);
me->me_mountdir = xstrdup (mnt.mnt_mountp);
me->me_type = xstrdup (mnt.mnt_fstype);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
while ((ret = getmntent (fp, &mnt)) == 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt.mnt_special);
me->me_mountdir = xstrdup (mnt.mnt_mountp);
me->me_type = xstrdup (mnt.mnt_fstype);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
if (ret > 0)
return NULL;
if (fclose (fp) == EOF)
return NULL;
}
if (ret > 0)
return NULL;
if (fclose (fp) == EOF)
return NULL;
}
#endif /* MOUNTED_GETMNTENT2. */
#ifdef MOUNTED_VMOUNT /* AIX. */
{
int bufsize;
char *entries, *thisent;
struct vmount *vmp;
{
int bufsize;
char *entries, *thisent;
struct vmount *vmp;
/* Ask how many bytes to allocate for the mounted filesystem info. */
mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize);
entries = xmalloc (bufsize);
/* Ask how many bytes to allocate for the mounted filesystem info. */
mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize);
entries = xmalloc (bufsize);
/* Get the list of mounted filesystems. */
mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries);
/* Get the list of mounted filesystems. */
mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries);
for (thisent = entries; thisent < entries + bufsize;
thisent += vmp->vmt_length)
{
vmp = (struct vmount *) thisent;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
if (vmp->vmt_flags & MNT_REMOTE)
{
char *host, *path;
for (thisent = entries; thisent < entries + bufsize;
thisent += vmp->vmt_length)
{
vmp = (struct vmount *) thisent;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
if (vmp->vmt_flags & MNT_REMOTE)
{
char *host, *path;
/* Prepend the remote pathname. */
host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off;
path = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off;
me->me_devname = xmalloc (strlen (host) + strlen (path) + 2);
strcpy (me->me_devname, host);
strcat (me->me_devname, ":");
strcat (me->me_devname, path);
}
else
{
me->me_devname = xstrdup (thisent +
vmp->vmt_data[VMT_OBJECT].vmt_off);
}
me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off);
me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype));
me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */
me->me_next = NULL;
/* Prepend the remote pathname. */
host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off;
path = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off;
me->me_devname = xmalloc (strlen (host) + strlen (path) + 2);
strcpy (me->me_devname, host);
strcat (me->me_devname, ":");
strcat (me->me_devname, path);
}
else
{
me->me_devname = xstrdup (thisent +
vmp->vmt_data[VMT_OBJECT].vmt_off);
}
me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off);
me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype));
me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */
me->me_next = NULL;
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
free (entries);
}
/* Add to the linked list. */
mtail->me_next = me;
mtail = me;
}
free (entries);
}
#endif /* MOUNTED_VMOUNT. */
/* Free the dummy head. */
me = mount_list;
mount_list = mount_list->me_next;
free (me);
return mount_list;
/* Free the dummy head. */
me = mount_list;
mount_list = mount_list->me_next;
free (me);
return mount_list;
}
glibtop_mountentry *
glibtop_get_mountlist_s (glibtop_server *server, glibtop_closure *machine,
glibtop_mountlist *buf, int all_fs)
glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs)
{
struct mount_entry *me, *tmp, *next;
glibtop_mountentry *mount_list;
int count;
struct mount_entry *me, *tmp, *next;
glibtop_mountentry *mount_list;
int count;
memset (buf, 0, sizeof (glibtop_mountlist));
glibtop_init_r (&server, 0, 0);
/* Read filesystem list. */
memset (buf, 0, sizeof (glibtop_mountlist));
me = read_filesystem_list (1, all_fs);
/* Read filesystem list. */
if (me == NULL)
return NULL;
me = read_filesystem_list (1, all_fs);
/* Count entries. */
if (me == NULL)
return NULL;
for (count = 0, tmp = me; tmp; count++, tmp = tmp->me_next)
;
/* Count entries. */
buf->size = sizeof (glibtop_mountentry);
buf->number = count;
for (count = 0, tmp = me; tmp; count++, tmp = tmp->me_next)
;
buf->total = buf->number * buf->size;
buf->size = sizeof (glibtop_mountentry);
buf->number = count;
mount_list = glibtop_malloc_r (server, buf->total);
buf->total = buf->number * buf->size;
/* Write data into mount_list. */
mount_list = glibtop_malloc_r (server, buf->total);
for (count = 0, tmp = me; tmp; count++, tmp = tmp->me_next) {
strncpy (mount_list [count].devname, tmp->me_devname,
GLIBTOP_MOUNTENTRY_LEN);
strncpy (mount_list [count].mountdir, tmp->me_mountdir,
GLIBTOP_MOUNTENTRY_LEN);
strncpy (mount_list [count].type, tmp->me_type,
GLIBTOP_MOUNTENTRY_LEN);
mount_list [count].devname [GLIBTOP_MOUNTENTRY_LEN] = 0;
mount_list [count].mountdir [GLIBTOP_MOUNTENTRY_LEN] = 0;
mount_list [count].type [GLIBTOP_MOUNTENTRY_LEN] = 0;
mount_list [count].dev = tmp->me_dev;
}
/* Write data into mount_list. */
/* Free memory. */
for (count = 0, tmp = me; tmp; count++, tmp = tmp->me_next) {
strncpy (mount_list [count].devname, tmp->me_devname,
GLIBTOP_MOUNTENTRY_LEN);
strncpy (mount_list [count].mountdir, tmp->me_mountdir,
GLIBTOP_MOUNTENTRY_LEN);
strncpy (mount_list [count].type, tmp->me_type,
GLIBTOP_MOUNTENTRY_LEN);
mount_list [count].devname [GLIBTOP_MOUNTENTRY_LEN] = 0;
mount_list [count].mountdir [GLIBTOP_MOUNTENTRY_LEN] = 0;
mount_list [count].type [GLIBTOP_MOUNTENTRY_LEN] = 0;
mount_list [count].dev = tmp->me_dev;
}
for (count = 0, tmp = me; tmp; count++, tmp = next) {
next = tmp->me_next;
xfree (tmp->me_devname);
xfree (tmp->me_mountdir);
xfree (tmp->me_type);
xfree (tmp);
}
/* Free memory. */
return mount_list;
for (count = 0, tmp = me; tmp; count++, tmp = next) {
next = tmp->me_next;
xfree (tmp->me_devname);
xfree (tmp->me_mountdir);
xfree (tmp->me_type);
xfree (tmp);
}
return mount_list;
}

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* mountlist.h -- declarations for list of mounted filesystems
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
@@ -20,10 +18,10 @@
/* A mount table entry. */
struct mount_entry
{
char *me_devname; /* Device node pathname, including "/dev/". */
char *me_mountdir; /* Mount point directory pathname. */
char *me_type; /* "nfs", "4.2", etc. */
dev_t me_dev; /* Device number of me_mountdir. */
struct mount_entry *me_next;
char *me_devname; /* Device node pathname, including "/dev/". */
char *me_mountdir; /* Mount point directory pathname. */
char *me_type; /* "nfs", "4.2", etc. */
dev_t me_dev; /* Device number of me_mountdir. */
struct mount_entry *me_next;
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -30,71 +28,65 @@
glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_CPU
glibtop_init_cpu_p,
glibtop_init_cpu_p,
#endif
#if GLIBTOP_SUID_MEM
glibtop_init_mem_p,
glibtop_init_mem_p,
#endif
#if GLIBTOP_SUID_SWAP
glibtop_init_swap_p,
glibtop_init_swap_p,
#endif
#if GLIBTOP_SUID_UPTIME
glibtop_init_uptime_p,
glibtop_init_uptime_p,
#endif
#if GLIBTOP_SUID_LOADAVG
glibtop_init_loadavg_p,
glibtop_init_loadavg_p,
#endif
#if GLIBTOP_SUID_SHM_LIMITS
glibtop_init_shm_limits_p,
glibtop_init_shm_limits_p,
#endif
#if GLIBTOP_SUID_MSG_LIMITS
glibtop_init_msg_limits_p,
glibtop_init_msg_limits_p,
#endif
#if GLIBTOP_SUID_SEM_LIMITS
glibtop_init_sem_limits_p,
glibtop_init_sem_limits_p,
#endif
#if GLIBTOP_SUID_PROCLIST
glibtop_init_proclist_p,
glibtop_init_proclist_p,
#endif
#if GLIBTOP_SUID_PROC_STATE
glibtop_init_proc_state_p,
glibtop_init_proc_state_p,
#endif
#if GLIBTOP_SUID_PROC_UID
glibtop_init_proc_uid_p,
glibtop_init_proc_uid_p,
#endif
#if GLIBTOP_SUID_PROC_MEM
glibtop_init_proc_mem_p,
glibtop_init_proc_mem_p,
#endif
#if GLIBTOP_SUID_PROC_TIME
glibtop_init_proc_time_p,
glibtop_init_proc_time_p,
#endif
#if GLIBTOP_SUID_PROC_SIGNAL
glibtop_init_proc_signal_p,
glibtop_init_proc_signal_p,
#endif
#if GLIBTOP_SUID_PROC_KERNEL
glibtop_init_proc_kernel_p,
glibtop_init_proc_kernel_p,
#endif
#if GLIBTOP_SUID_PROC_SEGMENT
glibtop_init_proc_segment_p,
glibtop_init_proc_segment_p,
#endif
#if GLIBTOP_SUID_PROC_ARGS
glibtop_init_proc_args_p,
glibtop_init_proc_args_p,
#endif
#if GLIBTOP_SUID_PROC_MAP
glibtop_init_proc_map_p,
glibtop_init_proc_map_p,
#endif
#if GLIBTOP_SUID_NETINFO
glibtop_init_netinfo_p,
#endif
#if GLIBTOP_SUID_NETINFO
glibtop_init_netinfo_p,
#endif
#if GLIBTOP_SUID_INTERFACE_NAMES
glibtop_init_interface_names_p,
#if GLIBTOP_SUID_NETLOAD
glibtop_init_netload_p,
#endif
#if GLIBTOP_SUID_PPP
glibtop_init_ppp_p,
glibtop_init_ppp_p,
#endif
NULL
NULL
};

View File

@@ -2,15 +2,15 @@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = @INCLUDES@
lib_LTLIBRARIES = libgtop_names.la
lib_LTLIBRARIES = libgtop_names-2.0.la
libgtop_names_la_SOURCES = cpu.c mem.c swap.c uptime.c loadavg.c \
libgtop_names_2_0_la_SOURCES = cpu.c mem.c swap.c uptime.c loadavg.c \
shm_limits.c msg_limits.c sem_limits.c \
proclist.c sysdeps.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c \
prockernel.c procsegment.c proccwd.c fsusage.c \
mountlist.c procargs.c procmap.c netinfo.c \
netload.c interfaces.c ppp.c
prockernel.c procsegment.c fsusage.c \
mountlist.c procargs.c procmap.c netload.c \
ppp.c
libgtop_names_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_names_2_0_la_LDFLAGS = $(LT_VERSION_INFO)

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,53 +19,51 @@
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 <glibtop/cpu.h>
const char *glibtop_names_cpu[GLIBTOP_MAX_CPU] =
const char *glibtop_names_cpu [GLIBTOP_MAX_CPU] =
{
"total", "user", "nice", "sys", "idle", "frequency",
"xcpu_total", "xcpu_user", "xcpu_nice", "xcpu_sys",
"xcpu_idle", "xcpu_flags"
"total", "user", "nice", "sys", "idle", "frequency",
"xcpu_total", "xcpu_user", "xcpu_nice", "xcpu_sys",
"xcpu_idle"
};
const unsigned glibtop_types_cpu[GLIBTOP_MAX_CPU] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
const unsigned glibtop_types_cpu [GLIBTOP_MAX_CPU] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_cpu[GLIBTOP_MAX_CPU] =
const char *glibtop_labels_cpu [GLIBTOP_MAX_CPU] =
{
N_ ("Total CPU Time"),
N_ ("CPU Time in User Mode"),
N_ ("CPU Time in User Mode (nice)"),
N_ ("CPU Time in System Mode"),
N_ ("CPU Time in the Idle Task"),
N_ ("Tick Frequency"),
N_ ("SMP Total CPU Time"),
N_ ("SMP CPU Time in User Mode"),
N_ ("SMP CPU Time in User Mode (nice)"),
N_ ("SMP CPU Time in System Mode"),
N_ ("SMP CPU Time in the Idle Task"),
N_ ("SMP CPU Flags")
N_("Total CPU Time"),
N_("CPU Time in User Mode"),
N_("CPU Time in User Mode (nice)"),
N_("CPU Time in System Mode"),
N_("CPU Time in the Idle Task"),
N_("Tick Frequency"),
N_("SMP Total CPU Time"),
N_("SMP CPU Time in User Mode"),
N_("SMP CPU Time in User Mode (nice)"),
N_("SMP CPU Time in System Mode"),
N_("SMP CPU Time in the Idle Task")
};
const char *glibtop_descriptions_cpu[GLIBTOP_MAX_CPU] =
const char *glibtop_descriptions_cpu [GLIBTOP_MAX_CPU] =
{
N_ ("Number of clock ticks since system boot"),
N_ ("Number of clock ticks the system spent in user mode"),
N_ ("Number of clock ticks the system spent in user mode (nice)"),
N_ ("Number of clock ticks the system spent in system mode"),
N_ ("Number of clock ticks the system spent in the idle task"),
N_ ("Tick frequency (default is 100)"),
N_ ("Number of clock ticks since system boot"),
N_ ("Number of clock ticks the system spent in user mode"),
N_ ("Number of clock ticks the system spent in user mode (nice)"),
N_ ("Number of clock ticks the system spent in system mode"),
N_ ("Number of clock ticks the system spent in the idle task"),
N_ ("SMP CPU Flags")
N_("Number of clock ticks since system boot"),
N_("Number of clock ticks the system spent in user mode"),
N_("Number of clock ticks the system spent in user mode (nice)"),
N_("Number of clock ticks the system spent in system mode"),
N_("Number of clock ticks the system spent in the idle task"),
N_("Tick frequency (default is 100)"),
N_("Number of clock ticks since system boot"),
N_("Number of clock ticks the system spent in user mode"),
N_("Number of clock ticks the system spent in user mode (nice)"),
N_("Number of clock ticks the system spent in system mode"),
N_("Number of clock ticks the system spent in the idle task"),
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,35 +19,35 @@
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 <glibtop/fsusage.h>
const char *glibtop_names_fsusage[GLIBTOP_MAX_FSUSAGE] =
const char *glibtop_names_fsusage [GLIBTOP_MAX_FSUSAGE] =
{
"blocks", "bfree", "bavail", "files", "ffree"
"blocks", "bfree", "bavail", "files", "ffree"
};
const unsigned glibtop_types_fsusage[GLIBTOP_MAX_FSUSAGE] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
const unsigned glibtop_types_fsusage [GLIBTOP_MAX_FSUSAGE] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_fsusage[GLIBTOP_MAX_FSUSAGE] =
const char *glibtop_labels_fsusage [GLIBTOP_MAX_FSUSAGE] =
{
N_ ("Total blocks"),
N_ ("Free blocks"),
N_ ("Available blocks"),
N_ ("Total file nodes"),
N_ ("Free file nodes")
N_("Total blocks"),
N_("Free blocks"),
N_("Available blocks"),
N_("Total file nodes"),
N_("Free file nodes")
};
const char *glibtop_descriptions_fsusage[GLIBTOP_MAX_FSUSAGE] =
const char *glibtop_descriptions_fsusage [GLIBTOP_MAX_FSUSAGE] =
{
N_ ("Total blocks"),
N_ ("Free blocks available to the superuser"),
N_ ("Free blocks available to non-superusers"),
N_ ("Total file nodes"),
N_ ("Free file nodes")
N_("Total blocks"),
N_("Free blocks available to the superuser"),
N_("Free blocks available to non-superusers"),
N_("Total file nodes"),
N_("Free file nodes")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,33 +19,33 @@
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 <glibtop/loadavg.h>
const char *glibtop_names_loadavg[GLIBTOP_MAX_LOADAVG] =
const char *glibtop_names_loadavg [GLIBTOP_MAX_LOADAVG] =
{
"loadavg", "nr_running", "nr_tasks", "last_pid"
"loadavg", "nr_running", "nr_tasks", "last_pid"
};
const unsigned glibtop_types_loadavg[GLIBTOP_MAX_LOADAVG] =
const unsigned glibtop_types_loadavg [GLIBTOP_MAX_LOADAVG] =
{
GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_loadavg[GLIBTOP_MAX_LOADAVG] =
const char *glibtop_labels_loadavg [GLIBTOP_MAX_LOADAVG] =
{
N_ ("Load Average"),
N_ ("Running Tasks"),
N_ ("Number of Tasks"),
N_ ("Last PID")
N_("Load Average"),
N_("Running Tasks"),
N_("Number of Tasks"),
N_("Last PID")
};
const char *glibtop_descriptions_loadavg[GLIBTOP_MAX_LOADAVG] =
const char *glibtop_descriptions_loadavg [GLIBTOP_MAX_LOADAVG] =
{
N_ ("Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"),
N_ ("Number of tasks currently running"),
N_ ("Total number of tasks"),
N_ ("Last PID")
N_("Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"),
N_("Number of tasks currently running"),
N_("Total number of tasks"),
N_("Last PID")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,43 +19,43 @@
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 <glibtop/mem.h>
const char *glibtop_names_mem[GLIBTOP_MAX_MEM] =
{
"total", "used", "free", "shared", "buffer",
"cached", "user", "locked"
const char *glibtop_names_mem [GLIBTOP_MAX_MEM] =
{
"total", "used", "free", "shared", "buffer",
"cached", "user", "locked"
};
const unsigned glibtop_types_mem[GLIBTOP_MAX_MEM] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
const unsigned glibtop_types_mem [GLIBTOP_MAX_MEM] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_mem[GLIBTOP_MAX_MEM] =
const char *glibtop_labels_mem [GLIBTOP_MAX_MEM] =
{
N_ ("Total Memory"),
N_ ("Used Memory"),
N_ ("Free Memory"),
N_ ("Shared Memory"),
N_ ("Buffers"),
N_ ("Cached"),
N_ ("User"),
N_ ("Locked"),
N_("Total Memory"),
N_("Used Memory"),
N_("Free Memory"),
N_("Shared Memory"),
N_("Buffers"),
N_("Cached"),
N_("User"),
N_("Locked"),
};
const char *glibtop_descriptions_mem[GLIBTOP_MAX_MEM] =
const char *glibtop_descriptions_mem [GLIBTOP_MAX_MEM] =
{
N_ ("Total physical memory in kB"),
N_ ("Used memory size in kB"),
N_ ("Free memory size in kB"),
N_ ("Shared memory size in kB"),
N_ ("Size of buffers kB"),
N_ ("Size of cached memory in kB"),
N_ ("Memory used from user processes in kB"),
N_ ("Memory in locked pages in kB")
N_("Total physical memory in kB"),
N_("Used memory size in kB"),
N_("Free memory size in kB"),
N_("Shared memory size in kB"),
N_("Size of buffers kB"),
N_("Size of cached memory in kB"),
N_("Memory used from user processes in kB"),
N_("Memory in locked pages in kB")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,14 +19,30 @@
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 <glibtop/mountlist.h>
const char *glibtop_names_mountlist[] = { 0 };
const char *glibtop_names_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
"number", "total", "size"
};
const unsigned glibtop_types_mountlist[] = { 0 };
const unsigned glibtop_types_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_mountlist[] = { 0 };
const char *glibtop_labels_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};
const char *glibtop_descriptions_mountlist[] = { 0 };
const char *glibtop_descriptions_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,40 +19,40 @@
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 <glibtop/msg_limits.h>
const char *glibtop_names_msg_limits[GLIBTOP_MAX_MSG_LIMITS] =
const char *glibtop_names_msg_limits [GLIBTOP_MAX_MSG_LIMITS] =
{
"msgpool", "msgmap", "msgmax", "msgmnb", "msgmni", "msgssz", "msgtql"
"msgpool", "msgmap", "msgmax", "msgmnb", "msgmni", "msgssz", "msgtql"
};
const unsigned glibtop_types_msg_limits[GLIBTOP_MAX_MSG_LIMITS] =
const unsigned glibtop_types_msg_limits [GLIBTOP_MAX_MSG_LIMITS] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_msg_limits[GLIBTOP_MAX_MSG_LIMITS] =
const char *glibtop_labels_msg_limits [GLIBTOP_MAX_MSG_LIMITS] =
{
N_ ("Size in kilobytes of message pool"),
N_ ("Number of entries in message map"),
N_ ("Max size of message"),
N_ ("Default max size of queue"),
N_ ("Max queues system wide"),
N_ ("Message segment size"),
N_ ("Number of system message headers")
N_("Size in kilobytes of message pool"),
N_("Number of entries in message map"),
N_("Max size of message"),
N_("Default max size of queue"),
N_("Max queues system wide"),
N_("Message segment size"),
N_("Number of system message headers")
};
const char *glibtop_descriptions_msg_limits[GLIBTOP_MAX_MSG_LIMITS] =
const char *glibtop_descriptions_msg_limits [GLIBTOP_MAX_MSG_LIMITS] =
{
N_ ("Size in kilobytes of message pool"),
N_ ("Number of entries in message map"),
N_ ("Max size of message"),
N_ ("Default max size of queue"),
N_ ("Max queues system wide"),
N_ ("Message segment size"),
N_ ("Number of system message headers")
N_("Size in kilobytes of message pool"),
N_("Number of entries in message map"),
N_("Max size of message"),
N_("Default max size of queue"),
N_("Max queues system wide"),
N_("Message segment size"),
N_("Number of system message headers")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,50 +19,59 @@
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 <glibtop/netload.h>
const char *glibtop_names_netload[GLIBTOP_MAX_NETLOAD] =
const char *glibtop_names_netload [GLIBTOP_MAX_NETLOAD] =
{
"packets_in", "packets_out", "packets_total",
"bytes_in", "bytes_out", "bytes_total",
"errors_in", "errors_out", "errors_total",
"collisions"
"if_flags", "mtu", "subnet", "address", "packets_in",
"packets_out", "packets_total", "bytes_in", "bytes_out",
"bytes_total", "errors_in", "errors_out", "errors_total",
"collisions"
};
const unsigned glibtop_types_netload[GLIBTOP_MAX_NETLOAD] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG
const unsigned glibtop_types_netload [GLIBTOP_MAX_NETLOAD] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_netload[GLIBTOP_MAX_NETLOAD] =
const char *glibtop_labels_netload [GLIBTOP_MAX_NETLOAD] =
{
N_ ("Packets In"),
N_ ("Packets Out"),
N_ ("Packets Total"),
N_ ("Bytes In"),
N_ ("Bytes Out"),
N_ ("Bytes Total"),
N_ ("Errors In"),
N_ ("Errors Out"),
N_ ("Errors Total"),
N_ ("Collisions")
N_("Interface Flags"),
N_("MTU"),
N_("Subnet"),
N_("Address"),
N_("Packets In"),
N_("Packets Out"),
N_("Packets Total"),
N_("Bytes In"),
N_("Bytes Out"),
N_("Bytes Total"),
N_("Errors In"),
N_("Errors Out"),
N_("Errors Total"),
N_("Collisions")
};
const char *glibtop_descriptions_netload[GLIBTOP_MAX_NETLOAD] =
const char *glibtop_descriptions_netload [GLIBTOP_MAX_NETLOAD] =
{
N_ ("Packets In"),
N_ ("Packets Out"),
N_ ("Packets Total"),
N_ ("Bytes In"),
N_ ("Bytes Out"),
N_ ("Bytes Total"),
N_ ("Errors In"),
N_ ("Errors Out"),
N_ ("Errors Total"),
N_ ("Collisions")
N_("Interface Flags"),
N_("Maximum Transfer Unit"),
N_("Subnet"),
N_("Address"),
N_("Packets In"),
N_("Packets Out"),
N_("Packets Total"),
N_("Bytes In"),
N_("Bytes Out"),
N_("Bytes Total"),
N_("Errors In"),
N_("Errors Out"),
N_("Errors Total"),
N_("Collisions")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,30 +19,30 @@
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 <glibtop/ppp.h>
const char *glibtop_names_ppp[GLIBTOP_MAX_PPP] =
const char *glibtop_names_ppp [GLIBTOP_MAX_PPP] =
{
"state", "bytes_in", "bytes_out"
"state", "bytes_in", "bytes_out"
};
const unsigned glibtop_types_ppp[GLIBTOP_MAX_PPP] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
const unsigned glibtop_types_ppp [GLIBTOP_MAX_PPP] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_ppp[GLIBTOP_MAX_PPP] =
const char *glibtop_labels_ppp [GLIBTOP_MAX_PPP] =
{
N_ ("PPP State"),
N_ ("Input bytes"),
N_ ("Output bytes")
N_("PPP State"),
N_("Input bytes"),
N_("Output bytes")
};
const char *glibtop_descriptions_ppp[GLIBTOP_MAX_PPP] =
const char *glibtop_descriptions_ppp [GLIBTOP_MAX_PPP] =
{
N_ ("PPP State"),
N_ ("Number of input bytes"),
N_ ("Number of output bytes")
N_("PPP State"),
N_("Number of input bytes"),
N_("Number of output bytes")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,26 +19,26 @@
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 <glibtop/procargs.h>
const char *glibtop_names_proc_args[GLIBTOP_MAX_PROC_ARGS] =
const char *glibtop_names_proc_args [GLIBTOP_MAX_PROC_ARGS] =
{
"size"
"size"
};
const unsigned glibtop_types_proc_args[GLIBTOP_MAX_PROC_ARGS] =
const unsigned glibtop_types_proc_args [GLIBTOP_MAX_PROC_ARGS] =
{
GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_proc_args[GLIBTOP_MAX_PROC_ARGS] =
const char *glibtop_labels_proc_args [GLIBTOP_MAX_PROC_ARGS] =
{
N_ ("Size")
N_("Size")
};
const char *glibtop_descriptions_proc_args[GLIBTOP_MAX_PROC_ARGS] =
const char *glibtop_descriptions_proc_args [GLIBTOP_MAX_PROC_ARGS] =
{
N_ ("Length in bytes of the returned string.")
N_("Length in bytes of the returned string.")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,64 +19,64 @@
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 <glibtop.h>
#include <glibtop/prockernel.h>
const char *glibtop_names_proc_kernel[GLIBTOP_MAX_PROC_KERNEL] =
const char *glibtop_names_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] =
{
"k_flags", "min_flt", "maj_flt", "cmin_flt", "cmaj_flt",
"kstk_esp", "kstk_eip", "nwchan", "wchan"
"k_flags", "min_flt", "maj_flt", "cmin_flt", "cmaj_flt",
"kstk_esp", "kstk_eip", "nwchan", "wchan"
};
const unsigned glibtop_types_proc_kernel[GLIBTOP_MAX_PROC_KERNEL] =
const unsigned glibtop_types_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_STRING
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_STRING
};
const char *glibtop_labels_proc_kernel[GLIBTOP_MAX_PROC_KERNEL] =
const char *glibtop_labels_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] =
{
N_ ("K_Flags"), N_ ("Min_Flt"), N_ ("Maj_Flt"), N_ ("CMin_Flt"),
N_ ("CMaj_Flt"), N_ ("KStk_ESP"), N_ ("KStk_EIP"), N_ ("NWChan"),
N_ ("WChan")
N_("K_Flags"), N_("Min_Flt"), N_("Maj_Flt"), N_("CMin_Flt"),
N_("CMaj_Flt"), N_("KStk_ESP"), N_("KStk_EIP"), N_("NWChan"),
N_("WChan")
};
const char *glibtop_descriptions_proc_kernel[GLIBTOP_MAX_PROC_KERNEL] =
const char *glibtop_descriptions_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] =
{
/* K_Flags */
N_ ("Kernel flags of the process.\n\n"
"On Linux, currently every flag has the math bit set, because "
"crt0.s checks for math emulation, so this is not included in "
"the output.\n\n"
"This is probably a bug, as not every process is a compiled C "
"program.\n\n"
"The math bit should be a decimal 4, and the traced bit is "
"decimal 10."),
/* Min_Flt */
N_ ("The number of minor faults the process has made, those which "
"have not required loading a memory page from disk."),
/* Maj_Flt */
N_ ("The number of major faults the process has made, those which "
"have required loading a memory page from disk."),
/* CMin_Flt */
N_ ("The number of minor faults that the process and its children "
"have made."),
/* CMaj_Flt */
N_ ("The number of major faults that the process and its children "
"have made."),
/* KStk_ESP */
N_ ("The current value of esp (32-bit stack pointer), as found in "
"the kernel stack page for the process."),
/* KStk_EIP */
N_ ("The current EIP (32-bit instruction pointer)."),
/* NWChan */
N_ ("This is the \"channel\" in which the process is waiting. This "
"is the address of a system call, and can be looked up in a "
"namelist if you need a textual name. (If you have an up-to-date "
"/etc/psdatabase, then try ps -l to see the WCHAN field in action)"),
/* WChan */
N_ ("This is the textual name of the `nwchan' field.")
/* K_Flags */
N_("Kernel flags of the process.\n\n"
"On Linux, currently every flag has the math bit set, because "
"crt0.s checks for math emulation, so this is not included in "
"the output.\n\n"
"This is probably a bug, as not every process is a compiled C "
"program.\n\n"
"The math bit should be a decimal 4, and the traced bit is "
"decimal 10."),
/* Min_Flt */
N_("The number of minor faults the process has made, those which "
"have not required loading a memory page from disk."),
/* Maj_Flt */
N_("The number of major faults the process has made, those which "
"have required loading a memory page from disk."),
/* CMin_Flt */
N_("The number of minor faults that the process and its children "
"have made."),
/* CMaj_Flt */
N_("The number of major faults that the process and its children "
"have made."),
/* KStk_ESP */
N_("The current value of esp (32-bit stack pointer), as found in "
"the kernel stack page for the process."),
/* KStk_EIP */
N_("The current EIP (32-bit instruction pointer)."),
/* NWChan */
N_("This is the \"channel\" in which the process is waiting. This "
"is the address of a system call, and can be looked up in a "
"namelist if you need a textual name. (If you have an up-to-date "
"/etc/psdatabase, then try ps -l to see the WCHAN field in action)"),
/* WChan */
N_("This is the textual name of the `nwchan' field.")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,14 +19,30 @@
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 <glibtop/proclist.h>
const char *glibtop_names_proclist[] = { 0 };
const char *glibtop_names_proclist [GLIBTOP_MAX_PROCLIST] =
{
"number", "total", "size"
};
const unsigned glibtop_types_proclist[] = { 0 };
const unsigned glibtop_types_proclist [GLIBTOP_MAX_PROCLIST] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_proclist[] = { 0 };
const char *glibtop_labels_proclist [GLIBTOP_MAX_PROCLIST] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};
const char *glibtop_descriptions_proclist[] = { 0 };
const char *glibtop_descriptions_proclist [GLIBTOP_MAX_PROCLIST] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,14 +19,30 @@
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 <glibtop/procmap.h>
const char *glibtop_names_proc_map[] = { 0 };
const char *glibtop_names_proc_map [GLIBTOP_MAX_PROC_MAP] =
{
"number", "total", "size"
};
const unsigned glibtop_types_proc_map[] = { 0 };
const unsigned glibtop_types_proc_map [GLIBTOP_MAX_PROC_MAP] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_proc_map[] = { 0 };
const char *glibtop_labels_proc_map [GLIBTOP_MAX_PROC_MAP] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};
const char *glibtop_descriptions_proc_map[] = { 0 };
const char *glibtop_descriptions_proc_map [GLIBTOP_MAX_PROC_MAP] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,7 +19,7 @@
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 <glibtop.h>
#include <glibtop/procmem.h>
@@ -33,34 +31,34 @@
#define GLIBTOP_PROC_MEM_RSS 4
#define GLIBTOP_PROC_MEM_RSS_RLIM 5
const char *glibtop_names_proc_mem[GLIBTOP_MAX_PROC_MEM] =
const char *glibtop_names_proc_mem [GLIBTOP_MAX_PROC_MEM] =
{
"size", "vsize", "resident", "share", "rss", "rss_rlim"
"size", "vsize", "resident", "share", "rss", "rss_rlim"
};
const unsigned glibtop_types_proc_mem[GLIBTOP_MAX_PROC_MEM] =
const unsigned glibtop_types_proc_mem [GLIBTOP_MAX_PROC_MEM] =
{
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG
};
const char *glibtop_labels_proc_mem[GLIBTOP_MAX_PROC_MEM] =
const char *glibtop_labels_proc_mem [GLIBTOP_MAX_PROC_MEM] =
{
N_ ("Size"), N_ ("Virtual"), N_ ("Resident"), N_ ("Share"),
N_ ("Resident Set Size"), N_ ("Resident Set Size Limit")
N_("Size"), N_("Virtual"), N_("Resident"), N_("Share"),
N_("Resident Set Size"), N_("Resident Set Size Limit")
};
const char *glibtop_descriptions_proc_mem[GLIBTOP_MAX_PROC_MEM] =
const char *glibtop_descriptions_proc_mem [GLIBTOP_MAX_PROC_MEM] =
{
N_ ("Total # of pages of memory"),
N_ ("Number of pages of virtual memory"),
N_ ("Number of resident set (non-swapped) pages"),
N_ ("Number of pages of shared (mmap'd) memory"),
N_ ("Number of pages the process has in real memory, minus 3 "
"for administrative purposes. This is just the pages which "
"count towards text, data, or stack space. This does not "
"include pages which have not been demand-loaded in, or which "
"are swapped out."),
N_ ("Current limit in bytes on the rss of the process "
"(usually 2,147,483,647).")
N_("Total # of pages of memory"),
N_("Number of pages of virtual memory"),
N_("Number of resident set (non-swapped) pages"),
N_("Number of pages of shared (mmap'd) memory"),
N_("Number of pages the process has in real memory, minus 3 "
"for administrative purposes. This is just the pages which "
"count towards text, data, or stack space. This does not "
"include pages which have not been demand-loaded in, or which "
"are swapped out."),
N_("Current limit in bytes on the rss of the process "
"(usually 2,147,483,647).")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,56 +19,38 @@
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 <glibtop.h>
#include <glibtop/procsegment.h>
const char *glibtop_names_proc_segment[GLIBTOP_MAX_PROC_SEGMENT] =
const char *glibtop_names_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] =
{
"text_rss", "shlib_rss", "data_rss", "stack_rss",
"dirty_size", "start_code", "end_code", "start_data",
"end_data", "start_brk", "end_brk", "start_stack",
"start_mmap", "arg_start", "arg_end", "env_start",
"env_end"
"text_rss", "shlib_rss", "data_rss", "stack_rss",
"dirty_size", "start_code", "end_code", "start_stack"
};
const unsigned glibtop_types_proc_segment[GLIBTOP_MAX_PROC_SEGMENT] =
const unsigned glibtop_types_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_proc_segment[GLIBTOP_MAX_PROC_SEGMENT] =
const char *glibtop_labels_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] =
{
N_ ("Text_RSS"), N_ ("ShLib_RSS"), N_ ("Data_RSS"), N_ ("Stack_RSS"),
N_ ("Dirty Size"), N_ ("Start_Code"), N_ ("End_Code"),
N_ ("Start_Data"), N_ ("End_Data"), N_ ("Start_Brk"), N_ ("Brk"),
N_ ("Start_Stack"), N_ ("Start_MMap"), N_ ("Arg_Start"),
N_ ("Arg_End"), N_ ("Env_Start"), N_ ("Env_End")
N_("Text_RSS"), N_("ShLib_RSS"), N_("Data_RSS"), N_("Stack_RSS"),
N_("Dirty Size"), N_("Start_Code"), N_("End_Code"), N_("Start_Stack")
};
const char *glibtop_descriptions_proc_segment[GLIBTOP_MAX_PROC_SEGMENT] =
const char *glibtop_descriptions_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] =
{
N_ ("Text resident set size"),
N_ ("Shared-Lib resident set size"),
N_ ("Data resident set size"),
N_ ("Stack resident set size"),
N_ ("Total size of dirty pages"),
N_ ("Address of beginning of code segment"),
N_ ("Address of end of code segment"),
N_ ("Address of beginning of data segment"),
N_ ("Address of end of data segment"),
N_ ("Brk_Start"),
N_ ("Brk_End"),
N_ ("Address of the bottom of stack segment"),
N_ ("Start of mmap()ed areas"),
N_ ("Arg_Start"),
N_ ("Arg_End"),
N_ ("Env_Start"),
N_ ("Env_End")
N_("Text resident set size"),
N_("Shared-Lib resident set size"),
N_("Data resident set size"),
N_("Stack resident set size"),
N_("Total size of dirty pages"),
N_("Address of beginning of code segment"),
N_("Address of end of code segment"),
N_("Address of the bottom of stack segment")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,31 +19,31 @@
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 <glibtop.h>
#include <glibtop/procsignal.h>
const char *glibtop_names_proc_signal[GLIBTOP_MAX_PROC_SIGNAL] =
const char *glibtop_names_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] =
{
"signal", "blocked", "sigignore", "sigcatch"
"signal", "blocked", "sigignore", "sigcatch"
};
const unsigned glibtop_types_proc_signal[GLIBTOP_MAX_PROC_SIGNAL] =
const unsigned glibtop_types_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] =
{
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT
};
const char *glibtop_labels_proc_signal[GLIBTOP_MAX_PROC_SIGNAL] =
const char *glibtop_labels_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] =
{
N_ ("Signal"), N_ ("Blocked"), N_ ("SigIgnore"), N_ ("SigCatch")
N_("Signal"), N_("Blocked"), N_("SigIgnore"), N_("SigCatch")
};
const char *glibtop_descriptions_proc_signal[GLIBTOP_MAX_PROC_SIGNAL] =
const char *glibtop_descriptions_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] =
{
N_ ("Mask of pending signals"),
N_ ("Mask of blocked signals"),
N_ ("Mask of ignored signals"),
N_ ("Mask of caught signals")
N_("Mask of pending signals"),
N_("Mask of blocked signals"),
N_("Mask of ignored signals"),
N_("Mask of caught signals")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,41 +19,31 @@
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 <glibtop.h>
#include <glibtop/procstate.h>
const char *glibtop_names_proc_state[GLIBTOP_MAX_PROC_STATE] =
const char *glibtop_names_proc_state [GLIBTOP_MAX_PROC_STATE] =
{
"cmd", "state", "uid", "gid", "ruid", "rgid", "has_cpu",
"processor", "last_processor"
"cmd", "state", "uid", "gid"
};
const unsigned glibtop_types_proc_state[GLIBTOP_MAX_PROC_STATE] =
const unsigned glibtop_types_proc_state [GLIBTOP_MAX_PROC_STATE] =
{
GLIBTOP_TYPE_STRING, GLIBTOP_TYPE_UNSIGNED,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT
GLIBTOP_TYPE_STRING, GLIBTOP_TYPE_CHAR,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT
};
const char *glibtop_labels_proc_state[GLIBTOP_MAX_PROC_STATE] =
const char *glibtop_labels_proc_state [GLIBTOP_MAX_PROC_STATE] =
{
N_ ("Cmd"), N_ ("State"), N_ ("UID"), N_ ("GID"), N_ ("RUID"),
N_ ("RGID"), N_ ("Has CPU"), N_ ("Processor"),
N_ ("Last Processor")
N_("Cmd"), N_("State"), N_("UID"), N_("GID")
};
const char *glibtop_descriptions_proc_state[GLIBTOP_MAX_PROC_STATE] =
const char *glibtop_descriptions_proc_state [GLIBTOP_MAX_PROC_STATE] =
{
N_ ("Basename of executable file in call to exec()"),
N_ ("Single-Char code for process state (S=sleeping)"),
N_ ("effective UID of process"),
N_ ("effective GID of process"),
N_ ("real UID of process"),
N_ ("real GID of process"),
N_ ("has_cpu"),
N_ ("processor"),
N_ ("last_processor")
N_("Basename of executable file in call to exec()"),
N_("Single-Char code for process state (S=sleeping)"),
N_("UID of process"),
N_("GID of process")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,47 +19,47 @@
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 <glibtop.h>
#include <glibtop/proctime.h>
const char *glibtop_names_proc_time[GLIBTOP_MAX_PROC_TIME] =
const char *glibtop_names_proc_time [GLIBTOP_MAX_PROC_TIME] =
{
"start_time", "rtime", "utime", "stime", "cutime", "cstime",
"timeout", "it_real_value", "timeout", "xcpu_utime",
"xcpu_stime", "xcpu_flags"
"start_time", "rtime", "utime", "stime", "cutime", "cstime",
"timeout", "it_real_value", "timeout", "xcpu_utime",
"xcpu_stime"
};
const unsigned glibtop_types_proc_time[GLIBTOP_MAX_PROC_TIME] =
const unsigned glibtop_types_proc_time [GLIBTOP_MAX_PROC_TIME] =
{
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG,
GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG
};
const char *glibtop_labels_proc_time[GLIBTOP_MAX_PROC_TIME] =
const char *glibtop_labels_proc_time [GLIBTOP_MAX_PROC_TIME] =
{
N_ ("Start_Time"), N_ ("RTime"), N_ ("UTime"), N_ ("STime"),
N_ ("CUTime"), N_ ("CSTime"), N_ ("TimeOut"), N_ ("It_Real_Value"),
N_ ("Frequency"), N_ ("XCPU_UTime"), N_ ("XCPU_STime"),
N_ ("XCPU_Flags")
N_("Start_Time"), N_("RTime"), N_("UTime"), N_("STime"),
N_("CUTime"), N_("CSTime"), N_("TimeOut"), N_("It_Real_Value"),
N_("Frequency"), N_("XCPU_UTime"), N_("XCPU_STime")
};
const char *glibtop_descriptions_proc_time[GLIBTOP_MAX_PROC_TIME] =
const char *glibtop_descriptions_proc_time [GLIBTOP_MAX_PROC_TIME] =
{
N_ ("Start time of process in seconds since the epoch"),
N_ ("Real time accumulated by process (should be utime + stime)"),
N_ ("user-mode CPU time accumulated by process"),
N_ ("kernel-mode CPU time accumulated by process"),
N_ ("cumulative utime of process and reaped children"),
N_ ("cumulative stime of process and reaped children"),
N_ ("The time (in jiffies) of the process's next timeout"),
N_ ("The time (in jiffies) before the next SIGALRM is sent "
"to the process due to an interval timer."),
N_ ("Tick frequency"),
N_ ("SMP user-mode CPU time accumulated by process"),
N_ ("SMP kernel-mode CPU time accumulated by process"),
N_ ("SMP CPU Flags")
N_("Start time of process in seconds since the epoch"),
N_("Real time accumulated by process (should be utime + stime)"),
N_("user-mode CPU time accumulated by process"),
N_("kernel-mode CPU time accumulated by process"),
N_("cumulative utime of process and reaped children"),
N_("cumulative stime of process and reaped children"),
N_("The time (in jiffies) of the process's next timeout"),
N_("The time (in jiffies) before the next SIGALRM is sent "
"to the process due to an interval timer."),
N_("Tick frequency"),
N_("SMP user-mode CPU time accumulated by process"),
N_("SMP kernel-mode CPU time accumulated by process")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,55 +19,57 @@
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 <glibtop.h>
#include <glibtop/procuid.h>
const char *glibtop_names_proc_uid[GLIBTOP_MAX_PROC_UID] =
#define GLIBTOP_PROC_UID_UID 0
#define GLIBTOP_PROC_UID_EUID 1
#define GLIBTOP_PROC_UID_GID 2
#define GLIBTOP_PROC_UID_EGID 3
#define GLIBTOP_PROC_UID_PID 4
#define GLIBTOP_PROC_UID_PPID 5
#define GLIBTOP_PROC_UID_PGRP 6
#define GLIBTOP_PROC_UID_SESSION 7
#define GLIBTOP_PROC_UID_TTY 8
#define GLIBTOP_PROC_UID_TPGID 9
#define GLIBTOP_PROC_UID_PRIORITY 10
#define GLIBTOP_PROC_UID_NICE 11
const char *glibtop_names_proc_uid [GLIBTOP_MAX_PROC_UID] =
{
"uid", "euid", "gid", "egid", "suid", "sgid", "fsuid", "fsgid",
"pid", "ppid", "pgrp", "session", "tty", "tpgid", "priority",
"nice", "ngroups", "groups"
"uid", "euid", "gid", "egid", "pid", "ppid", "pgrp",
"session", "tty", "tpgid", "priority", "nice"
};
const unsigned glibtop_types_proc_uid[GLIBTOP_MAX_PROC_UID] =
const unsigned glibtop_types_proc_uid [GLIBTOP_MAX_PROC_UID] =
{
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT,
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT
};
const char *glibtop_labels_proc_uid[GLIBTOP_MAX_PROC_UID] =
const char *glibtop_labels_proc_uid [GLIBTOP_MAX_PROC_UID] =
{
N_ ("Uid"), N_ ("EUid"), N_ ("Gid"), N_ ("EGid"), N_ ("SUid"),
N_ ("SGid"), N_ ("FsUid"), N_ ("FsGid"), N_ ("Pid"),
N_ ("PPid"), N_ ("PGrp"), N_ ("Session"), N_ ("Tty"),
N_ ("TPGid"), N_ ("Priority"), N_ ("Nice"), N_ ("NGroups"),
N_ ("Groups")
N_("Uid"), N_("EUid"), N_("Gid"), N_("EGid"), N_("Pid"),
N_("PPid"), N_("PGrp"), N_("Session"), N_("Tty"),
N_("TPGid"), N_("Priority"), N_("Nice")
};
const char *glibtop_descriptions_proc_uid[GLIBTOP_MAX_PROC_UID] =
const char *glibtop_descriptions_proc_uid [GLIBTOP_MAX_PROC_UID] =
{
N_ ("User ID"),
N_ ("Effective User ID"),
N_ ("Group ID"),
N_ ("Effective Group ID"),
N_ ("Saved User ID"),
N_ ("Saved Group ID"),
N_ ("Filesystem User ID"),
N_ ("Filesystem Group ID"),
N_ ("Process ID"),
N_ ("PID of parent process"),
N_ ("Process group ID"),
N_ ("Session ID"),
N_ ("Full device number of controlling terminal"),
N_ ("Terminal process group ID"),
N_ ("Kernel scheduling priority"),
N_ ("Standard unix nice level of process"),
N_ ("Number of additional process groups"),
N_ ("Additional process groups")
N_("User ID"),
N_("Effective User ID"),
N_("Group ID"),
N_("Effective Group ID"),
N_("Process ID"),
N_("PID of parent process"),
N_("Process group ID"),
N_("Session ID"),
N_("Full device number of controlling terminal"),
N_("Terminal process group ID"),
N_("Kernel scheduling priority"),
N_("Standard unix nice level of process")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,48 +19,48 @@
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 <glibtop/sem_limits.h>
const char *glibtop_names_sem_limits[GLIBTOP_MAX_SEM_LIMITS] =
const char *glibtop_names_sem_limits [GLIBTOP_MAX_SEM_LIMITS] =
{
"semmap", "semmni", "semmns", "semmnu", "semmsl",
"semopm", "semume", "semusz", "semvmx", "semaem"
"semmap", "semmni", "semmns", "semmnu", "semmsl",
"semopm", "semume", "semusz", "semvmx", "semaem"
};
const unsigned glibtop_types_sem_limits[GLIBTOP_MAX_SEM_LIMITS] =
const unsigned glibtop_types_sem_limits [GLIBTOP_MAX_SEM_LIMITS] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_sem_limits[GLIBTOP_MAX_SEM_LIMITS] =
const char *glibtop_labels_sem_limits [GLIBTOP_MAX_SEM_LIMITS] =
{
N_ ("Number of entries in semaphore map"),
N_ ("Max number of arrays"),
N_ ("Max semaphores system wide"),
N_ ("Number of undo structures system wide"),
N_ ("Max semaphores per array"),
N_ ("Max ops per semop call"),
N_ ("Max number of undo entries per process"),
N_ ("sizeof struct sem_undo"),
N_ ("Semaphore max value"),
N_ ("Adjust on exit max value")
N_("Number of entries in semaphore map"),
N_("Max number of arrays"),
N_("Max semaphores system wide"),
N_("Number of undo structures system wide"),
N_("Max semaphores per array"),
N_("Max ops per semop call"),
N_("Max number of undo entries per process"),
N_("sizeof struct sem_undo"),
N_("Semaphore max value"),
N_("Adjust on exit max value")
};
const char *glibtop_descriptions_sem_limits[GLIBTOP_MAX_SEM_LIMITS] =
const char *glibtop_descriptions_sem_limits [GLIBTOP_MAX_SEM_LIMITS] =
{
N_ ("Number of entries in semaphore map"),
N_ ("Max number of arrays"),
N_ ("Max semaphores system wide"),
N_ ("Number of undo structures system wide"),
N_ ("Max semaphores per array"),
N_ ("Max ops per semop call"),
N_ ("Max number of undo entries per process"),
N_ ("sizeof struct sem_undo"),
N_ ("Semaphore max value"),
N_ ("Adjust on exit max value")
N_("Number of entries in semaphore map"),
N_("Max number of arrays"),
N_("Max semaphores system wide"),
N_("Number of undo structures system wide"),
N_("Max semaphores per array"),
N_("Max ops per semop call"),
N_("Max number of undo entries per process"),
N_("sizeof struct sem_undo"),
N_("Semaphore max value"),
N_("Adjust on exit max value")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,35 +19,35 @@
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 <glibtop/shm_limits.h>
const char *glibtop_names_shm_limits[GLIBTOP_MAX_SHM_LIMITS] =
const char *glibtop_names_shm_limits [GLIBTOP_MAX_SHM_LIMITS] =
{
"shmmax", "shmmin", "shmmni", "shmseg", "shmall"
"shmmax", "shmmin", "shmmni", "shmseg", "shmall"
};
const unsigned glibtop_types_shm_limits[GLIBTOP_MAX_SHM_LIMITS] =
const unsigned glibtop_types_shm_limits [GLIBTOP_MAX_SHM_LIMITS] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_shm_limits[GLIBTOP_MAX_SHM_LIMITS] =
const char *glibtop_labels_shm_limits [GLIBTOP_MAX_SHM_LIMITS] =
{
N_ ("Max segment size"),
N_ ("Min segment size"),
N_ ("Max number of segments"),
N_ ("Max shared segments per process"),
N_ ("Max total shared memory")
N_("Max segment size"),
N_("Min segment size"),
N_("Max number of segments"),
N_("Max shared segments per process"),
N_("Max total shared memory")
};
const char *glibtop_descriptions_shm_limits[GLIBTOP_MAX_SHM_LIMITS] =
const char *glibtop_descriptions_shm_limits [GLIBTOP_MAX_SHM_LIMITS] =
{
N_ ("Max segment size"),
N_ ("Min segment size"),
N_ ("Max number of segments"),
N_ ("Max shared segments per process"),
N_ ("Max total shared memory")
N_("Max segment size"),
N_("Min segment size"),
N_("Max number of segments"),
N_("Max shared segments per process"),
N_("Max total shared memory")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,37 +19,37 @@
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 <glibtop/swap.h>
const char *glibtop_names_swap[GLIBTOP_MAX_SWAP] =
const char *glibtop_names_swap [GLIBTOP_MAX_SWAP] =
{
"total", "used", "free", "pagein", "pageout"
"total", "used", "free", "pagein", "pageout"
};
const unsigned glibtop_types_swap[GLIBTOP_MAX_SWAP] =
const unsigned glibtop_types_swap [GLIBTOP_MAX_SWAP] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_swap[GLIBTOP_MAX_SWAP] =
const char *glibtop_labels_swap [GLIBTOP_MAX_SWAP] =
{
N_ ("Total Swap Space"),
N_ ("Used Swap Space"),
N_ ("Free Swap Space"),
N_ ("Page In"),
N_ ("Page Out"),
N_("Total Swap Space"),
N_("Used Swap Space"),
N_("Free Swap Space"),
N_("Page In"),
N_("Page Out"),
};
const char *glibtop_descriptions_swap[GLIBTOP_MAX_SWAP] =
const char *glibtop_descriptions_swap [GLIBTOP_MAX_SWAP] =
{
N_ ("Total Swap Space"),
N_ ("Used Swap Space"),
N_ ("Free Swap Space"),
N_ ("Total number of swap pages that have been brought in "
"since system boot"),
N_ ("Total number of swap pages that have been brought out "
"since system boot"),
N_("Total Swap Space"),
N_("Used Swap Space"),
N_("Free Swap Space"),
N_("Total number of swap pages that have been brought in "
"since system boot"),
N_("Total number of swap pages that have been brought out "
"since system boot"),
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
@@ -19,91 +17,83 @@
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 <config.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
const char *glibtop_names_sysdeps[GLIBTOP_MAX_SYSDEPS] =
const char *glibtop_names_sysdeps [GLIBTOP_MAX_SYSDEPS] =
{
"features", "pointer_size", "cpu", "mem", "swap", "uptime",
"loadavg", "shm_limits", "msg_limits", "sem_limits", "proclist",
"proc_state", "proc_uid", "proc_mem", "proc_time",
"proc_signal", "proc_kernel", "proc_segment", "proc_cwd", "proc_args",
"proc_map", "mountlist", "fsusage", "netload", "interface_names",
"ppp"
"features", "cpu", "mem", "swap", "uptime", "loadavg",
"shm_limits", "msg_limits", "sem_limits", "proclist",
"proc_state", "proc_uid", "proc_mem", "proc_time",
"proc_signal", "proc_kernel", "proc_segment", "proc_args",
"proc_map", "mountlist", "fsusage", "netload", "ppp"
};
const unsigned glibtop_types_sysdeps[GLIBTOP_MAX_SYSDEPS] =
const unsigned glibtop_types_sysdeps [GLIBTOP_MAX_SYSDEPS] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG,
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_sysdeps[GLIBTOP_MAX_SYSDEPS] =
const char *glibtop_labels_sysdeps [GLIBTOP_MAX_SYSDEPS] =
{
N_ ("Server Features"),
N_ ("Pointer Size"),
N_ ("CPU Usage"),
N_ ("Memory Usage"),
N_ ("Swap Usage"),
N_ ("System Uptime"),
N_ ("Load Averange"),
N_ ("Shared Memory Limits"),
N_ ("Message Queue Limits"),
N_ ("Semaphore Set Limits"),
N_ ("List of running Processes"),
N_ ("Process Status information"),
N_ ("Process UID and TTY information"),
N_ ("Process Memory information"),
N_ ("Process Time information"),
N_ ("Process Signal information"),
N_ ("Process Kernel Data information"),
N_ ("Process Segment information"),
N_ ("Process CWD"),
N_ ("Process Arguments"),
N_ ("Process Memory Map"),
N_ ("Mount List"),
N_ ("File System Usage"),
N_ ("Network Load"),
N_ ("Interface Names"),
N_ ("PPP Statistics")
N_("Server Features"),
N_("CPU Usage"),
N_("Memory Usage"),
N_("Swap Usage"),
N_("System Uptime"),
N_("Load Averange"),
N_("Shared Memory Limits"),
N_("Message Queue Limits"),
N_("Semaphore Set Limits"),
N_("List of running Processes"),
N_("Process Status information"),
N_("Process UID and TTY information"),
N_("Process Memory information"),
N_("Process Time information"),
N_("Process Signal information"),
N_("Process Kernel Data information"),
N_("Process Segment information"),
N_("Process Arguments"),
N_("Process Memory Map"),
N_("Mount List"),
N_("File System Usage"),
N_("Network Load"),
N_("PPP Statistics")
};
const char *glibtop_descriptions_sysdeps[GLIBTOP_MAX_SYSDEPS] =
const char *glibtop_descriptions_sysdeps [GLIBTOP_MAX_SYSDEPS] =
{
N_ ("Server Features"),
N_ ("Pointer Size on the Server (in bits)"),
N_ ("CPU Usage"),
N_ ("Memory Usage"),
N_ ("Swap Usage"),
N_ ("System Uptime"),
N_ ("Load Averange"),
N_ ("Shared Memory Limits"),
N_ ("Message Queue Limits"),
N_ ("Semaphore Set Limits"),
N_ ("List of running Processes"),
N_ ("Process Status information"),
N_ ("Process UID and TTY information"),
N_ ("Process Memory information"),
N_ ("Process Time information"),
N_ ("Process Signal information"),
N_ ("Process Kernel Data information"),
N_ ("Process Segment information"),
N_ ("Current working directory of the process"),
N_ ("Command line arguments of the process"),
N_ ("Process Memory Map"),
N_ ("List of currently mounted filesystems"),
N_ ("File System Usage"),
N_ ("Network Load"),
N_ ("Interface Names"),
N_ ("PPP Statistics")
N_("Server Features"),
N_("CPU Usage"),
N_("Memory Usage"),
N_("Swap Usage"),
N_("System Uptime"),
N_("Load Averange"),
N_("Shared Memory Limits"),
N_("Message Queue Limits"),
N_("Semaphore Set Limits"),
N_("List of running Processes"),
N_("Process Status information"),
N_("Process UID and TTY information"),
N_("Process Memory information"),
N_("Process Time information"),
N_("Process Signal information"),
N_("Process Kernel Data information"),
N_("Process Segment information"),
N_("Command line arguments of the process"),
N_("Process Memory Map"),
N_("List of currently mounted filesystems"),
N_("File System Usage"),
N_("Network Load"),
N_("PPP Statistics")
};

View File

@@ -1,5 +1,3 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -21,30 +19,28 @@
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 <glibtop/uptime.h>
const char *glibtop_names_uptime[GLIBTOP_MAX_UPTIME] =
const char *glibtop_names_uptime [GLIBTOP_MAX_UPTIME] =
{
"uptime", "idletime", "boot_time"
"uptime", "idletime"
};
const unsigned glibtop_types_uptime[GLIBTOP_MAX_UPTIME] =
const unsigned glibtop_types_uptime [GLIBTOP_MAX_UPTIME] =
{
GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_ULONG
GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_DOUBLE
};
const char *glibtop_labels_uptime[GLIBTOP_MAX_UPTIME] =
const char *glibtop_labels_uptime [GLIBTOP_MAX_UPTIME] =
{
N_ ("Uptime"),
N_ ("Idletime"),
N_ ("Boot time")
N_("Uptime"),
N_("Idletime")
};
const char *glibtop_descriptions_uptime[GLIBTOP_MAX_UPTIME] =
const char *glibtop_descriptions_uptime [GLIBTOP_MAX_UPTIME] =
{
N_ ("Time in seconds since system boot"),
N_ ("Time in seconds the system spent in the idle task since system boot"),
N_ ("Boot time (seconds sice epoch)")
N_("Time in seconds since system boot"),
N_("Time in seconds the system spent in the idle task since system boot")
};