Compare commits
6 Commits
wip/diskio
...
gnome-2-36
Author | SHA1 | Date | |
---|---|---|---|
|
e0f97e7dbd | ||
|
d530a2d2a8 | ||
|
88ecae1d00 | ||
|
89a73e2746 | ||
|
35bf89632a | ||
|
4285abe72b |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -70,7 +70,6 @@ examples/smp
|
|||||||
examples/sysdeps
|
examples/sysdeps
|
||||||
examples/timings
|
examples/timings
|
||||||
examples/wd
|
examples/wd
|
||||||
examples/diskio
|
|
||||||
gtk-doc.make
|
gtk-doc.make
|
||||||
install-sh
|
install-sh
|
||||||
lib/GTop-2.0.gir
|
lib/GTop-2.0.gir
|
||||||
|
22
NEWS
22
NEWS
@@ -1,3 +1,25 @@
|
|||||||
|
20 March 2017: Overview of changes in 2.36.0
|
||||||
|
================================================
|
||||||
|
|
||||||
|
* Version bumped
|
||||||
|
|
||||||
|
13 March 2017: Overview of changes in 2.35.92
|
||||||
|
================================================
|
||||||
|
|
||||||
|
* Better output format for arrays
|
||||||
|
|
||||||
|
13 February 2017: Overview of changes in 2.35.90
|
||||||
|
================================================
|
||||||
|
|
||||||
|
* Linux:
|
||||||
|
- Use dynamically allocated cpu buffer
|
||||||
|
- Do not cache getpagesize()
|
||||||
|
- Use faster g_ascii_isspace in tokenization
|
||||||
|
- Ignore paragraphs not describing a CPU/core
|
||||||
|
|
||||||
|
* Updated translations
|
||||||
|
* Added more gettext options
|
||||||
|
|
||||||
16 January 2017: Overview of changes in 2.34.2
|
16 January 2017: Overview of changes in 2.34.2
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
@@ -3,8 +3,8 @@ dnl Configure script for the Gnome library
|
|||||||
dnl
|
dnl
|
||||||
|
|
||||||
m4_define([libgtop_major_version], [2])
|
m4_define([libgtop_major_version], [2])
|
||||||
m4_define([libgtop_minor_version], [34])
|
m4_define([libgtop_minor_version], [36])
|
||||||
m4_define([libgtop_micro_version], [2])
|
m4_define([libgtop_micro_version], [0])
|
||||||
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
|
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
|
||||||
|
|
||||||
dnl increment if the interface has additions, changes, removals.
|
dnl increment if the interface has additions, changes, removals.
|
||||||
|
@@ -11,7 +11,7 @@ AM_LDFLAGS = $(LIBGTOP_EXTRA_LIBS)
|
|||||||
|
|
||||||
noinst_PROGRAMS = first second pprint procargs df netlist \
|
noinst_PROGRAMS = first second pprint procargs df netlist \
|
||||||
mountlist procmap netload sysdeps timings \
|
mountlist procmap netload sysdeps timings \
|
||||||
openfiles smp proclist free wd affinity diskio
|
openfiles smp proclist free wd affinity
|
||||||
|
|
||||||
first_SOURCES = first.c
|
first_SOURCES = first.c
|
||||||
first_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
first_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
||||||
@@ -43,7 +43,6 @@ pprint_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
|||||||
procargs_SOURCES = procargs.c
|
procargs_SOURCES = procargs.c
|
||||||
procargs_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
procargs_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
||||||
|
|
||||||
|
|
||||||
df_SOURCES = df.c
|
df_SOURCES = df.c
|
||||||
df_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
df_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
||||||
|
|
||||||
@@ -64,6 +63,3 @@ free_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
|||||||
|
|
||||||
affinity_SOURCES = affinity.c
|
affinity_SOURCES = affinity.c
|
||||||
affinity_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
affinity_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
||||||
|
|
||||||
diskio_SOURCES = diskio.c
|
|
||||||
diskio_LDADD = $(top_builddir)/lib/libgtop-2.0.la
|
|
||||||
|
@@ -1,39 +0,0 @@
|
|||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/procio.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
static void show_diskio(pid_t pid)
|
|
||||||
{
|
|
||||||
glibtop_proc_io io;
|
|
||||||
|
|
||||||
glibtop_get_proc_io (&io, pid);
|
|
||||||
|
|
||||||
printf("<%ld>\t", (long)pid);
|
|
||||||
|
|
||||||
printf("flags: %08lx disk_rchar : %lu, disk_wchar : %lu, disk_read_bytes : %lu, disk_write_bytes : %lu\n", (unsigned long)io.flags, io.disk_rchar, io.disk_wchar, io.disk_rbytes, io.disk_wbytes);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
glibtop_init();
|
|
||||||
|
|
||||||
while(*++argv)
|
|
||||||
{
|
|
||||||
pid_t pid = strtol(*argv, NULL, 10);
|
|
||||||
show_diskio(pid);
|
|
||||||
}
|
|
||||||
|
|
||||||
glibtop_close();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@@ -28,10 +28,11 @@
|
|||||||
(unsigned long) buf_offsetof(ARRAY), \
|
(unsigned long) buf_offsetof(ARRAY), \
|
||||||
(unsigned long) G_N_ELEMENTS(buf.ARRAY)); \
|
(unsigned long) G_N_ELEMENTS(buf.ARRAY)); \
|
||||||
for (i = 0; i < (SIZE); ++i) { \
|
for (i = 0; i < (SIZE); ++i) { \
|
||||||
printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \
|
|
||||||
if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \
|
if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \
|
||||||
do { i++; } while (i < SIZE && !buf.ARRAY[i]); \
|
do { i++; } while (i < SIZE && !buf.ARRAY[i]); \
|
||||||
printf("..., "); \
|
printf("..., "); \
|
||||||
|
} else { \
|
||||||
|
printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
printf("}\n"); \
|
printf("}\n"); \
|
||||||
@@ -39,12 +40,12 @@
|
|||||||
|
|
||||||
#define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \
|
#define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \
|
||||||
size_t i; \
|
size_t i; \
|
||||||
printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \
|
printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \
|
||||||
(unsigned long) sizeof buf->ARRAY, 0,\
|
(unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \
|
||||||
(unsigned long) G_N_ELEMENTS(buf->ARRAY)); \
|
(unsigned long) G_N_ELEMENTS(buf->ARRAY)); \
|
||||||
for(i = 0; i < SIZE; ++i) { \
|
for(i = 0; i < SIZE; ++i) { \
|
||||||
if (buf->ARRAY[i].values) { \
|
if (buf->ARRAY[i].values) { \
|
||||||
printf ("[ "); \
|
printf ("\t[ "); \
|
||||||
PPRINT_HASHTABLE(buf->ARRAY[i].values); \
|
PPRINT_HASHTABLE(buf->ARRAY[i].values); \
|
||||||
printf ("]\n"); \
|
printf ("]\n"); \
|
||||||
} \
|
} \
|
||||||
@@ -71,7 +72,7 @@ static void pprint_get_sysinfo(void)
|
|||||||
HEADER_PPRINT(glibtop_get_sysinfo);
|
HEADER_PPRINT(glibtop_get_sysinfo);
|
||||||
//PPRINT(flags, "%#llx");
|
//PPRINT(flags, "%#llx");
|
||||||
// PPRINT(ncpu, "%llu");
|
// PPRINT(ncpu, "%llu");
|
||||||
PPRINT_ENTRY_ARRAY(cpuinfo, 4);
|
PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu);
|
||||||
FOOTER_PPRINT();
|
FOOTER_PPRINT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -92,10 +92,9 @@ main (int argc, char *argv [])
|
|||||||
"\tproc_time:\t%d\t0x%08lx\n"
|
"\tproc_time:\t%d\t0x%08lx\n"
|
||||||
"\tproc_signal:\t%d\t0x%08lx\n"
|
"\tproc_signal:\t%d\t0x%08lx\n"
|
||||||
"\tproc_kernel:\t%d\t0x%08lx\n"
|
"\tproc_kernel:\t%d\t0x%08lx\n"
|
||||||
"\tproc_segment:\t%d\t0x%08lx\n"
|
"\tproc_segment:\t%d\t0x%08lx\n\n"
|
||||||
"\tproc_args:\t%d\t0x%08lx\n"
|
"\tproc_args:\t%d\t0x%08lx\n"
|
||||||
"\tproc_map:\t%d\t0x%08lx\n"
|
"\tproc_map:\t%d\t0x%08lx\n\n"
|
||||||
"\tproc_io:\t%d\t0x%08lx\n\n"
|
|
||||||
"\tmountlist:\t%d\t0x%08lx\n"
|
"\tmountlist:\t%d\t0x%08lx\n"
|
||||||
"\tfsusage:\t%d\t0x%08lx\n\n"
|
"\tfsusage:\t%d\t0x%08lx\n\n"
|
||||||
"\tnetload:\t%d\t0x%08lx\n"
|
"\tnetload:\t%d\t0x%08lx\n"
|
||||||
@@ -138,8 +137,6 @@ main (int argc, char *argv [])
|
|||||||
(unsigned long) sysdeps.proc_args,
|
(unsigned long) sysdeps.proc_args,
|
||||||
FEATURE_CHECK(PROC_MAP),
|
FEATURE_CHECK(PROC_MAP),
|
||||||
(unsigned long) sysdeps.proc_map,
|
(unsigned long) sysdeps.proc_map,
|
||||||
FEATURE_CHECK(PROC_IO),
|
|
||||||
(unsigned long) sysdeps.proc_io,
|
|
||||||
FEATURE_CHECK(MOUNTLIST),
|
FEATURE_CHECK(MOUNTLIST),
|
||||||
(unsigned long) sysdeps.mountlist,
|
(unsigned long) sysdeps.mountlist,
|
||||||
FEATURE_CHECK(FSUSAGE),
|
FEATURE_CHECK(FSUSAGE),
|
||||||
|
@@ -412,26 +412,6 @@ main (int argc, char *argv [])
|
|||||||
(long double) ELAPSED_UTIME / PROFILE_COUNT,
|
(long double) ELAPSED_UTIME / PROFILE_COUNT,
|
||||||
(long double) ELAPSED_STIME / PROFILE_COUNT);
|
(long double) ELAPSED_STIME / PROFILE_COUNT);
|
||||||
|
|
||||||
|
|
||||||
getrusage (RUSAGE_SELF, &rusage_start);
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
|
||||||
glibtop_get_proc_io (&data.proc_io, pid);
|
|
||||||
|
|
||||||
getrusage (RUSAGE_SELF, &rusage_end);
|
|
||||||
|
|
||||||
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
|
|
||||||
&elapsed_utime);
|
|
||||||
|
|
||||||
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
|
|
||||||
&elapsed_stime);
|
|
||||||
|
|
||||||
printf ("Proc_Io (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
|
|
||||||
(unsigned long) data.proc_io.flags, PROFILE_COUNT,
|
|
||||||
(long double) ELAPSED_UTIME / PROFILE_COUNT,
|
|
||||||
(long double) ELAPSED_STIME / PROFILE_COUNT);
|
|
||||||
|
|
||||||
|
|
||||||
getrusage (RUSAGE_SELF, &total_end);
|
getrusage (RUSAGE_SELF, &total_end);
|
||||||
|
|
||||||
libgtop_timersub (&total_end.ru_utime, &total_start.ru_utime,
|
libgtop_timersub (&total_end.ru_utime, &total_start.ru_utime,
|
||||||
|
@@ -24,5 +24,4 @@ void|ppp|ushort(device)
|
|||||||
char **|netlist
|
char **|netlist
|
||||||
char **|proc_wd|pid_t(pid)
|
char **|proc_wd|pid_t(pid)
|
||||||
guint16*|proc_affinity|pid_t(pid)
|
guint16*|proc_affinity|pid_t(pid)
|
||||||
void|proc_io|pid_t(pid)
|
|
||||||
|
|
||||||
|
@@ -9,7 +9,6 @@ glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
|||||||
parameter.h mountlist.h fsusage.h procmap.h signal.h \
|
parameter.h mountlist.h fsusage.h procmap.h signal.h \
|
||||||
sysinfo.h ppp.h procargs.h netload.h \
|
sysinfo.h ppp.h procargs.h netload.h \
|
||||||
procwd.h procaffinity.h \
|
procwd.h procaffinity.h \
|
||||||
procio.h \
|
|
||||||
netlist.h procopenfiles.h open.h
|
netlist.h procopenfiles.h open.h
|
||||||
|
|
||||||
noinst_HEADERS = error.h write.h read_data.h read.h init_hooks.h machine.h \
|
noinst_HEADERS = error.h write.h read_data.h read.h init_hooks.h machine.h \
|
||||||
|
@@ -59,9 +59,8 @@ G_BEGIN_DECLS
|
|||||||
#define GLIBTOP_CMND_PROC_OPEN_FILES 25
|
#define GLIBTOP_CMND_PROC_OPEN_FILES 25
|
||||||
#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_MAX_CMND 29
|
#define GLIBTOP_MAX_CMND 28
|
||||||
|
|
||||||
#define _GLIBTOP_PARAM_SIZE 16
|
#define _GLIBTOP_PARAM_SIZE 16
|
||||||
|
|
||||||
|
@@ -1,93 +0,0 @@
|
|||||||
/* Copyright (C) 2017 Robert Roth
|
|
||||||
This file is part of LibGTop.
|
|
||||||
|
|
||||||
Contributed by Robert Roth <robert.roth.off@gmail.com>, February 2017.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GLIBTOP_PROCIO_H__
|
|
||||||
#define __GLIBTOP_PROCIO_H__
|
|
||||||
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/global.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GLIBTOP_PROC_IO_DISK_RCHAR 0
|
|
||||||
#define GLIBTOP_PROC_IO_DISK_WCHAR 1
|
|
||||||
#define GLIBTOP_PROC_IO_DISK_RBYTES 2
|
|
||||||
#define GLIBTOP_PROC_IO_DISK_WBYTES 3
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_PROC_IO 3
|
|
||||||
|
|
||||||
typedef struct _glibtop_proc_io glibtop_proc_io;
|
|
||||||
|
|
||||||
/* Time section */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* glibtop_proc_io:
|
|
||||||
* @disk_rchar: The number of bytes which this task has caused to be read from storage. This
|
|
||||||
* is simply the sum of bytes which this process passed to read() and pread(), also including tty IO,
|
|
||||||
* and it is unaffected by whether or not actual physical disk IO was required.
|
|
||||||
* @disk_wchar: The number of bytes which this task has caused, or shall cause to be written
|
|
||||||
* to disk. Similar caveats apply here as with rchar.
|
|
||||||
* @disk_rbytes: Attempt to count the number of bytes which this process really did cause to
|
|
||||||
* be fetched from the storage layer. Done at the submit_bio() level, so it is
|
|
||||||
* accurate for block-backed filesystems.
|
|
||||||
* @disk_wbytes: Attempt to count the number of bytes which this process caused to be sent to
|
|
||||||
* the storage layer. This is done at page-dirtying time.
|
|
||||||
*
|
|
||||||
* Process disk io data filled by glibtop_get_proc_io().
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
struct _glibtop_proc_io
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
guint64 flags;
|
|
||||||
/*< public >*/
|
|
||||||
guint64 disk_rchar;
|
|
||||||
guint64 disk_wchar;
|
|
||||||
guint64 disk_rbytes;
|
|
||||||
guint64 disk_wbytes;
|
|
||||||
|
|
||||||
/* reserved for future extensions, e.g. per-process netio */
|
|
||||||
guint64 reserved[10];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void glibtop_get_proc_io (glibtop_proc_io *buf, pid_t pid);
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_IO
|
|
||||||
#define glibtop_get_proc_io_r glibtop_get_proc_io_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_io_r glibtop_get_proc_io_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void glibtop_get_proc_io_l (glibtop *server, glibtop_proc_io *buf, pid_t pid);
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_IO
|
|
||||||
void _glibtop_init_proc_io_p (glibtop *server);
|
|
||||||
void glibtop_get_proc_io_p (glibtop *server, glibtop_proc_io *buf, pid_t pid);
|
|
||||||
#else
|
|
||||||
void _glibtop_init_proc_io_s (glibtop *server);
|
|
||||||
void glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf, pid_t pid);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif
|
|
@@ -53,9 +53,8 @@ G_BEGIN_DECLS
|
|||||||
#define GLIBTOP_SYSDEPS_PROC_OPEN_FILES 24
|
#define GLIBTOP_SYSDEPS_PROC_OPEN_FILES 24
|
||||||
#define GLIBTOP_SYSDEPS_PROC_WD 25
|
#define GLIBTOP_SYSDEPS_PROC_WD 25
|
||||||
#define GLIBTOP_SYSDEPS_PROC_AFFINITY 26
|
#define GLIBTOP_SYSDEPS_PROC_AFFINITY 26
|
||||||
#define GLIBTOP_SYSDEPS_PROC_IO 27
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_SYSDEPS 28
|
#define GLIBTOP_MAX_SYSDEPS 27
|
||||||
|
|
||||||
/* The 'features' args to glibtop_init_* is an unsigned long */
|
/* The 'features' args to glibtop_init_* is an unsigned long */
|
||||||
G_STATIC_ASSERT((1UL << (GLIBTOP_MAX_SYSDEPS - 1)) <= ULONG_MAX);
|
G_STATIC_ASSERT((1UL << (GLIBTOP_MAX_SYSDEPS - 1)) <= ULONG_MAX);
|
||||||
@@ -94,7 +93,6 @@ struct _glibtop_sysdeps
|
|||||||
guint64 ppp; /* glibtop_ppp */
|
guint64 ppp; /* glibtop_ppp */
|
||||||
guint64 proc_wd; /* glibtop_proc_wd */
|
guint64 proc_wd; /* glibtop_proc_wd */
|
||||||
guint64 proc_affinity; /* glibtop_proc_affinity */
|
guint64 proc_affinity; /* glibtop_proc_affinity */
|
||||||
guint64 proc_io; /* glibtop_proc_io */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void glibtop_get_sysdeps (glibtop_sysdeps *buf);
|
void glibtop_get_sysdeps (glibtop_sysdeps *buf);
|
||||||
|
@@ -44,7 +44,6 @@
|
|||||||
#include <glibtop/procopenfiles.h>
|
#include <glibtop/procopenfiles.h>
|
||||||
#include <glibtop/procwd.h>
|
#include <glibtop/procwd.h>
|
||||||
#include <glibtop/procaffinity.h>
|
#include <glibtop/procaffinity.h>
|
||||||
#include <glibtop/procio.h>
|
|
||||||
|
|
||||||
#include <glibtop/mountlist.h>
|
#include <glibtop/mountlist.h>
|
||||||
#include <glibtop/fsusage.h>
|
#include <glibtop/fsusage.h>
|
||||||
@@ -85,7 +84,6 @@ union _glibtop_union
|
|||||||
glibtop_proc_open_files proc_open_files;
|
glibtop_proc_open_files proc_open_files;
|
||||||
glibtop_proc_wd proc_wd;
|
glibtop_proc_wd proc_wd;
|
||||||
glibtop_proc_affinity proc_affinity;
|
glibtop_proc_affinity proc_affinity;
|
||||||
glibtop_proc_io proc_io;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@@ -35,7 +35,7 @@ introspection_sources = $(libgtop_2_0_la_SOURCES) lib.c ../glibtop.h ../libgtopc
|
|||||||
../include/glibtop/procsignal.h ../include/glibtop/union.h ../include/glibtop/gnuserv.h \
|
../include/glibtop/procsignal.h ../include/glibtop/union.h ../include/glibtop/gnuserv.h \
|
||||||
../include/glibtop/parameter.h ../include/glibtop/mountlist.h ../include/glibtop/fsusage.h ../include/glibtop/procmap.h ../include/glibtop/signal.h \
|
../include/glibtop/parameter.h ../include/glibtop/mountlist.h ../include/glibtop/fsusage.h ../include/glibtop/procmap.h ../include/glibtop/signal.h \
|
||||||
../include/glibtop/sysinfo.h ../include/glibtop/ppp.h ../include/glibtop/procargs.h ../include/glibtop/netload.h \
|
../include/glibtop/sysinfo.h ../include/glibtop/ppp.h ../include/glibtop/procargs.h ../include/glibtop/netload.h \
|
||||||
../include/glibtop/procwd.h ../include/glibtop/procaffinity.h ../include/glibtop/procio.h \
|
../include/glibtop/procwd.h ../include/glibtop/procaffinity.h \
|
||||||
../include/glibtop/netlist.h ../include/glibtop/procopenfiles.h ../include/glibtop/open.h
|
../include/glibtop/netlist.h ../include/glibtop/procopenfiles.h ../include/glibtop/open.h
|
||||||
|
|
||||||
GTop-2.0.gir: libgtop-2.0.la
|
GTop-2.0.gir: libgtop-2.0.la
|
||||||
|
@@ -68,7 +68,6 @@ glibtop_call_l (glibtop *server, unsigned command, size_t send_size,
|
|||||||
CHECK_CMND(GLIBTOP_CMND_PROC_OPEN_FILES);
|
CHECK_CMND(GLIBTOP_CMND_PROC_OPEN_FILES);
|
||||||
CHECK_CMND(GLIBTOP_CMND_PROC_WD);
|
CHECK_CMND(GLIBTOP_CMND_PROC_WD);
|
||||||
CHECK_CMND(GLIBTOP_CMND_PROC_AFFINITY);
|
CHECK_CMND(GLIBTOP_CMND_PROC_AFFINITY);
|
||||||
CHECK_CMND(GLIBTOP_CMND_PROC_IO);
|
|
||||||
default:
|
default:
|
||||||
glibtop_error_r(server, "CALL: command UNKNOWN(%d) sending %lu bytes", command, (unsigned long)send_size); break;
|
glibtop_error_r(server, "CALL: command UNKNOWN(%d) sending %lu bytes", command, (unsigned long)send_size); break;
|
||||||
}
|
}
|
||||||
|
@@ -52,8 +52,6 @@ glibtop_get_shm_limits
|
|||||||
glibtop_get_shm_limits_l
|
glibtop_get_shm_limits_l
|
||||||
glibtop_get_proc_affinity
|
glibtop_get_proc_affinity
|
||||||
glibtop_get_proc_affinity_l
|
glibtop_get_proc_affinity_l
|
||||||
glibtop_get_proc_io
|
|
||||||
glibtop_get_proc_io_l
|
|
||||||
glibtop_get_swap
|
glibtop_get_swap
|
||||||
glibtop_get_swap_l
|
glibtop_get_swap_l
|
||||||
glibtop_get_sysdeps
|
glibtop_get_sysdeps
|
||||||
|
@@ -48,8 +48,7 @@ GLIBTOP_SUID_NETLOAD +
|
|||||||
GLIBTOP_SUID_NETLIST +
|
GLIBTOP_SUID_NETLIST +
|
||||||
GLIBTOP_SUID_PROC_WD +
|
GLIBTOP_SUID_PROC_WD +
|
||||||
GLIBTOP_SUID_PROC_AFFINITY +
|
GLIBTOP_SUID_PROC_AFFINITY +
|
||||||
GLIBTOP_SUID_PPP +
|
GLIBTOP_SUID_PPP;
|
||||||
GLIBTOP_SUID_PROC_IO;
|
|
||||||
|
|
||||||
const _glibtop_init_func_t _glibtop_init_hook_s [] = {
|
const _glibtop_init_func_t _glibtop_init_hook_s [] = {
|
||||||
#if !GLIBTOP_SUID_CPU
|
#if !GLIBTOP_SUID_CPU
|
||||||
@@ -120,9 +119,6 @@ const _glibtop_init_func_t _glibtop_init_hook_s [] = {
|
|||||||
#endif
|
#endif
|
||||||
#if !GLIBTOP_SUID_PPP
|
#if !GLIBTOP_SUID_PPP
|
||||||
_glibtop_init_ppp_s,
|
_glibtop_init_ppp_s,
|
||||||
#endif
|
|
||||||
#if !GLIBTOP_SUID_PROC_IO
|
|
||||||
_glibtop_init_proc_io_s,
|
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@@ -196,9 +192,6 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = {
|
|||||||
#endif
|
#endif
|
||||||
#if GLIBTOP_SUID_PPP
|
#if GLIBTOP_SUID_PPP
|
||||||
_glibtop_init_ppp_p,
|
_glibtop_init_ppp_p,
|
||||||
#endif
|
|
||||||
#if GLIBTOP_SUID_PROC_IO
|
|
||||||
_glibtop_init_proc_io_p,
|
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
160
po/hr.po
160
po/hr.po
@@ -4,191 +4,193 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libgtop 0\n"
|
"Project-Id-Version: libgtop 0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
|
||||||
"POT-Creation-Date: 2016-04-26 22:07+0000\n"
|
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||||
"PO-Revision-Date: 2009-06-30 04:01+0000\n"
|
"POT-Creation-Date: 2017-04-07 11:26+0000\n"
|
||||||
"Last-Translator: Ante Karamatić <ante.karamatic@canonical.com>\n"
|
"PO-Revision-Date: 2017-04-11 19:07+0200\n"
|
||||||
|
"Last-Translator: gogo <trebelnik2@gmail.com>\n"
|
||||||
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
|
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
|
||||||
|
"Language: hr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||||
"X-Launchpad-Export-Date: 2016-09-15 11:39+0000\n"
|
"X-Launchpad-Export-Date: 2016-09-15 11:39+0000\n"
|
||||||
"X-Generator: Launchpad (build 18186)\n"
|
"X-Generator: Poedit 1.8.7.1\n"
|
||||||
"Language: hr\n"
|
|
||||||
|
|
||||||
#: ../lib/read.c:49
|
#: lib/read.c:49
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read %d byte"
|
msgid "read %d byte"
|
||||||
msgid_plural "read %d bytes"
|
msgid_plural "read %d bytes"
|
||||||
msgstr[0] "čitaj %d byte"
|
msgstr[0] "čitaj %d bajt"
|
||||||
msgstr[1] "čitaj %d bytea"
|
msgstr[1] "čitaj %d bajta"
|
||||||
msgstr[2] "čitaj %d byteova"
|
msgstr[2] "čitaj %d bajtova"
|
||||||
|
|
||||||
#: ../lib/read_data.c:49
|
#: lib/read_data.c:49
|
||||||
msgid "read data size"
|
msgid "read data size"
|
||||||
msgstr "veličina pročitanih podataka"
|
msgstr "veličina podataka čitanja"
|
||||||
|
|
||||||
#: ../lib/read_data.c:66
|
#: lib/read_data.c:66
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read %lu byte of data"
|
msgid "read %lu byte of data"
|
||||||
msgid_plural "read %lu bytes of data"
|
msgid_plural "read %lu bytes of data"
|
||||||
msgstr[0] "čitaj %lu byte podataka"
|
msgstr[0] "čitaj %lu bajt podataka"
|
||||||
msgstr[1] "čitaj %lu bytea podataka"
|
msgstr[1] "čitaj %lu bajta podataka"
|
||||||
msgstr[2] "čitaj %lu byteova podataka"
|
msgstr[2] "čitaj %lu bajta podataka"
|
||||||
|
|
||||||
#: ../lib/write.c:49
|
#: lib/write.c:49
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "wrote %d byte"
|
msgid "wrote %d byte"
|
||||||
msgid_plural "wrote %d bytes"
|
msgid_plural "wrote %d bytes"
|
||||||
msgstr[0] "zapisao %d byte"
|
msgstr[0] "zapisan %d bajt"
|
||||||
msgstr[1] "zapisao %d bytea"
|
msgstr[1] "zapisano %d bajta"
|
||||||
msgstr[2] "zapisao %d byteova"
|
msgstr[2] "zapisano %d bajtova"
|
||||||
|
|
||||||
#: ../src/daemon/gnuserv.c:456
|
#: src/daemon/gnuserv.c:456
|
||||||
msgid "Enable debugging"
|
msgid "Enable debugging"
|
||||||
msgstr "Omogućavanje debugiranja"
|
msgstr "Omogući otklanjanje grešaka"
|
||||||
|
|
||||||
#: ../src/daemon/gnuserv.c:458
|
#: src/daemon/gnuserv.c:458
|
||||||
msgid "Enable verbose output"
|
msgid "Enable verbose output"
|
||||||
msgstr "Omogući opširni izlaz"
|
msgstr "Omogući opširniji ispis"
|
||||||
|
|
||||||
#: ../src/daemon/gnuserv.c:460
|
#: src/daemon/gnuserv.c:460
|
||||||
msgid "Don't fork into background"
|
msgid "Don't fork into background"
|
||||||
msgstr "Bez forkanja u pozadini"
|
msgstr "Bez grananja u pozadini"
|
||||||
|
|
||||||
#: ../src/daemon/gnuserv.c:462
|
#: src/daemon/gnuserv.c:462
|
||||||
msgid "Invoked from inetd"
|
msgid "Invoked from inetd"
|
||||||
msgstr "Pozvano iz inetda"
|
msgstr "Pozvano iz inetda"
|
||||||
|
|
||||||
#: ../src/daemon/gnuserv.c:498
|
#: src/daemon/gnuserv.c:498
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Run '%s --help' to see a full list of available command line options.\n"
|
"Run '%s --help' to see a full list of available command line options.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pokrenite naredbu '%s --help' kako biste vidjeli popis dostupnih opcija.\n"
|
"Pokrenite '%s --help' kako bi vidjeli potpun popis mogućnosti "
|
||||||
|
"naredbenog redka.\n"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
#: sysdeps/osf1/siglist.c:27 sysdeps/sun4/siglist.c:27
|
||||||
msgid "Hangup"
|
msgid "Hangup"
|
||||||
msgstr "Prekidanje veze"
|
msgstr "Prekini vezu"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
|
||||||
msgid "Interrupt"
|
msgid "Interrupt"
|
||||||
msgstr "Prekid"
|
msgstr "Prekid"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
|
||||||
msgid "Quit"
|
msgid "Quit"
|
||||||
msgstr "Izlaz"
|
msgstr "Zatvori"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
|
||||||
msgid "Illegal instruction"
|
msgid "Illegal instruction"
|
||||||
msgstr "Nedopuštena instrukcija"
|
msgstr "Nedopuštena instrukcija"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
|
||||||
msgid "Trace trap"
|
msgid "Trace trap"
|
||||||
msgstr "Prati trap"
|
msgstr "Prati trap"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
|
||||||
msgid "Abort"
|
msgid "Abort"
|
||||||
msgstr "Odustani"
|
msgstr "Prekini"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
|
||||||
msgid "EMT error"
|
msgid "EMT error"
|
||||||
msgstr "EMT greška"
|
msgstr "EMT greška"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
|
||||||
msgid "Floating-point exception"
|
msgid "Floating-point exception"
|
||||||
msgstr "Iznimka pomičnog zareza"
|
msgstr "Iznimka pomičnog zareza"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
|
||||||
msgid "Kill"
|
msgid "Kill"
|
||||||
msgstr "Ubij"
|
msgstr "Ubij"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
|
||||||
msgid "Bus error"
|
msgid "Bus error"
|
||||||
msgstr "Sabirnička greška"
|
msgstr "Greška sabirnice"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
|
||||||
msgid "Segmentation violation"
|
msgid "Segmentation violation"
|
||||||
msgstr "Povreda segmenta"
|
msgstr "Segmentacijska povreda"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
|
||||||
msgid "Bad argument to system call"
|
msgid "Bad argument to system call"
|
||||||
msgstr "Neispravan argument za sistemski poziv"
|
msgstr "Neispravan argument za poziv sustava"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
|
||||||
msgid "Broken pipe"
|
msgid "Broken pipe"
|
||||||
msgstr "Prekinut kanal"
|
msgstr "Prekinut slivnik"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
|
||||||
msgid "Alarm clock"
|
msgid "Alarm clock"
|
||||||
msgstr "Budilica"
|
msgstr "Sat alarma"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
|
||||||
msgid "Termination"
|
msgid "Termination"
|
||||||
msgstr "Završetak"
|
msgstr "Prekidanje"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
|
||||||
msgid "Urgent condition on socket"
|
msgid "Urgent condition on socket"
|
||||||
msgstr "Hitno stanje na socketu"
|
msgstr "Hitno stanje na priključnici"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
|
||||||
msgid "Stop"
|
msgid "Stop"
|
||||||
msgstr "Zaustavi"
|
msgstr "Zaustavi"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
|
||||||
msgid "Keyboard stop"
|
msgid "Keyboard stop"
|
||||||
msgstr "Zaustavljanje tipkovnice"
|
msgstr "Zaustavljanje tipkovnice"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
|
||||||
msgid "Continue"
|
msgid "Continue"
|
||||||
msgstr "Nastavi"
|
msgstr "Nastavi"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
|
||||||
msgid "Child status has changed"
|
msgid "Child status has changed"
|
||||||
msgstr "Status djeteta je promijenjen"
|
msgstr "Nadređeno stanje je promijenjeno"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
|
||||||
msgid "Background read from tty"
|
msgid "Background read from tty"
|
||||||
msgstr "Pozadinsko čitanje iz tty-a"
|
msgstr "Pozadinsko čitanje iz tty-a"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
|
||||||
msgid "Background write to tty"
|
msgid "Background write to tty"
|
||||||
msgstr "Pozadinsko pisanje na tty"
|
msgstr "Pozadinsko zapisivanje na tty"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
|
||||||
msgid "I/O now possible"
|
msgid "I/O now possible"
|
||||||
msgstr "U/I je sada moguć"
|
msgstr "U/I je sada moguć"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
|
||||||
msgid "CPU limit exceeded"
|
msgid "CPU limit exceeded"
|
||||||
msgstr "CPU granica iskorištena"
|
msgstr "CPU ograničenje iskorišteno"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
|
||||||
msgid "File size limit exceeded"
|
msgid "File size limit exceeded"
|
||||||
msgstr "Prekoračeno ograničenje veličine spisa"
|
msgstr "Ograničenje veličine datoteke prekoračeno"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
|
||||||
msgid "Virtual alarm clock"
|
msgid "Virtual alarm clock"
|
||||||
msgstr "Virtualni alarmni sat"
|
msgstr "Virtualni sat alarma"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
|
||||||
msgid "Profiling alarm clock"
|
msgid "Profiling alarm clock"
|
||||||
msgstr "Profiliranje sata alarma"
|
msgstr "Profiliranje sata alarma"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
|
||||||
msgid "Window size change"
|
msgid "Window size change"
|
||||||
msgstr "Promjena veličine prozora"
|
msgstr "Promjena veličine prozora"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
|
||||||
msgid "Information request"
|
msgid "Information request"
|
||||||
msgstr "Zahtjev za informacijom"
|
msgstr "Zahtjev za informacijom"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
|
||||||
msgid "User defined signal 1"
|
msgid "User defined signal 1"
|
||||||
msgstr "Korisnički definiran signal 1"
|
msgstr "Korisnički određen signal 1"
|
||||||
|
|
||||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
|
||||||
msgid "User defined signal 2"
|
msgid "User defined signal 2"
|
||||||
msgstr "Korisnički definiran signal 2"
|
msgstr "Korisnički određen signal 2"
|
||||||
|
@@ -221,12 +221,6 @@ handle_parent_connection (int s)
|
|||||||
do_output (s, resp, _offset_data (fsusage),
|
do_output (s, resp, _offset_data (fsusage),
|
||||||
0, NULL);
|
0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_IO:
|
|
||||||
glibtop_get_proc_io_l
|
|
||||||
(server, &resp->u.data.proc_io, parameter);
|
|
||||||
do_output (s, resp, _offset_data (proc_io),
|
|
||||||
0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PPP:
|
case GLIBTOP_CMND_PPP:
|
||||||
memcpy (&device, parameter, sizeof (device));
|
memcpy (&device, parameter, sizeof (device));
|
||||||
glibtop_get_ppp_l
|
glibtop_get_ppp_l
|
||||||
|
@@ -209,14 +209,6 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
|||||||
resp->offset = _offset_data (proc_time);
|
resp->offset = _offset_data (proc_time);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if GLIBTOP_SUID_PROC_IO
|
|
||||||
case GLIBTOP_CMND_PROC_IO:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_io_p
|
|
||||||
(server, &resp->u.data.proc_io, pid);
|
|
||||||
resp->offset = _offset_data (proc_time);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
#if GLIBTOP_SUID_PROC_SIGNAL
|
||||||
case GLIBTOP_CMND_PROC_SIGNAL:
|
case GLIBTOP_CMND_PROC_SIGNAL:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
|
@@ -431,18 +431,3 @@ glibtop_get_proc_affinity(glibtop_proc_affinity *buf, pid_t pid)
|
|||||||
{
|
{
|
||||||
return glibtop_get_proc_affinity_l(glibtop_global_server, buf, pid);
|
return glibtop_get_proc_affinity_l(glibtop_global_server, buf, pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* glibtop_get_proc_io: Get the io stats for the given pid
|
|
||||||
* @buf: Buffer where the result will be given
|
|
||||||
* @pid: Process id to get the io stats for
|
|
||||||
*
|
|
||||||
* Get the io stats for a process
|
|
||||||
*
|
|
||||||
* Returns: A list of processor ID of 'buf.number' elements.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
glibtop_get_proc_io(glibtop_proc_io *buf, pid_t pid)
|
|
||||||
{
|
|
||||||
return glibtop_get_proc_io_l(glibtop_global_server, buf, pid);
|
|
||||||
}
|
|
||||||
|
@@ -46,7 +46,7 @@ print_message (const glibtop *server, int message_level, const char *format, int
|
|||||||
|
|
||||||
g_string_printf(message, "%s", (server && server->name ? server->name : DEFAULT_NAME));
|
g_string_printf(message, "%s", (server && server->name ? server->name : DEFAULT_NAME));
|
||||||
|
|
||||||
if (server->pid) {
|
if (server && server->pid) {
|
||||||
g_string_append_printf(message, "(c=%u/s=%u)", getpid(), server->pid);
|
g_string_append_printf(message, "(c=%u/s=%u)", getpid(), server->pid);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -89,9 +89,6 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = {
|
|||||||
#endif
|
#endif
|
||||||
#if GLIBTOP_SUID_PPP
|
#if GLIBTOP_SUID_PPP
|
||||||
_glibtop_init_ppp_p,
|
_glibtop_init_ppp_p,
|
||||||
#endif
|
|
||||||
#if GLIBTOP_SUID_PROC_IO
|
|
||||||
_glibtop_init_proc_io_p,
|
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@@ -16,7 +16,6 @@ libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
|
|||||||
proclist.c procstate.c procuid.c \
|
proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c \
|
proctime.c procmem.c procsignal.c \
|
||||||
prockernel.c procsegment.c procargs.c \
|
prockernel.c procsegment.c procargs.c \
|
||||||
procio.c \
|
|
||||||
procmap.c netload.c ppp.c
|
procmap.c netload.c ppp.c
|
||||||
|
|
||||||
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
@@ -47,7 +47,6 @@ G_BEGIN_DECLS
|
|||||||
#define GLIBTOP_SUID_NETLIST 0
|
#define GLIBTOP_SUID_NETLIST 0
|
||||||
#define GLIBTOP_SUID_PROC_WD 0
|
#define GLIBTOP_SUID_PROC_WD 0
|
||||||
#define GLIBTOP_SUID_PROC_AFFINITY 0
|
#define GLIBTOP_SUID_PROC_AFFINITY 0
|
||||||
#define GLIBTOP_SUID_PROC_IO (1 << GLIBTOP_SYSDEPS_PROC_IO)
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -1,80 +0,0 @@
|
|||||||
/* Copyright (C) 2017 Robert Roth
|
|
||||||
This file is part of LibGTop.
|
|
||||||
|
|
||||||
Contributed by Robert Roth <robert.roth.off@gmail.com>, February 2017.
|
|
||||||
|
|
||||||
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/procio.h>
|
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop_suid.h>
|
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_proc_io =
|
|
||||||
(1UL << GLIBTOP_PROC_IO_DISK_RBYTES) + (1UL << GLIBTOP_PROC_IO_DISK_WBYTES);
|
|
||||||
|
|
||||||
/* Init function. */
|
|
||||||
|
|
||||||
void
|
|
||||||
_glibtop_init_proc_io_p (glibtop *server)
|
|
||||||
{
|
|
||||||
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_get_proc_io_p (glibtop *server, glibtop_proc_io *buf,
|
|
||||||
pid_t pid)
|
|
||||||
{
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_io));
|
|
||||||
|
|
||||||
struct kinfo_proc *pinfo;
|
|
||||||
int count;
|
|
||||||
|
|
||||||
glibtop_suid_enter (server);
|
|
||||||
|
|
||||||
/* Get the process information */
|
|
||||||
pinfo = kvm_getprocs (server->machine->kd, KERN_PROC_PID, pid, &count);
|
|
||||||
if ((pinfo == NULL) || (count != 1)) {
|
|
||||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
|
||||||
glibtop_suid_leave (server);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
glibtop_suid_leave (server);
|
|
||||||
|
|
||||||
/* man getrusage
|
|
||||||
|
|
||||||
long ru_inblock; == block input operations
|
|
||||||
long ru_oublock; == block output operations
|
|
||||||
|
|
||||||
ru_inblock the number of times the file system had to perform input.
|
|
||||||
ru_oublock the number of times the file system had to perform output.
|
|
||||||
|
|
||||||
And then it says 'account only for real IO'.
|
|
||||||
|
|
||||||
But if I write 1MB in a process, I can see ru_oublock increased
|
|
||||||
1024. So it's neither a number of operations or times.
|
|
||||||
|
|
||||||
FIXME: seems the blocksize is 1024 but ...
|
|
||||||
*/
|
|
||||||
buf->disk_rbytes = pinfo->ki_rusage.ru_inblock << 10;
|
|
||||||
buf->disk_wbytes = pinfo->ki_rusage.ru_oublock << 10;
|
|
||||||
buf->flags = _glibtop_sysdeps_proc_io;
|
|
||||||
}
|
|
@@ -10,7 +10,7 @@ libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
|
|||||||
proctime.c procmem.c procsignal.c prockernel.c \
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
procsegment.c procargs.c procmap.c siglist.c \
|
procsegment.c procargs.c procmap.c siglist.c \
|
||||||
sysinfo.c netload.c ppp.c glibtop_private.c \
|
sysinfo.c netload.c ppp.c glibtop_private.c \
|
||||||
mountlist.c procaffinity.c procio.c \
|
mountlist.c procaffinity.c \
|
||||||
fsusage.c netlist.c procopenfiles.c procwd.c
|
fsusage.c netlist.c procopenfiles.c procwd.c
|
||||||
|
|
||||||
libgtop_sysdeps_2_0_la_LIBADD = @GLIB_LIBS@
|
libgtop_sysdeps_2_0_la_LIBADD = @GLIB_LIBS@
|
||||||
|
@@ -46,6 +46,5 @@
|
|||||||
#define GLIBTOP_SUID_PROC_AFFINITY 0
|
#define GLIBTOP_SUID_PROC_AFFINITY 0
|
||||||
#define GLIBTOP_SUID_PPP 0
|
#define GLIBTOP_SUID_PPP 0
|
||||||
#define GLIBTOP_SUID_PROC_FILE 0
|
#define GLIBTOP_SUID_PROC_FILE 0
|
||||||
#define GLIBTOP_SUID_PROC_IO 0
|
|
||||||
|
|
||||||
#endif /* __LINUX__GLIBTOP_SERVER_H__ */
|
#endif /* __LINUX__GLIBTOP_SERVER_H__ */
|
||||||
|
@@ -1,70 +0,0 @@
|
|||||||
/* Copyright (C) 2017 Robert Roth
|
|
||||||
This file is part of LibGTop.
|
|
||||||
|
|
||||||
Contributed by Robert Roth <robert.roth.off@gmail.com>, February 2017.
|
|
||||||
|
|
||||||
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/procio.h>
|
|
||||||
|
|
||||||
#include "glibtop_private.h"
|
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_proc_io =
|
|
||||||
(1L << GLIBTOP_PROC_IO_DISK_RCHAR) + (1L << GLIBTOP_PROC_IO_DISK_WCHAR) +
|
|
||||||
(1L << GLIBTOP_PROC_IO_DISK_RBYTES) + (1L << GLIBTOP_PROC_IO_DISK_WBYTES);
|
|
||||||
|
|
||||||
/* Init function. */
|
|
||||||
|
|
||||||
void
|
|
||||||
_glibtop_init_proc_io_s (glibtop *server)
|
|
||||||
{
|
|
||||||
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf, pid_t pid)
|
|
||||||
{
|
|
||||||
char buffer [BUFSIZ], *p;
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_io));
|
|
||||||
|
|
||||||
if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 20))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (proc_file_to_buffer(buffer, sizeof buffer, "/proc/%d/io", pid))
|
|
||||||
return;
|
|
||||||
|
|
||||||
p = skip_token (buffer);
|
|
||||||
buf->disk_rchar = g_ascii_strtoull (p, &p, 10);
|
|
||||||
p = skip_line (p);
|
|
||||||
p = skip_token (p);
|
|
||||||
buf->disk_wchar = g_ascii_strtoull (p, &p, 10);
|
|
||||||
p = skip_line (p);
|
|
||||||
p = skip_line (p);
|
|
||||||
p = skip_line (p);
|
|
||||||
p = skip_token (p);
|
|
||||||
buf->disk_rbytes = g_ascii_strtoull (p, &p, 10);
|
|
||||||
p = skip_line (p);
|
|
||||||
p = skip_token (p);
|
|
||||||
buf->disk_wbytes = g_ascii_strtoull (p, &p, 10);
|
|
||||||
|
|
||||||
buf->flags = _glibtop_sysdeps_proc_io;
|
|
||||||
}
|
|
@@ -1,43 +0,0 @@
|
|||||||
/* Copyright (C) 2017 Robert Roth
|
|
||||||
This file is part of LibGTop.
|
|
||||||
|
|
||||||
Contributed by Robert Roth <robert.roth.off@gmail.com>, February 2017.
|
|
||||||
|
|
||||||
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/procio.h>
|
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_proc_io = 0;
|
|
||||||
|
|
||||||
/* Init function. */
|
|
||||||
|
|
||||||
void
|
|
||||||
_glibtop_init_proc_io_s (glibtop *server)
|
|
||||||
{
|
|
||||||
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
|
|
||||||
pid_t pid)
|
|
||||||
{
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_io));
|
|
||||||
}
|
|
@@ -45,7 +45,6 @@ G_BEGIN_DECLS
|
|||||||
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
||||||
#define GLIBTOP_SUID_NETLIST 0
|
#define GLIBTOP_SUID_NETLIST 0
|
||||||
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
||||||
#define GLIBTOP_SUID_PROC_IO (1 << GLIBTOP_SYSDEPS_PROC_IO)
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user