Merge with changes from gkrellm-2.3.5-pre.tar.bz2
This commit is contained in:
parent
1cce0cd3c9
commit
d72d689c4c
10
COPYRIGHT
10
COPYRIGHT
|
@ -1,8 +1,10 @@
|
|||
The code in the GKrellM distribution is Copyright (C) 1999-2007 by Bill Wilson
|
||||
The code in the GKrellM distribution is Copyright (C) 1999-2010 by Bill Wilson
|
||||
except for:
|
||||
base64.c which is Copyright 1997 by Eric S. Raymond and is under the GPL.
|
||||
base64.c which is Copyright 1997 by Eric S. Raymond and is under the GPL,
|
||||
and
|
||||
md5.h, md5c.c which are public domain.
|
||||
md5.h, md5c.c which are public domain,
|
||||
and
|
||||
some system dependent files which port GKrellM to architectures other
|
||||
than Linux are Copyright their authors as indicated in the respective files.
|
||||
than Linux are Copyright their authors as indicated in the respective files,
|
||||
and
|
||||
any other file which has its own copyright posted.
|
||||
|
|
37
Changelog
37
Changelog
|
@ -1,5 +1,42 @@
|
|||
GKrellM Changelog
|
||||
-----------------
|
||||
2.3.5 - Not released
|
||||
------------------------
|
||||
* Patch from Stefan Gehn:
|
||||
- Clean up debug printing by using gkrellm_debug(), g_message(),
|
||||
g_debug(), g_warning().
|
||||
- Replace sprintf() calls with snprintf().
|
||||
- Use glib gstdio to replace unix calls: fopen()->g_fopen(), etc.
|
||||
- Use glib mutex functions for portability.
|
||||
- Fix IMAP login by escaping backslash and double-quotes in
|
||||
username, password and mailbox strings.
|
||||
- Fix initial sending of fstab entries in gkrellmd, fstab was only
|
||||
sent if it was marked as "changed"
|
||||
- Configure scripts handle pkg-config and compiler errors better.
|
||||
- src/Makefile: Rename SMC_LIBS to X11_lIBS and add -lX11
|
||||
- Makefile: Drop duplicating SMC_LIBS in "netbsd" targets by calling
|
||||
src/Makefile with "netbsd" target instead of using the generic
|
||||
"gkrellm" target.
|
||||
- Make "-d" commandline option the short version for "--detach"
|
||||
instead of for "--debug-level".
|
||||
- Enable IPv6-support on win32 if target os is windows xp or newer.
|
||||
- Support monitoring of active IPv6 TCP connections on windows vista
|
||||
or newer.
|
||||
- Fix building with mingw-w64 environment.
|
||||
* Patch from Stefan Gehn: add searching for linux sensors directly below
|
||||
hwmon dir since kernel is putting newer devices there.
|
||||
* Patch from Hajimu Umemoto: FreeBSD memory usage calculation update.
|
||||
* Translation updates
|
||||
o es.po from Cristian Othon Martinez Vera
|
||||
o de.po minor bug patch from Jan Brinkmann.
|
||||
o pt_BR.po update from Vinicius Moreira de Oliveira
|
||||
* Bugfixes
|
||||
o Fix eof check in fgets_pipe() (when using external mail check program).
|
||||
o Jindrich Makovicka patch: fix some aliasing violations due to
|
||||
sockaddr_* typecasting.
|
||||
o Ville Skytta patch: add explicit -lm linking to fix Fedora builds
|
||||
with --no-add-needed.
|
||||
|
||||
2.3.4 - Mon Jan 4, 2010
|
||||
------------------------
|
||||
* Add gkrellm_sys_setup_connect() function so sysdep code can register
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<h3>Changelog for GKrellM Plugins</h3>
|
||||
<hr size="4">
|
||||
|
||||
<h4>Changes for versions 2.3.1 - 2.3.4</h4>
|
||||
<h4>Changes for versions 2.3.1 - 2.3.5</h4>
|
||||
none
|
||||
|
||||
<h4>Changes for version 2.3.0</h4>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<pre>
|
||||
|
||||
Changes in 2.2.3 - 2.3.4
|
||||
Changes in 2.2.3 - 2.3.5
|
||||
------------------------
|
||||
None
|
||||
|
||||
|
|
7
INSTALL
7
INSTALL
|
@ -81,11 +81,14 @@ Note: install_solaris makes gkrellm setgid sys so it can be run non-root, ie:
|
|||
(see below for additional Solaris install notes)
|
||||
|
||||
|
||||
Windows 2000/XP (Vista is untested)
|
||||
-----------------------------
|
||||
Windows: 2000 SP4 / XP SP1 / Vista SP2
|
||||
---------------------------------------
|
||||
make windows
|
||||
make INSTALLROOT=C:\gkrellm install_windows
|
||||
|
||||
See:
|
||||
http://www.srcbox.net/projects/gkrellm/
|
||||
|
||||
Needed software for building gkrellm on win32 systems:
|
||||
- MinGW
|
||||
- MSYS (gkrellm Makefiles are NOT compatible with cmd.exe)
|
||||
|
|
2
Makefile
2
Makefile
|
@ -87,7 +87,7 @@ BINMODE = 755
|
|||
#GTOP_LIBS_D = -L$(GTOP_PREFIX)/lib -lgtop -lgtop_common -lgtop_sysdeps
|
||||
#export GTOP_INCLUDE GTOP_LIBS GTOP_LIBS_D
|
||||
|
||||
VERSION = 2.3.4
|
||||
VERSION = 2.3.5
|
||||
|
||||
INSTALLROOT ?= $(DESTDIR)$(PREFIX)
|
||||
|
||||
|
|
3
README
3
README
|
@ -5,10 +5,11 @@ Author: Bill Wilson
|
|||
Email: billw--at--gkrellm.net
|
||||
Homepage: http://gkrellm.net
|
||||
|
||||
Copyright (c) 1999-2009 by Bill Wilson. This program is free software
|
||||
Copyright (c) 1999-2010 by Bill Wilson. This program is free software
|
||||
which I release under the GNU General Public License.
|
||||
Read the COPYRIGHT file for more info.
|
||||
|
||||
CREDITS: See the CREDITS file.
|
||||
|
||||
Description
|
||||
===========
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH gkrellm 1 "Dec 21, 2009" "GNU/Linux" "User's Manual"
|
||||
.TH gkrellm 1 "Sep 15, 2010" "GNU/Linux" "User's Manual"
|
||||
|
||||
.SH "NAME"
|
||||
gkrellm \- The GNU Krell Monitors
|
||||
|
@ -1234,7 +1234,7 @@ System wide theme packaged as part of a system wide Gtk theme.
|
|||
|
||||
.SH "AUTHORS"
|
||||
|
||||
Bill Wilson <billw@gkrellm.net>.
|
||||
This manual page was written by Bill Wilson <billw@gkrellm.net>.
|
||||
http://www.gkrellm.net/
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%define name gkrellm
|
||||
%define version 2.3.4
|
||||
%define version 2.3.5
|
||||
%define release 1
|
||||
%define prefix /usr
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH gkrellmd 1 "Dec 21, 2009" "GNU/Linux" "User's Manual"
|
||||
.TH gkrellmd 1 "Sep 15, 2010" "GNU/Linux" "User's Manual"
|
||||
|
||||
.SH "NAME"
|
||||
gkrellmd \- The GNU Krell Monitors Server
|
||||
|
@ -434,5 +434,5 @@ Local server plugin directory.
|
|||
|
||||
.SH "AUTHOR"
|
||||
|
||||
Bill Wilson <billw@gkrellm.net>.
|
||||
This manual page was written by Bill Wilson <billw@gkrellm.net>.
|
||||
http://www.gkrellm.net/
|
||||
|
|
542
po/gkrellm.pot
542
po/gkrellm.pot
File diff suppressed because it is too large
Load Diff
575
po/pt_BR.po
575
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
|
@ -246,7 +246,7 @@ sysdeps-unix.o: sysdeps-unix.c ../src/gkrellm-sysdeps.h $(SYSDEPS) $(GKRELLMD_H)
|
|||
log.o: $(SHARED_PATH)/log.c $(SHARED_PATH)/log.h $(GKRELLMD_H)
|
||||
win32-gui.o: win32-gui.c
|
||||
win32-plugin.o: win32-plugin.c win32-plugin.h $(GKRELLMD_H)
|
||||
win32-resource.o: win32-resource.rc win32-resource.h
|
||||
win32-resource.o: win32-resource.rc win32-resource.h
|
||||
$(WINDRES) $< -o $@
|
||||
win32-libgkrellmd.o: win32-libgkrellmd.c win32-plugin.h $(GKRELLMD_H)
|
||||
libgkrellmd.a: win32-libgkrellmd.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -108,7 +108,7 @@
|
|||
*/
|
||||
#define GKRELLMD_VERSION_MAJOR 2
|
||||
#define GKRELLMD_VERSION_MINOR 3
|
||||
#define GKRELLMD_VERSION_REV 4
|
||||
#define GKRELLMD_VERSION_REV 5
|
||||
#define GKRELLMD_EXTRAVERSION ""
|
||||
|
||||
#define GKRELLMD_CHECK_VERSION(major,minor,rev) \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -340,7 +340,12 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
|
|||
{
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
struct addrinfo hints, *res;
|
||||
struct sockaddr_storage ss;
|
||||
union {
|
||||
struct sockaddr_storage ss;
|
||||
struct sockaddr_in sin;
|
||||
struct sockaddr_in6 sin6;
|
||||
struct sockaddr sa;
|
||||
} ss;
|
||||
char *buf;
|
||||
char *p, *ep;
|
||||
guchar *addr, *pat;
|
||||
|
@ -376,7 +381,7 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
|
|||
memcpy(&ss, res->ai_addr, res->ai_addrlen);
|
||||
freeaddrinfo(res);
|
||||
|
||||
if (sa->sa_family != ((struct sockaddr *)&ss)->sa_family)
|
||||
if (sa->sa_family != ss.sa.sa_family)
|
||||
return FALSE;
|
||||
switch (sa->sa_family)
|
||||
{
|
||||
|
@ -386,12 +391,12 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
|
|||
plen = 128;
|
||||
if (plen > 128)
|
||||
return FALSE;
|
||||
if (((struct sockaddr_in6 *)&ss)->sin6_scope_id != 0 &&
|
||||
((struct sockaddr_in6 *)&ss)->sin6_scope_id !=
|
||||
if (ss.sin6.sin6_scope_id != 0 &&
|
||||
ss.sin6.sin6_scope_id !=
|
||||
((struct sockaddr_in6 *)sa)->sin6_scope_id)
|
||||
return FALSE;
|
||||
addr = (guchar *)&((struct sockaddr_in6 *)sa)->sin6_addr;
|
||||
pat = (guchar *)&((struct sockaddr_in6 *)&ss)->sin6_addr;
|
||||
pat = (guchar *)&ss.sin6.sin6_addr;
|
||||
i = 0;
|
||||
while (plen > 0)
|
||||
{
|
||||
|
@ -417,7 +422,7 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
|
|||
if (plen > 32)
|
||||
return FALSE;
|
||||
addr = (guchar *)&((struct sockaddr_in *)sa)->sin_addr;
|
||||
pat = (guchar *)&((struct sockaddr_in *)&ss)->sin_addr;
|
||||
pat = (guchar *)&ss.sin.sin_addr;
|
||||
mask = htonl(~(0xffffffff >> plen));
|
||||
if ((*(uint32_t *)addr & mask) !=
|
||||
(*(uint32_t *)pat & mask))
|
||||
|
@ -1022,7 +1027,7 @@ socksetup(int af)
|
|||
#if defined(WIN32)
|
||||
closesocket(*s);
|
||||
#else
|
||||
close(*s);
|
||||
close(*s);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
@ -1127,11 +1132,15 @@ drop_privileges(void)
|
|||
static gint
|
||||
gkrellmd_run(gint argc, gchar **argv)
|
||||
{
|
||||
union {
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
struct sockaddr_storage client_addr;
|
||||
struct sockaddr_storage ss;
|
||||
#else
|
||||
struct sockaddr_in client_addr;
|
||||
struct sockaddr_in ss;
|
||||
#endif
|
||||
struct sockaddr_in sin;
|
||||
struct sockaddr sa;
|
||||
} client_addr;
|
||||
fd_set read_fds, test_fds;
|
||||
struct timeval tv;
|
||||
GkrellmdClient *client;
|
||||
|
@ -1218,7 +1227,7 @@ gkrellmd_run(gint argc, gchar **argv)
|
|||
#if defined(WIN32)
|
||||
closesocket(_GK.server_fd[i]);
|
||||
#else
|
||||
close(_GK.server_fd[i]);
|
||||
close(_GK.server_fd[i]);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
@ -1249,11 +1258,7 @@ gkrellmd_run(gint argc, gchar **argv)
|
|||
#endif
|
||||
{
|
||||
test_fds = read_fds;
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
addr_len = sizeof(struct sockaddr_storage);
|
||||
#else
|
||||
addr_len = sizeof(struct sockaddr_in);
|
||||
#endif
|
||||
addr_len = sizeof(client_addr.ss);
|
||||
tv.tv_usec = interval;
|
||||
tv.tv_sec = 0;
|
||||
|
||||
|
@ -1292,7 +1297,7 @@ gkrellmd_run(gint argc, gchar **argv)
|
|||
{
|
||||
gkrellm_debug(DEBUG_SERVER, "Calling accept() for new client connection\n");
|
||||
client_fd = accept(server_fd,
|
||||
(struct sockaddr *) &client_addr,
|
||||
&client_addr.sa,
|
||||
(socklen_t *) (void *)&addr_len);
|
||||
if (client_fd == -1)
|
||||
{
|
||||
|
@ -1304,13 +1309,13 @@ gkrellmd_run(gint argc, gchar **argv)
|
|||
if (client_fd > max_fd)
|
||||
max_fd = client_fd;
|
||||
client = accept_client(client_fd,
|
||||
(struct sockaddr *)&client_addr, addr_len);
|
||||
&client_addr.sa, addr_len);
|
||||
if (!client)
|
||||
{
|
||||
#if defined(WIN32)
|
||||
closesocket(client_fd);
|
||||
#else
|
||||
close(client_fd);
|
||||
close(client_fd);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
@ -1319,7 +1324,7 @@ gkrellmd_run(gint argc, gchar **argv)
|
|||
|
||||
g_message(_("Accepted client %s:%u\n"),
|
||||
client->hostname,
|
||||
ntohs(((struct sockaddr_in *)&client_addr)->sin_port));
|
||||
ntohs(client_addr.sin.sin_port));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1653,15 +1658,15 @@ int main(int argc, char* argv[])
|
|||
// Prepend app install path to locale dir
|
||||
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
if (install_path != NULL)
|
||||
{
|
||||
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
|
||||
if (locale_dir != NULL)
|
||||
{
|
||||
bindtextdomain(PACKAGE_D, locale_dir);
|
||||
g_free(locale_dir);
|
||||
}
|
||||
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
|
||||
if (locale_dir != NULL)
|
||||
{
|
||||
bindtextdomain(PACKAGE_D, locale_dir);
|
||||
g_free(locale_dir);
|
||||
}
|
||||
g_free(install_path);
|
||||
}
|
||||
}
|
||||
#else
|
||||
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
||||
#endif /* !WIN32 */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* GKrellM Windows Portion
|
||||
| Copyright (C) 2002 Bill Nalen
|
||||
| 2007-2009 Stefan Gehn
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Nalen bill@nalens.com
|
||||
| Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM Windows Portion
|
||||
| Copyright (C) 2006-2009 Stefan Gehn
|
||||
| Copyright (C) 2006-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| 2007-2009 Stefan Gehn
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Wilson billw@gkrellm.net
|
||||
| Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
| Author: Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
||||
|
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Author: Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
||||
|
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/* GKrellM
|
||||
* Copyright (C) 1999-2009 Bill Wilson
|
||||
*
|
||||
* @author Bill Wilson <billw@gkrellm.net>
|
||||
*
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
||||
|
|
||||
|
|
|
@ -21,6 +21,7 @@ MANDIRMODE ?= 755
|
|||
INSTALL ?= install
|
||||
LINK_FLAGS ?= -Wl,-E
|
||||
X11_LIBS ?= -L/usr/X11R6/lib -lX11 -lSM -lICE
|
||||
MATH_LIB ?= -lm
|
||||
|
||||
SHARED_PATH = ../shared
|
||||
# Make GNU Make search for sources somewhere else as well
|
||||
|
@ -58,7 +59,7 @@ include configure.mk
|
|||
|
||||
# Only use own md5-code if neither OpenSSL nor GnuTLS are present
|
||||
ifneq ($(HAVE_SSL),1)
|
||||
EXTRAOBJS ?= md5c.o
|
||||
EXTRAOBJS ?= md5c.o
|
||||
endif
|
||||
|
||||
CC ?= gcc
|
||||
|
@ -74,7 +75,7 @@ FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\
|
|||
${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT
|
||||
|
||||
LIBS = $(PKG_LIB) $(GTOP_LIBS) $(X11_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS)\
|
||||
$(NTLM_LIBS)
|
||||
$(NTLM_LIBS) $(MATH_LIB)
|
||||
|
||||
ifeq ($(debug),1)
|
||||
FLAGS += -g
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -1918,6 +1918,7 @@ gkrellm_client_mode_connect(void)
|
|||
(GdkInputFunction) read_server_input, NULL);
|
||||
|
||||
server_alive = TRUE;
|
||||
|
||||
return GOOD_CONNECT;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
2
src/fs.c
2
src/fs.c
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -108,7 +108,7 @@
|
|||
*/
|
||||
#define GKRELLM_VERSION_MAJOR 2
|
||||
#define GKRELLM_VERSION_MINOR 3
|
||||
#define GKRELLM_VERSION_REV 4
|
||||
#define GKRELLM_VERSION_REV 5
|
||||
#define GKRELLM_EXTRAVERSION ""
|
||||
|
||||
#define GKRELLM_CHECK_VERSION(major,minor,rev) \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -768,7 +768,7 @@ create_about_tab(GtkWidget *vbox)
|
|||
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
|
||||
|
||||
buf = g_strdup_printf(_("GKrellM %d.%d.%d%s\nGNU Krell Monitors\n\n"
|
||||
"Copyright (c) 1999-2009 by Bill Wilson\n"
|
||||
"Copyright (c) 1999-2010 by Bill Wilson\n"
|
||||
"billw@gkrellm.net\n"
|
||||
"http://gkrellm.net\n\n"
|
||||
"Released under the GNU General Public License"),
|
||||
|
@ -2195,7 +2195,7 @@ gkrellm_remove_plugin_config_page(GkrellmMonitor *mon)
|
|||
continue;
|
||||
tmon->privat->config_page -= 1;
|
||||
gkrellm_debug(DEBUG_GUI, "config_page %d: %s\n",
|
||||
tmon->privat->config_page, tmon->name);
|
||||
tmon->privat->config_page, tmon->name);
|
||||
}
|
||||
}
|
||||
mon->privat->config_page = -1;
|
||||
|
@ -2259,7 +2259,7 @@ cb_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
|
|||
|
||||
gtk_notebook_set_current_page(config_notebook, page);
|
||||
gkrellm_debug(DEBUG_GUI, "tree_selection_changed %d: %s\n",
|
||||
page, selected_monitor ? selected_monitor->name : "--");
|
||||
page, selected_monitor ? selected_monitor->name : "--");
|
||||
}
|
||||
|
||||
/* Monitors may want to present as instant apply monitors, but still need
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
31
src/inet.c
31
src/inet.c
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -650,9 +650,12 @@ get_connection_string_thread(void *data)
|
|||
GList *list;
|
||||
ActiveTCP *tcp;
|
||||
#if defined(INET6)
|
||||
struct sockaddr_storage ss;
|
||||
struct sockaddr_in *sin;
|
||||
struct sockaddr_in6 *sin6;
|
||||
union {
|
||||
struct sockaddr_storage ss;
|
||||
struct sockaddr_in sin;
|
||||
struct sockaddr_in6 sin6;
|
||||
struct sockaddr sa;
|
||||
} ss;
|
||||
gint salen, flag = 0;
|
||||
gchar hbuf[NI_MAXHOST];
|
||||
gchar buf[NI_MAXHOST + 10];
|
||||
|
@ -670,34 +673,32 @@ get_connection_string_thread(void *data)
|
|||
{
|
||||
tcp = (ActiveTCP *) list->data;
|
||||
#if defined(INET6)
|
||||
memset(&ss, 0, sizeof(ss));
|
||||
memset(&ss.ss, 0, sizeof(ss.ss));
|
||||
switch (tcp->family)
|
||||
{
|
||||
case AF_INET:
|
||||
sin = (struct sockaddr_in *)&ss;
|
||||
salen = sizeof(struct sockaddr_in);
|
||||
memcpy(&sin->sin_addr, &tcp->remote_addr, salen);
|
||||
memcpy(&ss.sin.sin_addr, &tcp->remote_addr, salen);
|
||||
#if defined(SIN6_LEN)
|
||||
sin->sin_len = salen;
|
||||
ss.sin.sin_len = salen;
|
||||
#endif
|
||||
sin->sin_family = tcp->family;
|
||||
ss.sin.sin_family = tcp->family;
|
||||
break;
|
||||
case AF_INET6:
|
||||
sin6 = (struct sockaddr_in6 *)&ss;
|
||||
salen = sizeof(struct sockaddr_in6);
|
||||
memcpy(&sin6->sin6_addr, &tcp->remote_addr6, salen);
|
||||
memcpy(&ss.sin6.sin6_addr, &tcp->remote_addr6, salen);
|
||||
#if defined(SIN6_LEN)
|
||||
sin6->sin6_len = salen;
|
||||
ss.sin6.sin6_len = salen;
|
||||
#endif
|
||||
sin6->sin6_family = tcp->family;
|
||||
ss.sin6.sin6_family = tcp->family;
|
||||
/* XXX: We should mention about
|
||||
| scope, too. */
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if (getnameinfo((struct sockaddr *)&ss, salen,
|
||||
hbuf, sizeof(hbuf), NULL, 0, flag))
|
||||
if (getnameinfo(&ss.sa, salen,
|
||||
hbuf, sizeof(hbuf), NULL, 0, flag))
|
||||
continue;
|
||||
remote_host = hbuf;
|
||||
#else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
12
src/mail.c
12
src/mail.c
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -1998,7 +1998,7 @@ fgets_pipe(gchar *line, gint len, Mailproc *mp)
|
|||
#endif
|
||||
if (n <= 0)
|
||||
{
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
if ((n == 0) || (errno != EINTR && errno != EAGAIN))
|
||||
{
|
||||
if (close(mp->pipe) < 0 && errno == EINTR)
|
||||
close(mp->pipe);
|
||||
|
@ -2312,8 +2312,8 @@ mail_check_thread(void *data)
|
|||
format_remote_mbox_name(mbox, buf, sizeof(buf));
|
||||
g_debug("Start mail_check_thread: %s at %d:%d:%d\n", buf,
|
||||
gkrellm_get_current_time()->tm_hour,
|
||||
gkrellm_get_current_time()->tm_min,
|
||||
gkrellm_get_current_time()->tm_sec);
|
||||
gkrellm_get_current_time()->tm_min,
|
||||
gkrellm_get_current_time()->tm_sec);
|
||||
}
|
||||
external = mbox->account->mboxtype & MBOX_EXTERNAL;
|
||||
if ( (*(mbox->check_func))(external ? mbox->data : mbox) == FALSE)
|
||||
|
@ -2327,8 +2327,8 @@ mail_check_thread(void *data)
|
|||
|
||||
gkrellm_debug(DEBUG_MAIL, "Stop mail_check_thread: %s at %d:%d:%d\n", buf,
|
||||
gkrellm_get_current_time()->tm_hour,
|
||||
gkrellm_get_current_time()->tm_min,
|
||||
gkrellm_get_current_time()->tm_sec);
|
||||
gkrellm_get_current_time()->tm_min,
|
||||
gkrellm_get_current_time()->tm_sec);
|
||||
|
||||
mbox->busy = FALSE;
|
||||
mbox->thread = NULL;
|
||||
|
|
16
src/main.c
16
src/main.c
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -2104,15 +2104,15 @@ main(gint argc, gchar **argv)
|
|||
// Prepend app install path to locale dir
|
||||
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
if (install_path != NULL)
|
||||
{
|
||||
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
|
||||
if (locale_dir != NULL)
|
||||
{
|
||||
bindtextdomain(PACKAGE, locale_dir);
|
||||
g_free(locale_dir);
|
||||
}
|
||||
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
|
||||
if (locale_dir != NULL)
|
||||
{
|
||||
bindtextdomain(PACKAGE, locale_dir);
|
||||
g_free(locale_dir);
|
||||
}
|
||||
g_free(install_path);
|
||||
}
|
||||
}
|
||||
#else
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
#endif /* !WIN32 */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -531,7 +531,7 @@ sensor_read_temperature(Sensor *sensor, gfloat *temp, gchar *units)
|
|||
}
|
||||
if (sensor)
|
||||
gkrellm_debug(DEBUG_SENSORS, "sensor_temp: %s %s t=%.2f\n",
|
||||
sensor->name_locale, sensor->path, sensor->value);
|
||||
sensor->name_locale, sensor->path, sensor->value);
|
||||
if (found_temp && sensor)
|
||||
gkrellm_check_alert(sensor->alert, sensor->value);
|
||||
return found_temp;
|
||||
|
@ -567,7 +567,7 @@ sensor_read_fan(Sensor *sensor, gfloat *fan)
|
|||
*fan = f;
|
||||
if (sensor)
|
||||
gkrellm_debug(DEBUG_SENSORS, "sensor_fan: %s %s rpm=%.0f\n",
|
||||
sensor->name_locale, sensor->path, sensor->value);
|
||||
sensor->name_locale, sensor->path, sensor->value);
|
||||
if (found_fan && sensor)
|
||||
gkrellm_check_alert(sensor->alert, sensor->value);
|
||||
return found_fan;
|
||||
|
@ -607,7 +607,7 @@ sensor_read_voltage(Sensor *sensor, gfloat *voltage)
|
|||
*voltage = v;
|
||||
if (sensor)
|
||||
gkrellm_debug(DEBUG_SENSORS, "sensor_voltage: %s %s v=%.2f\n",
|
||||
sensor->name_locale, sensor->path, sensor->value);
|
||||
sensor->name_locale, sensor->path, sensor->value);
|
||||
if (found_voltage && sensor)
|
||||
gkrellm_check_alert(sensor->alert, sensor->value);
|
||||
return found_voltage;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -1041,13 +1041,14 @@ gkrellm_sys_mem_read_data(void)
|
|||
static gint swappgsin = -1;
|
||||
static gint swappgsout = -1;
|
||||
gint dpagein, dpageout;
|
||||
guint64 total, used, x_used, free, shared, buffers = 0, cached;
|
||||
guint64 total, used, free, shared, buffers = 0, cached;
|
||||
struct vmtotal vmt;
|
||||
size_t length_vmt = sizeof(vmt);
|
||||
static int oid_vmt[] = { CTL_VM, VM_TOTAL };
|
||||
#if __FreeBSD_version >= 410000
|
||||
gint i;
|
||||
#else
|
||||
guint64 x_used;
|
||||
struct vmmeter sum;
|
||||
#endif
|
||||
|
||||
|
@ -1083,16 +1084,14 @@ gkrellm_sys_mem_read_data(void)
|
|||
if (sysctl(mibs[i].oid, mibs[i].oid_len, &mibs[i].value,
|
||||
&mibs[i].value_len, NULL, 0) < 0)
|
||||
return;
|
||||
total = (mibs[MIB_V_PAGE_COUNT].value -
|
||||
mibs[MIB_V_WIRE_COUNT].value) << pshift;
|
||||
x_used = (mibs[MIB_V_ACTIVE_COUNT].value +
|
||||
mibs[MIB_V_INACTIVE_COUNT].value) << pshift;
|
||||
free = mibs[MIB_V_FREE_COUNT].value << pshift;
|
||||
total = (guint64)(mibs[MIB_V_PAGE_COUNT].value) << pshift;
|
||||
free = (guint64)(mibs[MIB_V_INACTIVE_COUNT].value +
|
||||
mibs[MIB_V_FREE_COUNT].value) << pshift;
|
||||
if (sysctl(oid_vmt, 2, &vmt, &length_vmt, NULL, 0) == 0)
|
||||
shared = vmt.t_rmshr << pshift;
|
||||
shared = (guint64)vmt.t_rmshr << pshift;
|
||||
get_bufspace(&buffers);
|
||||
cached = mibs[MIB_V_CACHE_COUNT].value << pshift;
|
||||
used = x_used - buffers - cached;
|
||||
cached = (guint64)mibs[MIB_V_CACHE_COUNT].value << pshift;
|
||||
used = total - free;
|
||||
gkrellm_mem_assign_data(total, used, free, shared, buffers, cached);
|
||||
|
||||
if (swappgsin < 0)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -3040,10 +3040,11 @@ gkrellm_sys_sensors_get_temperature(gchar *sensor_path, gint id,
|
|||
#if GLIB_CHECK_VERSION(2,0,0)
|
||||
gchar *args[] = { "nvidia-settings", "-q", sensor_path, NULL };
|
||||
gchar *output = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
result = g_spawn_sync(NULL, args, NULL,
|
||||
G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL,
|
||||
NULL, NULL, &output, NULL, NULL, NULL);
|
||||
NULL, NULL, &output, NULL, NULL, &error);
|
||||
|
||||
if(result && output)
|
||||
{
|
||||
|
@ -3051,10 +3052,21 @@ gkrellm_sys_sensors_get_temperature(gchar *sensor_path, gint id,
|
|||
|
||||
if(!temp)
|
||||
temp = &dummy;
|
||||
result = (sscanf(output, " Attribute %*s %*s %f", temp) == 1);
|
||||
result = (sscanf((*output == '\n' ? output + 1 : output),
|
||||
" Attribute %*s %*s %f", temp) == 1);
|
||||
}
|
||||
|
||||
g_free(output);
|
||||
if ((_GK.debug_level & DEBUG_SENSORS) && (!result || !output))
|
||||
{
|
||||
printf("nvidia-settings %s: result=%d output=%s\n", sensor_path,
|
||||
(gint) result,
|
||||
output ? output : "(null)");
|
||||
if (error)
|
||||
printf("\terror=%s\n", error->message);
|
||||
}
|
||||
if (error)
|
||||
g_error_free(error);
|
||||
if (output)
|
||||
g_free(output);
|
||||
return result;
|
||||
#else
|
||||
return FALSE;
|
||||
|
@ -3403,7 +3415,18 @@ sysfs_sensors_init(void)
|
|||
if ((chip_name = sysfs_get_chip_name(path)) == NULL)
|
||||
{
|
||||
g_dir_close(chip_dir);
|
||||
continue;
|
||||
if (using_i2c_dir)
|
||||
continue;
|
||||
/* Newer hwmon drivers keep their files directly in the hwmon dir
|
||||
and not in the device-subdir. */
|
||||
snprintf(path, sizeof(path), "%s/%s", SYSFS_HWMON_DIR, bus_name);
|
||||
if ((chip_dir = g_dir_open(path, 0, NULL)) == NULL)
|
||||
continue;
|
||||
if ((chip_name = sysfs_get_chip_name(path)) == NULL)
|
||||
{
|
||||
g_dir_close(chip_dir);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
have_sysfs_sensors = TRUE;
|
||||
if (_GK.debug_level & DEBUG_SENSORS)
|
||||
|
@ -3495,15 +3518,33 @@ sensors_nvidia_settings_ngpus(void)
|
|||
#if GLIB_CHECK_VERSION(2,0,0)
|
||||
gchar *args[] = { "nvidia-settings", "-q", "gpus", NULL };
|
||||
gchar *output = NULL;
|
||||
gchar *errout = NULL;
|
||||
gboolean result;
|
||||
GError *error = NULL;
|
||||
|
||||
result = g_spawn_sync(NULL, args, NULL,
|
||||
G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL,
|
||||
NULL, NULL, &output, NULL, NULL, NULL);
|
||||
G_SPAWN_SEARCH_PATH,
|
||||
NULL, NULL, &output, &errout, NULL, &error);
|
||||
|
||||
if (_GK.debug_level & DEBUG_SENSORS)
|
||||
{
|
||||
printf("nvidia-settings: result=%d output=%s stderr=%s\n",
|
||||
(gint) result,
|
||||
output ? output : "(null)",
|
||||
errout ? errout : "(null)");
|
||||
if (error)
|
||||
printf("\terror=%s\n", error->message);
|
||||
}
|
||||
if(result && output)
|
||||
sscanf(output, "%d", &n);
|
||||
g_free(output);
|
||||
sscanf((*output == '\n' ? output + 1 : output), "%d", &n);
|
||||
|
||||
if (output)
|
||||
g_free(output);
|
||||
if (errout)
|
||||
g_free(errout);
|
||||
if (error)
|
||||
g_error_free(error);
|
||||
|
||||
#endif
|
||||
if (_GK.debug_level & DEBUG_SENSORS)
|
||||
g_debug("nvidia-settings gpus = %d\n", n);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
@ -32,6 +32,7 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
/* A system dependent interface can include this file to get sensors
|
||||
| from daemons that can run under different operating systems.
|
||||
*/
|
||||
|
@ -85,7 +86,7 @@ mbmon_decimal_point_check(gchar *buf)
|
|||
{
|
||||
mbmon_need_decimal_point_fix = TRUE;
|
||||
gkrellm_debug(DEBUG_SENSORS, "mbmon_need_decimal_point_fix: %c -> %c\n",
|
||||
mbmon_decimal_point, gkrellm_decimal_point);
|
||||
mbmon_decimal_point, gkrellm_decimal_point);
|
||||
}
|
||||
g_free(s);
|
||||
|
||||
|
@ -332,7 +333,7 @@ hddtemp_daemon_read(void)
|
|||
close(fd);
|
||||
|
||||
gkrellm_debug(DEBUG_SENSORS, "hddtemp_daemon_read (once a minute):\n\t%s\n",
|
||||
hddtemp_gstring->str);
|
||||
hddtemp_gstring->str);
|
||||
|
||||
sep = hddtemp_gstring->str[0];
|
||||
if (sep == '\0')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2007 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
| 2002 Bill Nalen
|
||||
| 2007-2009 Stefan Gehn
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Wilson billw@gkrellm.net
|
||||
| Bill Nalen bill@nalens.com
|
||||
|
@ -92,7 +92,7 @@ typedef struct _SYSTEM_PAGEFILE_INFORMATION
|
|||
* are present in the headers provided by mingw-w64.
|
||||
* Docs: http://msdn.microsoft.com/en-us/library/aa378290(VS.85).aspx
|
||||
*/
|
||||
#if !defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW32_MAJOR_VERSION)
|
||||
#if defined(__MINGW32__) && !defined(WIN64)
|
||||
typedef struct _SECURITY_LOGON_SESSION_DATA
|
||||
{
|
||||
ULONG Size;
|
||||
|
@ -1512,7 +1512,6 @@ gkrellm_sys_proc_read_data(void)
|
|||
num_forks /*n_forks*/, fload);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gkrellm_sys_proc_read_users(void)
|
||||
{
|
||||
|
@ -2260,7 +2259,7 @@ static void win32_read_tcp6_data(void)
|
|||
win32_warning(NULL, dwStatus,
|
||||
"Could not fetch list of IPv6 TCP connections");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void gkrellm_sys_inet_read_tcp_data(void)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* GKrellM Windows Portion
|
||||
| Copyright (C) 2002 Bill Nalen
|
||||
| 2007-2009 Stefan Gehn
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Nalen bill@nalens.com
|
||||
| Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| 2007-2009 Stefan Gehn
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Wilson billw@gkrellm.net
|
||||
| Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* GKrellM Windows Portion
|
||||
| Copyright (C) 2002 Bill Nalen
|
||||
| 2007-2009 Stefan Gehn
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Nalen bill@nalens.com
|
||||
| Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| 2007-2009 Stefan Gehn
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
| 2007-2010 Stefan Gehn
|
||||
|
|
||||
| Authors: Bill Wilson billw@gkrellm.net
|
||||
| Stefan Gehn stefan+gkrellm@srcbox.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* GKrellM
|
||||
| Copyright (C) 1999-2009 Bill Wilson
|
||||
| Copyright (C) 1999-2010 Bill Wilson
|
||||
|
|
||||
| Author: Bill Wilson billw@gkrellm.net
|
||||
| Latest versions might be found at: http://gkrellm.net
|
||||
|
|
Loading…
Reference in New Issue