Compare commits
6 Commits
LIBGTOP_2_
...
LIBGTOP_2_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d2131a4b5 | ||
|
|
7d3059e732 | ||
|
|
d3add9e115 | ||
|
|
101fe5874f | ||
|
|
3afe2bf629 | ||
|
|
e296c3a37a |
18
ChangeLog
18
ChangeLog
@@ -1,3 +1,21 @@
|
||||
2006-01-02 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* NEWS:
|
||||
* configure.in:
|
||||
|
||||
Released 2.13.2.
|
||||
|
||||
2006-01-02 James Henstridge <james@jamesh.id.au>
|
||||
|
||||
* configure.in (LT_VERSION_INFO): add quotes around symbol definition.
|
||||
|
||||
2005-12-15 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* configure.in:
|
||||
* NEWS:
|
||||
|
||||
Released 2.13.1.
|
||||
|
||||
2005-12-13 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* NEWS:
|
||||
|
||||
10
NEWS
10
NEWS
@@ -1,3 +1,13 @@
|
||||
January 2, 2006: Overview of changes in 2.13.2
|
||||
==============================================
|
||||
* Fixed libtool versioning (James Henstridge)
|
||||
|
||||
December 15, 2005: Overview of changes in 2.13.1
|
||||
================================================
|
||||
* linux:
|
||||
- fixed proclist
|
||||
- implemented server->real_ncpu
|
||||
|
||||
December 13, 2005: Overview of changes in 2.13.0
|
||||
================================================
|
||||
* Requires automake-1.9 (James Henstridge)
|
||||
|
||||
@@ -4,7 +4,7 @@ dnl
|
||||
|
||||
m4_define([libgtop_major_version], [2])
|
||||
m4_define([libgtop_minor_version], [13])
|
||||
m4_define([libgtop_micro_version], [0])
|
||||
m4_define([libgtop_micro_version], [2])
|
||||
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
|
||||
|
||||
dnl increment if the interface has additions, changes, removals.
|
||||
@@ -44,7 +44,7 @@ AC_SUBST(LIBGTOP_VERSION_CODE, [libgtop_version_code])
|
||||
|
||||
# libtool versioning
|
||||
AC_SUBST(LT_VERSION_INFO,
|
||||
[-version-info libgtop_current:libgtop_revision:libgtop_age])
|
||||
["-version-info libgtop_current:libgtop_revision:libgtop_age"])
|
||||
|
||||
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I ."
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2005-12-15 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* proclist.c: (print_pids), (main):
|
||||
|
||||
Improved example.
|
||||
|
||||
2005-12-12 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* .cvsignore:
|
||||
|
||||
@@ -5,22 +5,37 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
static void print_pids(guint64 which, guint64 arg)
|
||||
{
|
||||
unsigned *pids;
|
||||
unsigned i;
|
||||
glibtop_proclist buf;
|
||||
|
||||
glibtop_init();
|
||||
pids = glibtop_get_proclist(&buf, which, arg);
|
||||
|
||||
pids = glibtop_get_proclist(&buf, 0, 0);
|
||||
printf("glibtop_get_proclist(%#llx, %llu) -> %lu processes\n",
|
||||
which, arg, (unsigned long)buf.number);
|
||||
|
||||
for (i = 0; i < buf.number; ++i)
|
||||
printf("%u ", pids[i]);
|
||||
|
||||
putchar('\n');
|
||||
putchar('\n');
|
||||
|
||||
g_free(pids);
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
glibtop_init();
|
||||
|
||||
print_pids(GLIBTOP_KERN_PROC_ALL, 0);
|
||||
print_pids(GLIBTOP_KERN_PROC_UID, getuid());
|
||||
|
||||
glibtop_close();
|
||||
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
2005-12-15 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* proclist.c: (glibtop_get_proclist_s):
|
||||
|
||||
Fixed when which == GLIBTOP_KERN_PROC_UID.
|
||||
Closes #324055.
|
||||
|
||||
2005-12-14 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* open.c: (glibtop_open_s):
|
||||
|
||||
Implemented server->real_ncpu.
|
||||
Add a warning to display ncpu and real_ncpu on open.
|
||||
|
||||
2005-12-13 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* cpu.c: (glibtop_get_cpu_s):
|
||||
|
||||
@@ -79,17 +79,21 @@ glibtop_open_s (glibtop *server, const char *program_name,
|
||||
|
||||
p = skip_line(p); /* cpu */
|
||||
|
||||
for (server->ncpu = 0; server->ncpu < GLIBTOP_NCPU; server->ncpu++) {
|
||||
for (server->real_ncpu = 0; /* nop */; server->real_ncpu++) {
|
||||
|
||||
if (!check_cpu_line(server, p, server->ncpu)) {
|
||||
server->ncpu--;
|
||||
if (!check_cpu_line(server, p, server->real_ncpu)) {
|
||||
server->real_ncpu--;
|
||||
break;
|
||||
}
|
||||
|
||||
p = skip_line(p);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf ("\nThis machine has %d CPUs.\n\n", server->ncpu);
|
||||
#endif
|
||||
server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
|
||||
|
||||
glibtop_warn_r(server,
|
||||
"This machine has %d CPUs, "
|
||||
"%d are being monitored.",
|
||||
server->real_ncpu + 1,
|
||||
server->ncpu + 1);
|
||||
}
|
||||
|
||||
@@ -98,8 +98,18 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
continue;
|
||||
break;
|
||||
case GLIBTOP_KERN_PROC_UID:
|
||||
if ((uid_t) arg != statb.st_uid)
|
||||
{
|
||||
char path[32];
|
||||
struct stat path_stat;
|
||||
|
||||
snprintf(path, sizeof path, "/proc/%u", pid);
|
||||
|
||||
if (stat(path, &path_stat))
|
||||
continue;
|
||||
|
||||
if ((uid_t) arg != path_stat.st_uid)
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case GLIBTOP_KERN_PROC_PGRP:
|
||||
/* Do you really, really need this ? */
|
||||
|
||||
Reference in New Issue
Block a user