Renamed procdiskio to procio
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#endif
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/procdiskio.h>
|
||||
#include <glibtop/procio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
static void show_diskio(pid_t pid)
|
||||
{
|
||||
glibtop_proc_diskio diskio;
|
||||
glibtop_proc_io io;
|
||||
|
||||
glibtop_get_proc_diskio (&diskio, pid);
|
||||
glibtop_get_proc_io (&io, pid);
|
||||
|
||||
printf("<%ld>\t", (long)pid);
|
||||
|
||||
printf("flags: %08lx rchar : %lu, wchar : %lu, read_bytes : %lu, write_bytes : %lu\n", (unsigned long)diskio.flags, diskio.rchar, diskio.wchar, diskio.rbytes, diskio.wbytes);
|
||||
printf("flags: %08lx rchar : %lu, wchar : %lu, read_bytes : %lu, write_bytes : %lu\n", (unsigned long)io.flags, io.rchar, io.wchar, io.rbytes, io.wbytes);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -95,7 +95,7 @@ main (int argc, char *argv [])
|
||||
"\tproc_segment:\t%d\t0x%08lx\n"
|
||||
"\tproc_args:\t%d\t0x%08lx\n"
|
||||
"\tproc_map:\t%d\t0x%08lx\n"
|
||||
"\tproc_diskio:\t%d\t0x%08lx\n\n"
|
||||
"\tproc_io:\t%d\t0x%08lx\n\n"
|
||||
"\tmountlist:\t%d\t0x%08lx\n"
|
||||
"\tfsusage:\t%d\t0x%08lx\n\n"
|
||||
"\tnetload:\t%d\t0x%08lx\n"
|
||||
@@ -138,8 +138,8 @@ main (int argc, char *argv [])
|
||||
(unsigned long) sysdeps.proc_args,
|
||||
FEATURE_CHECK(PROC_MAP),
|
||||
(unsigned long) sysdeps.proc_map,
|
||||
FEATURE_CHECK(PROC_DISKIO),
|
||||
(unsigned long) sysdeps.proc_diskio,
|
||||
FEATURE_CHECK(PROC_IO),
|
||||
(unsigned long) sysdeps.proc_io,
|
||||
FEATURE_CHECK(MOUNTLIST),
|
||||
(unsigned long) sysdeps.mountlist,
|
||||
FEATURE_CHECK(FSUSAGE),
|
||||
|
@@ -416,7 +416,7 @@ main (int argc, char *argv [])
|
||||
getrusage (RUSAGE_SELF, &rusage_start);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_diskio (&data.proc_diskio, pid);
|
||||
glibtop_get_proc_io (&data.proc_io, pid);
|
||||
|
||||
getrusage (RUSAGE_SELF, &rusage_end);
|
||||
|
||||
@@ -426,8 +426,8 @@ main (int argc, char *argv [])
|
||||
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
|
||||
&elapsed_stime);
|
||||
|
||||
printf ("Proc_DiskIo (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
|
||||
(unsigned long) data.proc_diskio.flags, PROFILE_COUNT,
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user