Apply patch by the_h1ghlander@yahoo.com and Cory Omand
2003-10-20 Bastien Nocera <hadess@hadess.net> * include/glibtop/cpu.h: * include/glibtop/procstate.h: * include/glibtop/procuid.h: * include/glibtop/uptime.h: * lib/sysdeps.c: * sysdeps/names/cpu.c: * sysdeps/names/procstate.c: * sysdeps/names/procuid.c: * sysdeps/names/uptime.c: Apply patch by the_h1ghlander@yahoo.com and Cory Omand <cory.omand@Sun.com> for Solaris support
This commit is contained in:
committed by
Bastien Nocera
parent
a50e5fdc9a
commit
07d991f383
@@ -28,7 +28,7 @@ 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_idle", "xcpu_flags"
|
||||
};
|
||||
|
||||
const unsigned glibtop_types_cpu [GLIBTOP_MAX_CPU] =
|
||||
@@ -36,7 +36,7 @@ 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, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
|
||||
};
|
||||
|
||||
const char *glibtop_labels_cpu [GLIBTOP_MAX_CPU] =
|
||||
@@ -51,7 +51,8 @@ const char *glibtop_labels_cpu [GLIBTOP_MAX_CPU] =
|
||||
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 Time in the Idle Task"),
|
||||
N_("SMP CPU Flags")
|
||||
};
|
||||
|
||||
const char *glibtop_descriptions_cpu [GLIBTOP_MAX_CPU] =
|
||||
@@ -67,4 +68,5 @@ const char *glibtop_descriptions_cpu [GLIBTOP_MAX_CPU] =
|
||||
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_("Bit field indicating which CPU is currently running"),
|
||||
};
|
||||
|
@@ -27,18 +27,21 @@
|
||||
|
||||
const char *glibtop_names_proc_state [GLIBTOP_MAX_PROC_STATE] =
|
||||
{
|
||||
"cmd", "state", "uid", "gid"
|
||||
"cmd", "state", "uid", "gid", "ruid", "rgid",
|
||||
"has_cpu", "processor", "last_processor"
|
||||
};
|
||||
|
||||
const unsigned glibtop_types_proc_state [GLIBTOP_MAX_PROC_STATE] =
|
||||
{
|
||||
GLIBTOP_TYPE_STRING, GLIBTOP_TYPE_CHAR,
|
||||
GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT
|
||||
GLIBTOP_TYPE_STRING, GLIBTOP_TYPE_CHAR, 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_state [GLIBTOP_MAX_PROC_STATE] =
|
||||
{
|
||||
N_("Cmd"), N_("State"), N_("UID"), N_("GID")
|
||||
N_("Cmd"), N_("State"), N_("UID"), N_("GID"),
|
||||
N_("RGid"), N_("RUid"), N_("HasCPU"), N_("Proc"), N_("LProc")
|
||||
};
|
||||
|
||||
const char *glibtop_descriptions_proc_state [GLIBTOP_MAX_PROC_STATE] =
|
||||
@@ -46,5 +49,10 @@ 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_("UID of process"),
|
||||
N_("GID of process")
|
||||
N_("GID of process"),
|
||||
N_("Real UID of process"),
|
||||
N_("Real GID of process"),
|
||||
N_("Has CPU"),
|
||||
N_("Processor"),
|
||||
N_("Last Processor"),
|
||||
};
|
||||
|
@@ -25,27 +25,18 @@
|
||||
#include <glibtop/procuid.h>
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
|
||||
#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", "pid", "ppid", "pgrp",
|
||||
"session", "tty", "tpgid", "priority", "nice"
|
||||
"uid", "euid", "gid", "egid", "suid", "sgid",
|
||||
"fsuid", "fsgid", "pid", "ppid", "pgrp",
|
||||
"session", "tty", "tpgid", "priority", "nice",
|
||||
"ngroups", "groups"
|
||||
};
|
||||
|
||||
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,
|
||||
@@ -54,9 +45,10 @@ const unsigned glibtop_types_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_("Pid"),
|
||||
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_("TPGid"), N_("Priority"), N_("Nice"), N_("NGroups"), N_("Groups")
|
||||
};
|
||||
|
||||
const char *glibtop_descriptions_proc_uid [GLIBTOP_MAX_PROC_UID] =
|
||||
@@ -65,6 +57,10 @@ const char *glibtop_descriptions_proc_uid [GLIBTOP_MAX_PROC_UID] =
|
||||
N_("Effective User ID"),
|
||||
N_("Group ID"),
|
||||
N_("Effective Group ID"),
|
||||
N_("Set User ID"),
|
||||
N_("Set Group ID"),
|
||||
N_("Filesystem User ID"),
|
||||
N_("Filesystem Group ID"),
|
||||
N_("Process ID"),
|
||||
N_("PID of parent process"),
|
||||
N_("Process group ID"),
|
||||
@@ -72,5 +68,7 @@ const char *glibtop_descriptions_proc_uid [GLIBTOP_MAX_PROC_UID] =
|
||||
N_("Full device number of controlling terminal"),
|
||||
N_("Terminal process group ID"),
|
||||
N_("Kernel scheduling priority"),
|
||||
N_("Standard unix nice level of process")
|
||||
N_("Standard unix nice level of process"),
|
||||
N_("Number of additional process groups"),
|
||||
N_("Array of additional process groups")
|
||||
};
|
||||
|
@@ -26,22 +26,24 @@
|
||||
|
||||
const char *glibtop_names_uptime [GLIBTOP_MAX_UPTIME] =
|
||||
{
|
||||
"uptime", "idletime"
|
||||
"uptime", "idletime", "boot_time"
|
||||
};
|
||||
|
||||
const unsigned glibtop_types_uptime [GLIBTOP_MAX_UPTIME] =
|
||||
{
|
||||
GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_DOUBLE
|
||||
GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_ULONG
|
||||
};
|
||||
|
||||
const char *glibtop_labels_uptime [GLIBTOP_MAX_UPTIME] =
|
||||
{
|
||||
N_("Uptime"),
|
||||
N_("Idletime")
|
||||
N_("Idletime"),
|
||||
N_("BootTime")
|
||||
};
|
||||
|
||||
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_("Time in seconds the system spent in the idle task since system boot"),
|
||||
N_("Time of last system boot in seconds since the epoch"),
|
||||
};
|
||||
|
@@ -1,3 +1,9 @@
|
||||
2003-10-20 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* shm_limits.c: (glibtop_get_shm_limits_p): Apply patch by
|
||||
the_h1ghlander@yahoo.com and Cory Omand <cory.omand@Sun.com> for
|
||||
Solaris support
|
||||
|
||||
2003-10-20 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* mem.c: (glibtop_get_mem_s):
|
||||
|
@@ -60,9 +60,11 @@ glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
|
||||
if(kvm_read(kd, nlst[0].n_value, (void *)&sinfo,
|
||||
sizeof(struct shminfo)) != sizeof(struct shminfo))
|
||||
return;
|
||||
buf->shmmax = sinfo.shmmax;
|
||||
buf->shmmin = sinfo.shmmin;
|
||||
buf->shmmax = sinfo.shmmax;
|
||||
buf->shmmni = sinfo.shmmni;
|
||||
#if GLIBTOP_SOLARIS_RELEASE < 590
|
||||
buf->shmmin = sinfo.shmmin;
|
||||
buf->shmseg = sinfo.shmseg;
|
||||
#endif
|
||||
buf->flags = _glibtop_sysdeps_shm_limits;
|
||||
}
|
||||
|
Reference in New Issue
Block a user