28
autogen.sh
28
autogen.sh
@@ -1,33 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Run this to generate all the initial makefiles, etc.
|
# Run this to generate all the initial makefiles, etc.
|
||||||
RED='\033[0;31m'
|
|
||||||
NC='\033[0m' # No Color
|
|
||||||
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Linux)
|
|
||||||
if ! [ -x "$(command -v lsblk)" ]; then
|
|
||||||
echo '' >&2
|
|
||||||
echo -e "${RED}*** ERROR:${NC} lsblk cannot be found. Try installing util-linux or util-linux-ng ${RED}***${NC}" >&2
|
|
||||||
echo '' >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if ! [ -x "$(command -v sed)" ]; then
|
|
||||||
echo '' >&2
|
|
||||||
echo -e "${RED}*** ERROR:${NC} sed cannot be found. ***" >&2
|
|
||||||
echo '' >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if ! [ -x "$(command -v tr)" ]; then
|
|
||||||
echo '' >&2
|
|
||||||
echo -e "${RED}*** ERROR:${NC} tr cannot be found. ***" >&2
|
|
||||||
echo '' >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
test -n "$srcdir" || srcdir=$(dirname "$0")
|
test -n "$srcdir" || srcdir=$(dirname "$0")
|
||||||
test -n "$srcdir" || srcdir=.
|
test -n "$srcdir" || srcdir=.
|
||||||
|
|
||||||
|
10
configure.ac
10
configure.ac
@@ -71,16 +71,6 @@ dnl Most people should have a working perl interpreter on their system
|
|||||||
AC_CHECK_PROGS(PERL, perl5 perl)
|
AC_CHECK_PROGS(PERL, perl5 perl)
|
||||||
test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.])
|
test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.])
|
||||||
|
|
||||||
case "${host_os}" in
|
|
||||||
linux*)
|
|
||||||
AC_CHECK_TOOL(LSBLK,lsblk)
|
|
||||||
AC_CHECK_TOOL(SED,sed)
|
|
||||||
AC_CHECK_TOOL(TR,tr)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_CHECK_TOOL(CC,gcc)
|
AC_CHECK_TOOL(CC,gcc)
|
||||||
AC_CHECK_TOOL(RANLIB,ranlib)
|
AC_CHECK_TOOL(RANLIB,ranlib)
|
||||||
AC_CHECK_TOOL(AS,as)
|
AC_CHECK_TOOL(AS,as)
|
||||||
|
@@ -29,7 +29,6 @@ glibtop_close_p
|
|||||||
GLIBTOP_CMND_QUIT
|
GLIBTOP_CMND_QUIT
|
||||||
GLIBTOP_CMND_SYSDEPS
|
GLIBTOP_CMND_SYSDEPS
|
||||||
GLIBTOP_CMND_CPU
|
GLIBTOP_CMND_CPU
|
||||||
GLIBTOP_CMND_DISK
|
|
||||||
GLIBTOP_CMND_MEM
|
GLIBTOP_CMND_MEM
|
||||||
GLIBTOP_CMND_SWAP
|
GLIBTOP_CMND_SWAP
|
||||||
GLIBTOP_CMND_UPTIME
|
GLIBTOP_CMND_UPTIME
|
||||||
@@ -679,39 +678,6 @@ glibtop_init_cpu_s
|
|||||||
glibtop_get_cpu_s
|
glibtop_get_cpu_s
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<INCLUDE>glibtop/disk.h</INCLUDE>
|
|
||||||
<SECTION>
|
|
||||||
<FILE>disk</FILE>
|
|
||||||
GLIBTOP_DISK_TOTAL
|
|
||||||
GLIBTOP_DISK_USER
|
|
||||||
GLIBTOP_DISK_NICE
|
|
||||||
GLIBTOP_DISK_SYS
|
|
||||||
GLIBTOP_DISK_IDLE
|
|
||||||
GLIBTOP_DISK_FREQUENCY
|
|
||||||
GLIBTOP_XDISK_TOTAL
|
|
||||||
GLIBTOP_XDISK_USER
|
|
||||||
GLIBTOP_XDISK_NICE
|
|
||||||
GLIBTOP_XDISK_SYS
|
|
||||||
GLIBTOP_XDISK_IDLE
|
|
||||||
GLIBTOP_XDISK_FLAGS
|
|
||||||
GLIBTOP_DISK_IOWAIT
|
|
||||||
GLIBTOP_DISK_IRQ
|
|
||||||
GLIBTOP_DISK_SOFTIRQ
|
|
||||||
GLIBTOP_XDISK_IOWAIT
|
|
||||||
GLIBTOP_XDISK_IRQ
|
|
||||||
GLIBTOP_XDISK_SOFTIRQ
|
|
||||||
GLIBTOP_MAX_DISK
|
|
||||||
GLIBTOP_NDISK
|
|
||||||
glibtop_disk
|
|
||||||
glibtop_get_disk
|
|
||||||
glibtop_get_disk_r
|
|
||||||
glibtop_get_disk_l
|
|
||||||
glibtop_init_disk_p
|
|
||||||
glibtop_get_disk_p
|
|
||||||
glibtop_init_disk_s
|
|
||||||
glibtop_get_disk_s
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<INCLUDE>glibtop/swap.h</INCLUDE>
|
<INCLUDE>glibtop/swap.h</INCLUDE>
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>swap</FILE>
|
<FILE>swap</FILE>
|
||||||
|
@@ -34,9 +34,6 @@ mountlist_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
|||||||
smp_SOURCES = smp.c
|
smp_SOURCES = smp.c
|
||||||
smp_LDADD = $(top_builddir)/lib/libgtop-2.0.la -lm
|
smp_LDADD = $(top_builddir)/lib/libgtop-2.0.la -lm
|
||||||
|
|
||||||
disk_SOURCES = disk.c
|
|
||||||
disk_LDADD = $(top_builddir)/lib/libgtop-2.0.la -lm
|
|
||||||
|
|
||||||
timings_SOURCES = timings.c
|
timings_SOURCES = timings.c
|
||||||
timings_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
timings_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
||||||
|
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
/* Copyright (C) 1998-99 Martin Baulig
|
|
||||||
This file is part of LibGTop 1.0.
|
|
||||||
|
|
||||||
Contributed by James Dominic P. Guana <guana.histark@gmail.com>, May 2020.
|
|
||||||
|
|
||||||
LibGTop is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License,
|
|
||||||
or (at your option) any later version.
|
|
||||||
|
|
||||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LibGTop; see the file COPYING. If not, write to the
|
|
||||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/disk.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main (int argc, char *argv [])
|
|
||||||
{
|
|
||||||
glibtop_disk disk;
|
|
||||||
char separator [BUFSIZ];
|
|
||||||
int ndisk, i;
|
|
||||||
|
|
||||||
glibtop_init();
|
|
||||||
|
|
||||||
glibtop_get_disk (&disk);
|
|
||||||
|
|
||||||
ndisk = glibtop_global_server->ndisk ? glibtop_global_server->ndisk : 1;
|
|
||||||
|
|
||||||
memset (separator, '-', 91);
|
|
||||||
separator [92] = '\0';
|
|
||||||
|
|
||||||
printf("\n\n");
|
|
||||||
printf ("ELAPSE ");
|
|
||||||
printf ("Read Time Read Write Time Write\n");
|
|
||||||
printf ("%s\n", separator);
|
|
||||||
|
|
||||||
for (i = 0; i < ndisk; i++) {
|
|
||||||
printf ("DISK %3d : %12lu %12lu %12lu %12lu\n", i,
|
|
||||||
(unsigned long) disk.xdisk_sectors_read [i],
|
|
||||||
(unsigned long) disk.xdisk_time_read [i],
|
|
||||||
(unsigned long) disk.xdisk_sectors_write [i],
|
|
||||||
(unsigned long) disk.xdisk_time_write [i]);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
printf ("%s\n\n\n", separator);
|
|
||||||
|
|
||||||
exit (0);
|
|
||||||
}
|
|
@@ -1,5 +1,4 @@
|
|||||||
void|cpu
|
void|cpu
|
||||||
void|disk
|
|
||||||
void|mem
|
void|mem
|
||||||
void|swap
|
void|swap
|
||||||
void|uptime
|
void|uptime
|
||||||
|
@@ -2,7 +2,7 @@ glibtopdir = $(includedir)/libgtop-2.0/glibtop
|
|||||||
|
|
||||||
glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
||||||
sem_limits.h uptime.h command.h mem.h proclist.h \
|
sem_limits.h uptime.h command.h mem.h proclist.h \
|
||||||
proctime.h shm_limits.h cpu.h disk.h msg_limits.h \
|
proctime.h shm_limits.h cpu.h msg_limits.h \
|
||||||
procmem.h procuid.h swap.h \
|
procmem.h procuid.h swap.h \
|
||||||
procsegment.h sysdeps.h global.h \
|
procsegment.h sysdeps.h global.h \
|
||||||
procsignal.h union.h gnuserv.h \
|
procsignal.h union.h gnuserv.h \
|
||||||
|
@@ -60,9 +60,8 @@ G_BEGIN_DECLS
|
|||||||
#define GLIBTOP_CMND_PROC_WD 26
|
#define GLIBTOP_CMND_PROC_WD 26
|
||||||
#define GLIBTOP_CMND_PROC_AFFINITY 27
|
#define GLIBTOP_CMND_PROC_AFFINITY 27
|
||||||
#define GLIBTOP_CMND_PROC_IO 28
|
#define GLIBTOP_CMND_PROC_IO 28
|
||||||
#define GLIBTOP_CMND_DISK 29
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_CMND 30
|
#define GLIBTOP_MAX_CMND 29
|
||||||
|
|
||||||
#define _GLIBTOP_PARAM_SIZE 16
|
#define _GLIBTOP_PARAM_SIZE 16
|
||||||
|
|
||||||
|
@@ -50,16 +50,12 @@ struct _partition_info
|
|||||||
int max;
|
int max;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _partition_info partition_info;
|
|
||||||
|
|
||||||
struct _glibtop_disk
|
struct _glibtop_disk
|
||||||
{
|
{
|
||||||
guint64 flags;
|
|
||||||
guint64 xdisk_sectors_read [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_SECTORS_READ */
|
guint64 xdisk_sectors_read [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_SECTORS_READ */
|
||||||
guint64 xdisk_time_read [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_TIME_READ */
|
guint64 xdisk_time_read [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_TIME_READ */
|
||||||
guint64 xdisk_sectors_write [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_SECTORS_WRITE */
|
guint64 xdisk_sectors_write [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_SECTORS_WRITE */
|
||||||
guint64 xdisk_time_write [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_TIME_WRITE */
|
guint64 xdisk_time_write [GLIBTOP_NDISK]; /* GLIBTOP_XDISK_TIME_WRITE */
|
||||||
guint64 xdisk_flags;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void glibtop_get_disk (glibtop_disk *buf);
|
void glibtop_get_disk (glibtop_disk *buf);
|
||||||
|
@@ -139,9 +139,6 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = {
|
|||||||
#if GLIBTOP_SUID_CPU
|
#if GLIBTOP_SUID_CPU
|
||||||
_glibtop_init_cpu_p,
|
_glibtop_init_cpu_p,
|
||||||
#endif
|
#endif
|
||||||
#if GLIBTOP_SUID_DISK
|
|
||||||
_glibtop_init_disk_p,
|
|
||||||
#endif
|
|
||||||
#if GLIBTOP_SUID_MEM
|
#if GLIBTOP_SUID_MEM
|
||||||
_glibtop_init_mem_p,
|
_glibtop_init_mem_p,
|
||||||
#endif
|
#endif
|
||||||
|
@@ -5,7 +5,7 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libgtop
|
Name: libgtop
|
||||||
Description: Portable System Access Library
|
Description: Portable System Access Library
|
||||||
Requires: glib-2.0, util-linux
|
Requires: glib-2.0
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -lgtop-2.0
|
Libs: -L${libdir} -lgtop-2.0
|
||||||
Cflags: -I${includedir}/libgtop-2.0
|
Cflags: -I${includedir}/libgtop-2.0
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: LibGTop library
|
Summary: LibGTop library
|
||||||
Requires: util-linux, sed
|
|
||||||
Name: libgtop
|
Name: libgtop
|
||||||
Version: %ver
|
Version: %ver
|
||||||
Release: %rel
|
Release: %rel
|
||||||
|
@@ -98,7 +98,7 @@ handle_parent_connection (int s)
|
|||||||
do_output (s, resp, _offset_data (cpu), 0, NULL);
|
do_output (s, resp, _offset_data (cpu), 0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_DISK:
|
case GLIBTOP_CMND_DISK:
|
||||||
glibtop_get_disk_l (server, &resp->u.data.disk);
|
glibtop_get_disk_l (server, &resp->u.disk.cpu);
|
||||||
do_output (s, resp, _offset_data (disk), 0, NULL);
|
do_output (s, resp, _offset_data (disk), 0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_MEM:
|
case GLIBTOP_CMND_MEM:
|
||||||
|
@@ -135,12 +135,6 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
|||||||
resp->offset = _offset_data (cpu);
|
resp->offset = _offset_data (cpu);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if GLIBTOP_SUID_DISK
|
|
||||||
case GLIBTOP_CMND_DISK:
|
|
||||||
glibtop_get_disk_p (server, &resp->u.data.disk);
|
|
||||||
resp->offset = _offset_data (disk);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if GLIBTOP_SUID_MEM
|
#if GLIBTOP_SUID_MEM
|
||||||
case GLIBTOP_CMND_MEM:
|
case GLIBTOP_CMND_MEM:
|
||||||
glibtop_get_mem_p (server, &resp->u.data.mem);
|
glibtop_get_mem_p (server, &resp->u.data.mem);
|
||||||
|
@@ -72,9 +72,9 @@ glibtop_get_cpu(glibtop_cpu *buf)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
glibtop_get_disk (glibtop_disk *buf)
|
glibtop_get_cpu (glibtop_cpu *buf)
|
||||||
{
|
{
|
||||||
glibtop_get_disk_l (glibtop_global_server, buf);
|
glibtop_get_cpu_l (glibtop_global_server, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ _glibtop_init_disk_s (glibtop *server)
|
|||||||
// Handle LVM and RAID //
|
// Handle LVM and RAID //
|
||||||
|
|
||||||
void
|
void
|
||||||
find_primary_part (partition_info *primary_part, const char *m)
|
find_primary_part (_partition_info *primary_part, const char *m)
|
||||||
{
|
{
|
||||||
int n = 0, tlvl = 0;
|
int n = 0, tlvl = 0;
|
||||||
char name[256]="",type[256]="";
|
char name[256]="",type[256]="";
|
||||||
@@ -190,7 +190,7 @@ find_primary_part (partition_info *primary_part, const char *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
is_virtual_drive (partition_info *primary_part, const char *p)
|
is_virtual_drive (_partition_info *primary_part, const char *p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char name[256];
|
char name[256];
|
||||||
@@ -220,27 +220,10 @@ is_virtual_drive (partition_info *primary_part, const char *p)
|
|||||||
return test;
|
return test;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
max_lines (const char *p)
|
|
||||||
{
|
|
||||||
char temp[10];
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
while (sscanf (p, "%s", temp) == 1)
|
|
||||||
{
|
|
||||||
|
|
||||||
p = skip_line(p);
|
|
||||||
count++;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
|
glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
|
||||||
{
|
{
|
||||||
partition_info primary_part[GLIBTOP_NDISK];
|
_partition_info primary_part[GLIBTOP_NDISK];
|
||||||
char buffer [STAT_BUFSIZ], *p, map_buffer [STAT_BUFSIZ], *m;
|
char buffer [STAT_BUFSIZ], *p, map_buffer [STAT_BUFSIZ], *m;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -250,6 +233,8 @@ glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
|
|||||||
|
|
||||||
get_from_pipe (map_buffer, CMD_PIPE);
|
get_from_pipe (map_buffer, CMD_PIPE);
|
||||||
|
|
||||||
|
server->ndisk = GLIBTOP_NDISK;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GLOBAL
|
* GLOBAL
|
||||||
*/
|
*/
|
||||||
@@ -261,23 +246,23 @@ glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
|
|||||||
* PER DISK
|
* PER DISK
|
||||||
*/
|
*/
|
||||||
|
|
||||||
server->ndisk = max_lines(p);
|
|
||||||
|
|
||||||
find_primary_part (primary_part, m);
|
find_primary_part (primary_part, m);
|
||||||
|
|
||||||
for (i = 0; i < server->ndisk; i++) {
|
for (i = 0; i <= server->ndisk; i++) {
|
||||||
|
|
||||||
p = skip_multiple_token (p,2);
|
p = skip_multiple_token (p,2);
|
||||||
|
|
||||||
// skip if disk is the raw device
|
// skip if disk is the raw device
|
||||||
if (!is_virtual_drive (primary_part, p)) {
|
if (!is_virtual_drive (primary_part, p)) {
|
||||||
|
|
||||||
server->ndisk--;
|
|
||||||
p = skip_line (p); /* move to ^ */
|
p = skip_line (p); /* move to ^ */
|
||||||
p = skip_multiple_token (p, 2);
|
p = skip_multiple_token (p, 2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!check_disk_line_warn (server, p, i))
|
||||||
|
break;
|
||||||
|
|
||||||
p = skip_token (p); /* prev xdisk_name */
|
p = skip_token (p); /* prev xdisk_name */
|
||||||
p = skip_token (p); /* prev xdisk_reads_completed */
|
p = skip_token (p); /* prev xdisk_reads_completed */
|
||||||
p = skip_token (p); /* prev xdisk_reads_merged */
|
p = skip_token (p); /* prev xdisk_reads_merged */
|
||||||
|
@@ -62,7 +62,7 @@ skip_line (const char *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
get_from_pipe (char *buffer, const char *cmd);
|
get_from_pipe (char *buffer, const char *cmd)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Smart strtoul which handles binary suffixes
|
* Smart strtoul which handles binary suffixes
|
||||||
|
@@ -3,7 +3,7 @@ AM_CPPFLAGS = @AM_CPPFLAGS@
|
|||||||
|
|
||||||
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la
|
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la
|
||||||
|
|
||||||
libgtop_sysdeps_2_0_la_SOURCES = open.c close.c siglist.c cpu.c disk.c mem.c swap.c \
|
libgtop_sysdeps_2_0_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 \
|
||||||
|
@@ -7,7 +7,7 @@ libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c
|
|||||||
|
|
||||||
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
|
||||||
libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c siglist.c cpu.c disk.c mem.c swap.c \
|
libgtop_sysdeps_suid_2_0_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 \
|
||||||
|
@@ -1,47 +0,0 @@
|
|||||||
/* Copyright (C) 1998-99 Martin Baulig
|
|
||||||
This file is part of LibGTop 1.0.
|
|
||||||
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
LibGTop is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License,
|
|
||||||
or (at your option) any later version.
|
|
||||||
|
|
||||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LibGTop; see the file COPYING. If not, write to the
|
|
||||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop/disk.h>
|
|
||||||
|
|
||||||
#include <glibtop_suid.h>
|
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_disk = 0;
|
|
||||||
|
|
||||||
/* Init function. */
|
|
||||||
|
|
||||||
void
|
|
||||||
_glibtop_init_disk_p (glibtop *server)
|
|
||||||
{
|
|
||||||
server->sysdeps.disk = _glibtop_sysdeps_disk;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Provides information about disk usage. */
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_get_disk_p (glibtop *server, glibtop_disk *buf)
|
|
||||||
{
|
|
||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_DISK, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_disk));
|
|
||||||
}
|
|
Reference in New Issue
Block a user