Compare commits
	
		
			78 Commits
		
	
	
		
			gnome-2-20
			...
			LIBGTOP_2_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 3d4491494f | ||
|  | 10a04fc9c7 | ||
|  | 10e5124770 | ||
|  | f269f738d7 | ||
|  | bc86ee5421 | ||
|  | 7ea989c2b8 | ||
|  | 91b7ae4b11 | ||
|  | ce23ce407c | ||
|  | 7f779e078d | ||
|  | 229eab1213 | ||
|  | 791e0dd859 | ||
|  | f63973eac5 | ||
|  | 806a2d2d7e | ||
|  | af81e9be75 | ||
|  | 90fc3ca780 | ||
|  | 99e9437b37 | ||
|  | 6c7f40ac64 | ||
|  | e75261ada8 | ||
|  | dc5da30913 | ||
|  | 4d78d26932 | ||
|  | cd950bbf73 | ||
|  | c1b95643a8 | ||
|  | be8a371481 | ||
|  | fedd75b2b1 | ||
|  | a02e213373 | ||
|  | e3697c9a9e | ||
|  | 91e2e5a1b7 | ||
|  | 158280e297 | ||
|  | 62c741074c | ||
|  | 87a80ba430 | ||
|  | 7bb5abb9a8 | ||
|  | 40485978ec | ||
|  | 73c62a7bdb | ||
|  | e4d9c10a73 | ||
|  | 5d3f18e12c | ||
|  | d97b0c3419 | ||
|  | 960d12822d | ||
|  | f79f25f5ce | ||
|  | 3bb78c22c4 | ||
|  | 4971103dc3 | ||
|  | 35fab4d9aa | ||
|  | 2078320e14 | ||
|  | 46a29ac020 | ||
|  | d9c98b57c9 | ||
|  | 9ce9de7942 | ||
|  | 1409a8ef80 | ||
|  | bff4a84864 | ||
|  | 77524a1ad2 | ||
|  | a171755aa6 | ||
|  | 1d5f2cb395 | ||
|  | 86ace13645 | ||
|  | 57b1547333 | ||
|  | efee8728d1 | ||
|  | 9ae5202a78 | ||
|  | 07322469b7 | ||
|  | b797fcf578 | ||
|  | 7725fdff77 | ||
|  | e5298ca598 | ||
|  | 92d54e287a | ||
|  | 2d9656e82a | ||
|  | 8674e92349 | ||
|  | f5bbc36a91 | ||
|  | b058565419 | ||
|  | 2c6b951822 | ||
|  | 9b072525a6 | ||
|  | e2e0e3a555 | ||
|  | f37f72781a | ||
|  | 9618fe795f | ||
|  | 2e3231b051 | ||
|  | 7fd14852db | ||
|  | 73728a78c7 | ||
|  | 3f55d507dd | ||
|  | 13cec7830f | ||
|  | 665d65d164 | ||
|  | 21adc6b0c5 | ||
|  | 3529a1b59f | ||
|  | 8a0a3632ac | ||
|  | e6f9e07a9e | 
							
								
								
									
										51
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								NEWS
									
									
									
									
									
								
							| @@ -1,15 +1,56 @@ | ||||
| 05 Mars 2008: Overview of changes in 2.20.2 | ||||
| 18 August 2008: Overview of changes in 2.23.90 | ||||
| ============================================== | ||||
| * freebsd: | ||||
|   - updated port by Joe Marcus Clarke. | ||||
|  | ||||
| 23 June 2008: Overview of changes in 2.23.4 | ||||
| =========================================== | ||||
| * linux: | ||||
|   - fixed smaps parsing on >= 2.6.24.x. | ||||
|     backport of svn+ssh://svn.gnome.org/svn/libgtop/trunk@2713. | ||||
|   - Fixed and improved glibtop_get_fsusage with kernel >= 2.6.25. | ||||
|     Closes #539360. | ||||
|  | ||||
| 7 January 2008: Overview of changes in 2.20.1 | ||||
| ============================================= | ||||
| 24 May 2008: Overview of changes in 2.23.2 | ||||
| ========================================== | ||||
| * glibtop_get_proc_open_files API can also lists IPv6 TCP sockets. | ||||
| * glibtop_get_proc_affinity : new API to retrieve process CPU affinity. | ||||
|  | ||||
| (Let's hope one day i'll find the gtk-doc documentation ...) | ||||
|  | ||||
| * linux: | ||||
|   - fixed parsing of big /proc/stat for uptime. | ||||
|  | ||||
| 04 April 2008: Overview of changes in 2.22.1 | ||||
| ============================================ | ||||
| * Fixed compilation/dist for !linux. | ||||
|   Closes #525953. | ||||
|  | ||||
| 10 Mars 2008: Overview of changes in 2.22.0 | ||||
| =========================================== | ||||
| * linux: | ||||
|   - fixed proc_kernel. | ||||
|   | ||||
| 25 February 2008: Overview of changes in 2.21.92 | ||||
| ================================================ | ||||
| * linux: | ||||
|   - fixed smaps parsing on >= 2.6.24.x. | ||||
|  | ||||
| 14 January 2008: Overview of changes in 2.21.5 | ||||
| ============================================== | ||||
| * freebsd: | ||||
|   - fixed build on GNU/kfreebsd. Petr Salinger. | ||||
|   - fixed procmem units. Kuang-che Wu. | ||||
|  | ||||
| 28 October 2007: Overview of changes in 2.21.1 | ||||
| ============================================== | ||||
| * don't export _p/_s private symbols anymore. This is not an API/ABI breakage. | ||||
| * darwin implementation by Benjamin Reed. | ||||
| * linux: | ||||
|   - splitted fsusage and mountlist implementations; | ||||
|   - smarter mountlist(allfs = False); | ||||
|   - fixed some compile warning on 64bit; | ||||
| * solaris: | ||||
|   - fixed netload build by Henry Zhang. | ||||
|  | ||||
| 16 September 2007: Overview of changes in 2.20.0 | ||||
| ================================================ | ||||
| * Updated translations. | ||||
|   | ||||
| @@ -3,12 +3,12 @@ dnl Configure script for the Gnome library | ||||
| dnl | ||||
|  | ||||
| m4_define([libgtop_major_version], [2]) | ||||
| m4_define([libgtop_minor_version], [20]) | ||||
| m4_define([libgtop_micro_version], [2]) | ||||
| m4_define([libgtop_minor_version], [23]) | ||||
| m4_define([libgtop_micro_version], [90]) | ||||
| m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version]) | ||||
|  | ||||
| dnl  increment if the interface has additions, changes, removals. | ||||
| m4_define([libgtop_current], [8]) | ||||
| m4_define([libgtop_current], [9]) | ||||
|  | ||||
| dnl  increment any time the source changes; set to | ||||
| dnl  0 if you increment CURRENT | ||||
| @@ -17,7 +17,7 @@ m4_define([libgtop_revision], [0]) | ||||
| dnl  increment if any interfaces have been added; set to 0 | ||||
| dnl  if any interfaces have been removed. removal has | ||||
| dnl  precedence over adding, so set to 0 if both happened. | ||||
| m4_define([libgtop_age], [1]) | ||||
| m4_define([libgtop_age], [2]) | ||||
|  | ||||
| # Increase each time you change the client/server protocol. | ||||
| m4_define([libgtop_server_version], [5]) | ||||
| @@ -380,6 +380,7 @@ sysdeps/freebsd/Makefile | ||||
| sysdeps/solaris/Makefile | ||||
| sysdeps/aix/Makefile | ||||
| sysdeps/bsd/Makefile | ||||
| sysdeps/darwin/Makefile | ||||
| src/Makefile | ||||
| src/daemon/Makefile | ||||
| lib/Makefile | ||||
|   | ||||
| @@ -8,7 +8,7 @@ DEFS			= @DEFS@ | ||||
|  | ||||
| noinst_PROGRAMS	= 	first second pprint procargs df netlist \ | ||||
| 			  mountlist procmap netload sysdeps timings \ | ||||
| 			  openfiles smp proclist mem wd | ||||
| 			  openfiles smp proclist mem wd affinity | ||||
|  | ||||
| first_SOURCES		= first.c | ||||
| first_LDADD		= $(top_builddir)/lib/libgtop-2.0.la | ||||
| @@ -58,3 +58,5 @@ wd_LDADD	= $(top_builddir)/lib/libgtop-2.0.la | ||||
| mem_SOURCE	= mem.c | ||||
| mem_LDADD	= $(top_builddir)/lib/libgtop-2.0.la | ||||
|  | ||||
| affinity_SOURCES	= affinity.c | ||||
| affinity_LDADD	= $(top_builddir)/lib/libgtop-2.0.la | ||||
|   | ||||
| @@ -0,0 +1,34 @@ | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/procaffinity.h> | ||||
|  | ||||
| #include <glib.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| int main(int argc, char **argv) | ||||
| { | ||||
| 	pid_t pid; | ||||
| 	glibtop_proc_affinity buf; | ||||
| 	guint16 *cpus; | ||||
| 	size_t i; | ||||
|  | ||||
| 	if (argc < 2 || !(pid = strtoul(argv[1], NULL, 0))) | ||||
| 		pid = getpid(); | ||||
|  | ||||
| 	glibtop_init(); | ||||
|  | ||||
| 	cpus = glibtop_get_proc_affinity(&buf, pid); | ||||
|  | ||||
| 	g_print("Process %u:\n" | ||||
| 		" - all: %d\n", | ||||
| 		(unsigned)pid, buf.all); | ||||
|  | ||||
| 	for (i = 0; i != buf.number; ++i) | ||||
| 		g_print(" - CPU#%u is set\n", cpus[i]); | ||||
|  | ||||
| 	g_free(cpus); | ||||
|  | ||||
| 	glibtop_close(); | ||||
|  | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -15,35 +15,43 @@ static void print_fsusage(const char *mountpoint) | ||||
|  | ||||
|   glibtop_get_fsusage(&buf, mountpoint); | ||||
|  | ||||
|   printf("%-20s %-10llu %-10llu %-10llu %.1f\n", | ||||
|   printf("%-30s %10llu %10llu %10llu %5.1f %10llu %10llu\n", | ||||
| 	 mountpoint, | ||||
| 	 buf.blocks * buf.block_size >> 20, | ||||
| 	 (buf.blocks - buf.bavail) * buf.block_size >> 20, | ||||
| 	 buf.bavail * buf.block_size >> 20, | ||||
| 	 (buf.blocks - buf.bavail) * 100.0 / buf.blocks | ||||
| 	 (buf.blocks - buf.bavail) * 100.0 / (buf.blocks ? buf.blocks : 1.0), | ||||
| 	 buf.read, | ||||
| 	 buf.write | ||||
| 	 ); | ||||
| } | ||||
|  | ||||
|  | ||||
| int main() | ||||
| int main(int argc, char **argv) | ||||
| { | ||||
|   glibtop_mountlist buf; | ||||
|   glibtop_mountentry *entries; | ||||
|   size_t i; | ||||
|  | ||||
|   glibtop_init(); | ||||
|  | ||||
|   printf("%-20s %-10s %-10s %-10s %-10s\n", | ||||
| 	 "Filesystem", "Size", "Used", "Avail", "Use%"); | ||||
|   printf("%-30s %10s %10s %10s %5s %10s %10s\n", | ||||
| 	 "Filesystem", "Size", "Used", "Avail", "Use%", "Read", "Write"); | ||||
|  | ||||
|   entries = glibtop_get_mountlist(&buf, FALSE); | ||||
|   if (argc > 1) { | ||||
|     while (*++argv) | ||||
|       print_fsusage(*argv); | ||||
|   } else { | ||||
|     glibtop_mountentry *entries; | ||||
|     size_t i; | ||||
|  | ||||
|   for(i = 0; i < buf.number; ++i) | ||||
|     { | ||||
|       print_fsusage(entries[i].mountdir); | ||||
|     } | ||||
|     entries = glibtop_get_mountlist(&buf, TRUE); | ||||
|  | ||||
|   g_free(entries); | ||||
|     for(i = 0; i < buf.number; ++i) | ||||
|       { | ||||
| 	print_fsusage(entries[i].mountdir); | ||||
|       } | ||||
|  | ||||
|     g_free(entries); | ||||
|   } | ||||
|  | ||||
|   glibtop_close(); | ||||
|  | ||||
|   | ||||
| @@ -47,9 +47,9 @@ main (int argc, char *argv []) | ||||
| { | ||||
| 	glibtop_union data; | ||||
| 	glibtop_sysdeps sysdeps; | ||||
| 	unsigned c, method, count, port, i, *ptr; | ||||
| 	unsigned c, method, count, port, i; | ||||
| 	char buffer [BUFSIZ]; | ||||
| 	pid_t pid, ppid; | ||||
| 	pid_t pid, ppid, *ptr; | ||||
| 	char *args; | ||||
|  | ||||
| 	count = PROFILE_COUNT; | ||||
|   | ||||
| @@ -37,9 +37,16 @@ static void show_open_files(pid_t pid) | ||||
| 		  printf("socket %s:%d\n", files[i].info.sock.dest_host, files[i].info.sock.dest_port); | ||||
| 		  break; | ||||
|  | ||||
| 	  case GLIBTOP_FILE_TYPE_INET6SOCKET: | ||||
| 		  printf("socket [%s]:%d\n", files[i].info.sock.dest_host, files[i].info.sock.dest_port); | ||||
| 		  break; | ||||
|  | ||||
| 	  case GLIBTOP_FILE_TYPE_LOCALSOCKET: | ||||
| 		  printf("localsocket %s\n", files[i].info.localsock.name); | ||||
| 		  break; | ||||
|  | ||||
| 	  default: | ||||
| 		  printf("unknown type\n"); | ||||
| 	  } | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
|  | ||||
| static void print_pids(guint64 which, guint64 arg) | ||||
| { | ||||
| 	unsigned *pids; | ||||
| 	pid_t *pids; | ||||
| 	unsigned i; | ||||
| 	glibtop_proclist buf; | ||||
|  | ||||
|   | ||||
| @@ -108,10 +108,10 @@ main (int argc, char *argv []) | ||||
|  | ||||
| 			if (sizeof (void*) == 8) | ||||
| 				format = "%016lx-%016lx %016lx - " | ||||
| 					 "%02x:%02x %08lu - %4s - %s\n"; | ||||
| 					 "%02x:%02x %08lu - %5.5s - %s\n"; | ||||
| 			else | ||||
| 				format = "%08lx-%08lx %08lx - " | ||||
| 					 "%02x:%02x %08lu - %4s - %s\n"; | ||||
| 					 "%02x:%02x %08lu - %5.5s - %s\n"; | ||||
|  | ||||
| 			fprintf (stderr, format, | ||||
| 				 (unsigned long) maps [i].start, | ||||
|   | ||||
| @@ -239,7 +239,8 @@ main (int argc, char *argv []) | ||||
| { | ||||
| 	glibtop_proclist proclist; | ||||
| 	glibtop_sysdeps sysdeps; | ||||
| 	unsigned *ptr, pid, i; | ||||
| 	unsigned i; | ||||
| 	pid_t *ptr, pid; | ||||
|  | ||||
| 	setlocale (LC_ALL, ""); | ||||
| 	bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR); | ||||
|   | ||||
| @@ -73,11 +73,11 @@ int | ||||
| main (int argc, char *argv []) | ||||
| { | ||||
| 	glibtop_union data; | ||||
| 	unsigned c, count, *ptr; | ||||
| 	unsigned c, count; | ||||
| 	struct rusage total_start, total_end; | ||||
| 	struct rusage rusage_start, rusage_end; | ||||
| 	struct timeval elapsed_utime, elapsed_stime; | ||||
| 	pid_t pid; | ||||
| 	pid_t pid, *ptr; | ||||
|  | ||||
| 	count = PROFILE_COUNT; | ||||
|  | ||||
|   | ||||
| @@ -23,4 +23,5 @@ void|netload|ulong(if_flags,mtu,subnet,address,packets_in,packets_out,packets_to | ||||
| void|ppp|ulong(state,bytes_in,bytes_out)|ushort(device) | ||||
| char **|netlist|unsigned(number) | ||||
| char **|proc_wd|ulong(number),str(root),str(exe)|pid_t(pid) | ||||
| guint16*|proc_affinity|ulong(number),int(all)|pid_t(pid) | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ glibtop_HEADERS		= close.h loadavg.h prockernel.h procstate.h \ | ||||
| 			  procsignal.h union.h gnuserv.h \ | ||||
| 			  parameter.h mountlist.h fsusage.h procmap.h signal.h \ | ||||
| 			  sysinfo.h ppp.h procargs.h netload.h \ | ||||
| 			  procwd.h \ | ||||
| 			  procwd.h procaffinity.h \ | ||||
| 			  netlist.h procopenfiles.h open.h | ||||
|  | ||||
| noinst_HEADERS		= error.h write.h read_data.h read.h init_hooks.h | ||||
|   | ||||
| @@ -58,8 +58,9 @@ G_BEGIN_DECLS | ||||
| #define GLIBTOP_CMND_NETLIST		24 | ||||
| #define GLIBTOP_CMND_PROC_OPEN_FILES	25 | ||||
| #define GLIBTOP_CMND_PROC_WD		26 | ||||
| #define GLIBTOP_CMND_PROC_AFFINITY	27 | ||||
|  | ||||
| #define GLIBTOP_MAX_CMND		27 | ||||
| #define GLIBTOP_MAX_CMND		28 | ||||
|  | ||||
| #define _GLIBTOP_PARAM_SIZE		16 | ||||
|  | ||||
|   | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ | ||||
|  | ||||
| /* Copyright (C) 1998-99 Martin Baulig | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #ifndef __GLIBTOP_SERVER_H__ | ||||
| #define __GLIBTOP_SERVER_H__ | ||||
|  | ||||
| #include <glibtop/global.h> | ||||
| #include <glibtop/sysdeps.h> | ||||
|  | ||||
| G_BEGIN_DECLS | ||||
|  | ||||
| typedef struct _glibtop_server		glibtop_server; | ||||
| typedef struct _glibtop_server_info	glibtop_server_info; | ||||
|  | ||||
| typedef struct _glibtop_closure		glibtop_closure; | ||||
|  | ||||
| struct _glibtop_server_info | ||||
| { | ||||
|     int ncpu;			/* Number of CPUs, zero if single-processor */ | ||||
|     unsigned long features;	/* Server is required for this features */ | ||||
|     glibtop_sysdeps sysdeps;	/* Detailed feature list */ | ||||
|     glibtop_sysdeps required;	/* Required feature list */ | ||||
|     glibtop_sysdeps wanted;	/* We only want this features */ | ||||
| }; | ||||
|  | ||||
| struct	_glibtop_server | ||||
| { | ||||
|     glibtop_server_info *info; | ||||
|  | ||||
|     int refcount; | ||||
|     unsigned flags; | ||||
|     const char *name; | ||||
|  | ||||
|     void *_priv; | ||||
| }; | ||||
|  | ||||
| glibtop_server * | ||||
| glibtop_server_new (void); | ||||
|  | ||||
| void | ||||
| glibtop_server_ref (glibtop_server *server); | ||||
|  | ||||
| void | ||||
| glibtop_server_unref (glibtop_server *server); | ||||
|  | ||||
| G_END_DECLS | ||||
|  | ||||
| #endif | ||||
| @@ -0,0 +1,61 @@ | ||||
| /* Copyright (C) 2007 Benoît Dejean | ||||
|    This file is part of LibGTop 2. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #ifndef __GLIBTOP_PROCAFFINITY_H__ | ||||
| #define __GLIBTOP_PROCAFFINITY_H__ | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/global.h> | ||||
|  | ||||
| G_BEGIN_DECLS | ||||
|  | ||||
| typedef struct _glibtop_proc_affinity	glibtop_proc_affinity; | ||||
|  | ||||
| #define GLIBTOP_PROC_AFFINITY_NUMBER	0 | ||||
| #define GLIBTOP_PROC_AFFINITY_ALL	1 | ||||
|  | ||||
| struct _glibtop_proc_affinity | ||||
| { | ||||
| 	guint64	flags; | ||||
| 	guint32 number; | ||||
| 	gboolean all; | ||||
| }; | ||||
|  | ||||
|  | ||||
| guint16 * glibtop_get_proc_affinity(glibtop_proc_affinity *buf, pid_t pid); | ||||
| guint16 * glibtop_get_proc_affinity_l(glibtop *server, glibtop_proc_affinity *buf, pid_t pid); | ||||
|  | ||||
|  | ||||
| #if GLIBTOP_SUID_PROC_AFFINITY | ||||
|  | ||||
| #define glibtop_get_proc_affinity_r glibtop_get_proc_affinity_p | ||||
| void _glibtop_init_proc_affinity_p(glibtop *server); | ||||
| guint16 * glibtop_get_proc_affinity_p(glibtop *server, glibtop_proc_affinity *buf, pid_t pid); | ||||
|  | ||||
| #else | ||||
|  | ||||
| #define glibtop_get_proc_affinity_r glibtop_get_proc_affinity_s | ||||
| void _glibtop_init_proc_affinity_s(glibtop *server); | ||||
| guint16 * glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid); | ||||
|  | ||||
| #endif | ||||
|  | ||||
| G_END_DECLS | ||||
|  | ||||
| #endif | ||||
|   | ||||
| @@ -53,7 +53,8 @@ enum glibtop_file_type { | ||||
| 	GLIBTOP_FILE_TYPE_FILE		= 1, | ||||
| 	GLIBTOP_FILE_TYPE_PIPE		= 2, | ||||
| 	GLIBTOP_FILE_TYPE_INETSOCKET	= 4, | ||||
| 	GLIBTOP_FILE_TYPE_LOCALSOCKET	= 8 | ||||
| 	GLIBTOP_FILE_TYPE_LOCALSOCKET	= 8, | ||||
| 	GLIBTOP_FILE_TYPE_INET6SOCKET	= 16 | ||||
| }; | ||||
|  | ||||
| typedef struct _glibtop_open_files_entry glibtop_open_files_entry; | ||||
| @@ -65,7 +66,8 @@ struct _glibtop_open_files_entry | ||||
| 	int fd; | ||||
| 	guint16 type; /* An "enum glibtop_file_type" value. */ | ||||
| 	union { | ||||
| 		/* When type == GLIBTOP_FILE_TYPE_INETSOCKET */ | ||||
| 		/* When type == GLIBTOP_FILE_TYPE_INETSOCKET or | ||||
| 		 * when type == GLIBTOP_FILE_TYPE_INET6SOCKET */ | ||||
| 		struct { | ||||
| 			char dest_host[GLIBTOP_OPEN_DEST_HOST_LEN+1]; | ||||
| 			int dest_port; | ||||
|   | ||||
| @@ -52,8 +52,9 @@ G_BEGIN_DECLS | ||||
| #define GLIBTOP_SYSDEPS_NETLIST		23 | ||||
| #define GLIBTOP_SYSDEPS_PROC_OPEN_FILES	24 | ||||
| #define GLIBTOP_SYSDEPS_PROC_WD		25 | ||||
| #define GLIBTOP_SYSDEPS_PROC_AFFINITY	26 | ||||
|  | ||||
| #define GLIBTOP_MAX_SYSDEPS		26 | ||||
| #define GLIBTOP_MAX_SYSDEPS		27 | ||||
|  | ||||
| #define GLIBTOP_SYSDEPS_ALL		((1 << GLIBTOP_MAX_SYSDEPS) - 1) | ||||
|  | ||||
| @@ -88,6 +89,7 @@ struct _glibtop_sysdeps | ||||
| 	guint64 netload;		/* glibtop_netload	*/ | ||||
| 	guint64 ppp;			/* glibtop_ppp		*/ | ||||
| 	guint64	proc_wd;		/* glibtop_proc_wd	*/ | ||||
| 	guint64	proc_affinity;		/* glibtop_proc_affinity */ | ||||
| }; | ||||
|  | ||||
| void glibtop_get_sysdeps (glibtop_sysdeps *buf); | ||||
|   | ||||
| @@ -43,6 +43,7 @@ | ||||
| #include <glibtop/procmap.h> | ||||
| #include <glibtop/procopenfiles.h> | ||||
| #include <glibtop/procwd.h> | ||||
| #include <glibtop/procaffinity.h> | ||||
|  | ||||
| #include <glibtop/mountlist.h> | ||||
| #include <glibtop/fsusage.h> | ||||
| @@ -82,6 +83,7 @@ union _glibtop_union | ||||
| 	glibtop_ppp		ppp; | ||||
| 	glibtop_proc_open_files proc_open_files; | ||||
| 	glibtop_proc_wd		proc_wd; | ||||
| 	glibtop_proc_affinity	proc_affinity; | ||||
| }; | ||||
|  | ||||
| G_END_DECLS | ||||
|   | ||||
							
								
								
									
										173
									
								
								lib/error.c
									
									
									
									
									
								
							
							
						
						
									
										173
									
								
								lib/error.c
									
									
									
									
									
								
							| @@ -1,173 +0,0 @@ | ||||
| /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ | ||||
|  | ||||
| /* Copyright (C) 1998-99 Martin Baulig | ||||
|    This file is part of LibGTop 1.0. | ||||
|  | ||||
|    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
|  | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include <glib/gstrfuncs.h> | ||||
| #include <errno.h> | ||||
|  | ||||
| #define DEFAULT_NAME	"LibGTop-Server" | ||||
|  | ||||
| /* Prints error message and exits. */ | ||||
|  | ||||
| static void | ||||
| print_server_name (glibtop_server *server) | ||||
| { | ||||
|     fprintf (stderr, "%s: ", server ? | ||||
| 	     (server->name ? server->name : DEFAULT_NAME) | ||||
| 	     : DEFAULT_NAME); | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_error_vr (glibtop_server *server, char *format, va_list args) | ||||
| { | ||||
|     print_server_name (server); | ||||
|     vfprintf (stderr, format, args); | ||||
|     fprintf (stderr, "\n"); | ||||
|  | ||||
| #ifdef LIBGTOP_ENABLE_DEBUG | ||||
|     abort (); | ||||
| #else | ||||
|     exit (1); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_error_io_vr (glibtop_server *server, char *format, int error, va_list args) | ||||
| { | ||||
|     print_server_name (server); | ||||
|     vfprintf (stderr, format, args); | ||||
|     fprintf (stderr, ": %s\n", g_strerror (error)); | ||||
|  | ||||
| #ifdef LIBGTOP_ENABLE_DEBUG | ||||
|     abort (); | ||||
| #else | ||||
|     exit (1); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_warn_vr (glibtop_server *server, char *format, va_list args) | ||||
| { | ||||
|     print_server_name (server); | ||||
|     vfprintf (stderr, format, args); | ||||
|     fprintf (stderr, "\n"); | ||||
|  | ||||
| #ifdef LIBGTOP_FATAL_WARNINGS | ||||
|     abort (); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_warn_io_vr (glibtop_server *server, char *format, int error, va_list args) | ||||
| { | ||||
|     print_server_name (server); | ||||
|     vfprintf (stderr, format, args); | ||||
|     fprintf (stderr, ": %s\n", g_strerror (error)); | ||||
|  | ||||
| #ifdef LIBGTOP_FATAL_WARNINGS | ||||
|     abort (); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_error_r (glibtop_server *server, char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|  | ||||
|     va_start (args, format); | ||||
|     glibtop_error_vr (server, format, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_warn_r (glibtop_server *server, char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|  | ||||
|     va_start (args, format); | ||||
|     glibtop_warn_vr (server, format, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_error_io_r (glibtop_server *server, char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|  | ||||
|     va_start (args, format); | ||||
|     glibtop_error_io_vr (server, format, errno, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_warn_io_r (glibtop_server *server, char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|  | ||||
|     va_start (args, format); | ||||
|     glibtop_warn_io_vr (server, format, errno, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| #ifndef  __GNUC__ | ||||
|  | ||||
| static void | ||||
| glibtop_error (char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|     va_start (args, format); | ||||
|     glibtop_error_vr (glibtop_global_server, format, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| static void | ||||
| glibtop_warn (char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|     va_start (args, format); | ||||
|     glibtop_warn_vr (glibtop_global_server, format, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| static void | ||||
| glibtop_error_io (char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|     va_start (args, format); | ||||
|     glibtop_error_io_vr (glibtop_global_server, format, errno, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| static void | ||||
| glibtop_warn_io (char *format, ...) | ||||
| { | ||||
|     va_list args; | ||||
|     va_start (args, format); | ||||
|     glibtop_warn_io_vr (glibtop_global_server, format, errno, args); | ||||
|     va_end (args); | ||||
| } | ||||
|  | ||||
| #endif /* no __GNUC__ */ | ||||
| @@ -1,130 +1,70 @@ | ||||
| glibtop_call_l | ||||
| glibtop_call_p | ||||
| glibtop_close | ||||
| glibtop_close_p | ||||
| glibtop_close_r | ||||
| glibtop_close_s | ||||
| glibtop_get_cpu | ||||
| glibtop_get_cpu_l | ||||
| glibtop_get_cpu_p | ||||
| glibtop_get_cpu_s | ||||
| glibtop_get_fsusage | ||||
| glibtop_get_fsusage_l | ||||
| glibtop_get_fsusage_p | ||||
| glibtop_get_fsusage_s | ||||
| glibtop_get_loadavg | ||||
| glibtop_get_loadavg_l | ||||
| glibtop_get_loadavg_p | ||||
| glibtop_get_loadavg_s | ||||
| glibtop_get_mem | ||||
| glibtop_get_mem_l | ||||
| glibtop_get_mem_p | ||||
| glibtop_get_mem_s | ||||
| glibtop_get_mountlist | ||||
| glibtop_get_mountlist_l | ||||
| glibtop_get_mountlist_p | ||||
| glibtop_get_mountlist_s | ||||
| glibtop_get_msg_limits | ||||
| glibtop_get_msg_limits_l | ||||
| glibtop_get_msg_limits_p | ||||
| glibtop_get_msg_limits_s | ||||
| glibtop_get_netlist | ||||
| glibtop_get_netlist_l | ||||
| glibtop_get_netlist_p | ||||
| glibtop_get_netlist_s | ||||
| glibtop_get_netload | ||||
| glibtop_get_netload_l | ||||
| glibtop_get_netload_p | ||||
| glibtop_get_netload_s | ||||
| glibtop_get_parameter_l | ||||
| glibtop_get_parameter_p | ||||
| glibtop_get_ppp | ||||
| glibtop_get_ppp_l | ||||
| glibtop_get_ppp_p | ||||
| glibtop_get_ppp_s | ||||
| glibtop_get_proc_args | ||||
| glibtop_get_proc_args_l | ||||
| glibtop_get_proc_args_p | ||||
| glibtop_get_proc_args_s | ||||
| glibtop_get_proc_argv | ||||
| glibtop_get_proc_argv_l | ||||
| glibtop_get_proc_argv_p | ||||
| glibtop_get_proc_kernel | ||||
| glibtop_get_proc_kernel_l | ||||
| glibtop_get_proc_kernel_p | ||||
| glibtop_get_proc_kernel_s | ||||
| glibtop_get_proclist | ||||
| glibtop_get_proclist_l | ||||
| glibtop_get_proclist_p | ||||
| glibtop_get_proclist_s | ||||
| glibtop_get_proc_map | ||||
| glibtop_get_proc_map_l | ||||
| glibtop_get_proc_map_p | ||||
| glibtop_get_proc_map_s | ||||
| glibtop_get_proc_mem | ||||
| glibtop_get_proc_mem_l | ||||
| glibtop_get_proc_mem_p | ||||
| glibtop_get_proc_mem_s | ||||
| glibtop_get_proc_open_files | ||||
| glibtop_get_proc_open_files_l | ||||
| glibtop_get_proc_open_files_p | ||||
| glibtop_get_proc_open_files_s | ||||
| glibtop_get_proc_segment | ||||
| glibtop_get_proc_segment_l | ||||
| glibtop_get_proc_segment_p | ||||
| glibtop_get_proc_segment_s | ||||
| glibtop_get_proc_signal | ||||
| glibtop_get_proc_signal_l | ||||
| glibtop_get_proc_signal_p | ||||
| glibtop_get_proc_signal_s | ||||
| glibtop_get_proc_state | ||||
| glibtop_get_proc_state_l | ||||
| glibtop_get_proc_state_p | ||||
| glibtop_get_proc_state_s | ||||
| glibtop_get_proc_time | ||||
| glibtop_get_proc_time_l | ||||
| glibtop_get_proc_time_p | ||||
| glibtop_get_proc_time_s | ||||
| glibtop_get_proc_uid | ||||
| glibtop_get_proc_uid_l | ||||
| glibtop_get_proc_uid_p | ||||
| glibtop_get_proc_uid_s | ||||
| glibtop_get_proc_wd | ||||
| glibtop_get_proc_wd_l | ||||
| glibtop_get_proc_wd_p | ||||
| glibtop_get_proc_wd_s | ||||
| glibtop_get_sem_limits | ||||
| glibtop_get_sem_limits_l | ||||
| glibtop_get_sem_limits_p | ||||
| glibtop_get_sem_limits_s | ||||
| glibtop_get_shm_limits | ||||
| glibtop_get_shm_limits_l | ||||
| glibtop_get_shm_limits_p | ||||
| glibtop_get_shm_limits_s | ||||
| glibtop_get_proc_affinity | ||||
| glibtop_get_proc_affinity_l | ||||
| glibtop_get_swap | ||||
| glibtop_get_swap_l | ||||
| glibtop_get_swap_p | ||||
| glibtop_get_swap_s | ||||
| glibtop_get_sysdeps | ||||
| glibtop_get_sysdeps_r | ||||
| glibtop_get_sysinfo | ||||
| glibtop_get_sysinfo_p | ||||
| glibtop_get_sysinfo_s | ||||
| glibtop_get_uptime | ||||
| glibtop_get_uptime_l | ||||
| glibtop_get_uptime_p | ||||
| glibtop_get_uptime_s | ||||
| glibtop_global_server | ||||
| glibtop_init | ||||
| glibtop_init_p | ||||
| glibtop_init_r | ||||
| glibtop_init_s | ||||
| glibtop_internet_addr | ||||
| glibtop_make_connection | ||||
| glibtop_open_l | ||||
| glibtop_open_p | ||||
| glibtop_open_s | ||||
| glibtop_server_features | ||||
| glibtop_set_parameter_l | ||||
| glibtop_set_parameter_p | ||||
| glibtop_sys_siglist | ||||
|   | ||||
| @@ -148,7 +148,7 @@ glibtop_open_l (glibtop *server, const char *program_name, | ||||
| 		if (nbytes != size) | ||||
| 			glibtop_error_r (server, | ||||
| 					 "Requested %u bytes but got %u.", | ||||
| 					 size, nbytes); | ||||
| 					 (unsigned)size, (unsigned)nbytes); | ||||
|  | ||||
| 		glibtop_read_l (server, nbytes, buffer); | ||||
|  | ||||
|   | ||||
| @@ -47,6 +47,7 @@ GLIBTOP_SUID_PROC_MAP + | ||||
| GLIBTOP_SUID_NETLOAD + | ||||
| GLIBTOP_SUID_NETLIST + | ||||
| GLIBTOP_SUID_PROC_WD + | ||||
| GLIBTOP_SUID_PROC_AFFINITY + | ||||
| GLIBTOP_SUID_PPP; | ||||
|  | ||||
| const _glibtop_init_func_t _glibtop_init_hook_s [] = { | ||||
| @@ -113,6 +114,9 @@ const _glibtop_init_func_t _glibtop_init_hook_s [] = { | ||||
| #if !GLIBTOP_SUID_PROC_WD | ||||
| 	_glibtop_init_proc_wd_s, | ||||
| #endif | ||||
| #if !GLIBTOP_SUID_PROC_AFFINITY | ||||
| 	_glibtop_init_proc_affinity_s, | ||||
| #endif | ||||
| #if !GLIBTOP_SUID_PPP | ||||
| 	_glibtop_init_ppp_s, | ||||
| #endif | ||||
| @@ -183,6 +187,9 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = { | ||||
| #if GLIBTOP_SUID_PROC_WD | ||||
| 	_glibtop_init_proc_wd_p, | ||||
| #endif | ||||
| #if GLIBTOP_SUID_PROC_AFFINITY | ||||
| 	_glibtop_init_proc_affinity_p, | ||||
| #endif | ||||
| #if GLIBTOP_SUID_PPP | ||||
| 	_glibtop_init_ppp_p, | ||||
| #endif | ||||
|   | ||||
| @@ -66,6 +66,8 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[ | ||||
| 	  libgtop_use_machine_h=no | ||||
| 	  libgtop_have_sysinfo=yes | ||||
| 	  libgtop_need_server=no | ||||
| 	  libgtop_sysdeps_private_mountlist=yes | ||||
| 	  libgtop_sysdeps_private_fsusage=yes | ||||
| 	  ;; | ||||
| 	netbsd*|openbsd*|bsdi*) | ||||
| 	  libgtop_sysdeps_dir=bsd | ||||
| @@ -77,6 +79,8 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[ | ||||
| 	  libgtop_sysdeps_dir=freebsd | ||||
| 	  libgtop_use_machine_h=yes | ||||
| 	  libgtop_need_server=yes | ||||
| 	  libgtop_sysdeps_private_mountlist=yes | ||||
| 	  libgtop_sysdeps_private_fsusage=yes | ||||
| 	  libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2' | ||||
| 	  ;; | ||||
| 	solaris*) | ||||
| @@ -92,6 +96,13 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[ | ||||
| 	  libgtop_have_sysinfo=yes | ||||
| 	  libgtop_postinstall='chgrp system $(bindir)/libgtop_server && chmod g+s $(bindir)/libgtop_server2' | ||||
| 	  ;; | ||||
| 	darwin*) | ||||
| 	  libgtop_sysdeps_dir=darwin | ||||
| 	  libgtop_use_machine_h=yes | ||||
| 	  libgtop_need_server=yes | ||||
| 	  libgtop_have_sysinfo=yes | ||||
| 	  libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod g+s $(bindir)/libgtop_server2' | ||||
| 	  ;; | ||||
| 	*) | ||||
| 	  if test x$hacker_mode = xyes ; then | ||||
| 	    case "$host_os" in | ||||
| @@ -311,5 +322,7 @@ main (void) | ||||
| 	fi | ||||
|  | ||||
| 	AM_CONDITIONAL(NEED_LIBGTOP, test x$libgtop_need_server = xyes) | ||||
| 	AM_CONDITIONAL(LIBGTOP_SYSDEPS_PRIVATE_MOUNTLIST, test x$libgtop_sysdeps_private_mountlist = xyes) | ||||
| 	AM_CONDITIONAL(LIBGTOP_SYSDEPS_PRIVATE_FSUSAGE, test x$libgtop_sysdeps_private_fsusage = xyes) | ||||
| ]) | ||||
|  | ||||
|   | ||||
							
								
								
									
										96
									
								
								po/ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										96
									
								
								po/ChangeLog
									
									
									
									
									
								
							| @@ -1,18 +1,108 @@ | ||||
| 2008-02-20  Pawan Chitrakar <chautari@gmail.com> | ||||
| 2008-08-6  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-07-29  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-07-25  Leonardo Ferreira Fontenelle  <leonardof@gnome.org> | ||||
|  | ||||
| 	* pt_BR.po: Terminology improvement by Vladimir Melo. | ||||
|  | ||||
| 2008-06-11  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-05-22  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-05-19  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-04-04  Eskild Hustvedt  <eskildh@gnome.org> | ||||
|  | ||||
| 	* nn.po: Updated Norwegian Nynorsk translation | ||||
|  | ||||
| 2008-03-16  Simos Xenitellis  <simos@gnome.org> | ||||
|  | ||||
| 	* el.po: Updated Greek translation. | ||||
|  | ||||
| 2008-03-09  Gabor Kelemen  <kelemeng@gnome.hu> | ||||
|  | ||||
| 	* hu.po: Translation updated | ||||
|  | ||||
| 2008-03-06  Marcel Telka  <marcel@telka.sk> | ||||
|  | ||||
| 	* sk.po: Updated Slovak translation. | ||||
|  | ||||
| 2008-02-26  Changwoo Ryu  <cwryu@debian.org> | ||||
|  | ||||
| 	* ko.po: Updated Korean translation. | ||||
|  | ||||
| 2008-02-14  Chao-Hsiung Liao  <j_h_liau@yahoo.com.tw> | ||||
|  | ||||
|         * zh_HK.po: Updated Traditional Chinese translation(Hong Kong). | ||||
|         * zh_TW.po: Updated Traditional Chinese translation(Taiwan). | ||||
|  | ||||
| 2008-02-14  Pawan Chitrakar <chautari@gmail.com> | ||||
|  | ||||
| 	* ne.po: Updated Nepali Translation. | ||||
|  | ||||
| 2008-02-11  Petr Kovar  <pknbe@volny.cz> | ||||
|  | ||||
| 	* cs.po: Updated Czech translation by Lucas Lommer. | ||||
|  | ||||
| 2008-01-31  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-01-12  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Khaled Hosny. | ||||
|  | ||||
| 2008-01-11  Inaki Larranaga Murgoitio  <dooteo@euskalgnu.org> | ||||
|  | ||||
| 	* eu.po: Updated Basque translation. | ||||
|  | ||||
| 2007-12-31  Yannig Marchegay <yannig@marchegay.org> | ||||
|  | ||||
| 	* oc.po: Updated Occitan translation. | ||||
|  | ||||
| 2007-12-28  Rahul Bhalerao <b.rahul.pm@gmail.com> | ||||
|  | ||||
| 	* mr.po: Added Marathi translations from Sandeep Shedmake. | ||||
| 	* LINGUAS: Added an entry for Marathi(mr). | ||||
|  | ||||
| 2007-11-28  Ignacio Casal Quinteiro   <nacho.resa@gmail.com> | ||||
|  | ||||
| 	* gl.po: Updated Galician Translation. | ||||
|  | ||||
| 2007-11-01  Kjartan Maraas  <kmaraas@gnome.org> | ||||
|  | ||||
| 	* nb.po: Updated Norwegian bokmål translation. | ||||
|  | ||||
| 2007-10-23  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Youssef Chahibi. | ||||
|  | ||||
| 2007-10-21  Djihed Afifi <djihed@gmail.com>  | ||||
|  | ||||
| 	* ar.po: Updated Arabic Translation by Youssef Chahibi. | ||||
|  | ||||
| 2007-10-18  Matej Urbančič  <mateju@svn.gnome.org> | ||||
|  | ||||
| 	* sl.po: Updated Slovenian Translation. | ||||
|  | ||||
| 2007-10-15  Yair Hershkovitz  <yairhr@gmail.com> | ||||
|  | ||||
| 	* he.po: Updated Hebrew translation. | ||||
|  | ||||
| 2007-10-03  Luca Ferretti  <elle.uca@libero.it> | ||||
| 2007-10-02  Alessio Frusciante  <algol@firenze.linux.it> | ||||
|  | ||||
| 	* it.po: Updated Italian translation by Alessio Frusciante. | ||||
| 	* it.po: Updated Italian translation. | ||||
|  | ||||
| 2007-09-18  Alexander Shopov  <ash@contact.bg> | ||||
|  | ||||
|   | ||||
| @@ -45,6 +45,7 @@ mi | ||||
| mk | ||||
| ml | ||||
| mn | ||||
| mr | ||||
| ms | ||||
| nb | ||||
| ne | ||||
|   | ||||
							
								
								
									
										170
									
								
								po/ar.po
									
									
									
									
									
								
							
							
						
						
									
										170
									
								
								po/ar.po
									
									
									
									
									
								
							| @@ -1,55 +1,61 @@ | ||||
| # translation of libgtop.HEAD.ar.po to Arabic | ||||
| # translation of libgtop.HEAD.po to Arabic | ||||
| # This file is distributed under the same license as the PACKAGE package. | ||||
| # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. | ||||
| # | ||||
| # Arafat Medini <lumina@silverpen.de>, 2002,2003. | ||||
| # Isam Bayazidi <bayazidi@arabeyes.org>, 2002. | ||||
| # Abdulaziz Al-Arfaj <alarfaj0@yahoo.com>, 2004. | ||||
| # Khaled Hosny <khaledhosny@eglug.org>, 2006. | ||||
| # Khaled Hosny <khaledhosny@eglug.org>, 2006, 2008. | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop.HEAD.ar\n" | ||||
| "Project-Id-Version: libgtop.HEAD\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-08-26 14:20-0700\n" | ||||
| "PO-Revision-Date: 2007-09-08 14:32-0000\n" | ||||
| "Last-Translator: Youssef Chahibi <chahibi@gmail.com>\n" | ||||
| "Language-Team: Arabic <support@arabeyes.org>\n" | ||||
| "POT-Creation-Date: 2008-01-12 01:07+0000\n" | ||||
| "PO-Revision-Date: 2008-07-28 19:26+0300\n" | ||||
| "Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n" | ||||
| "Language-Team: Arabic <doc@arabeyes.org>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "X-Generator: KBabel 1.11.4\n" | ||||
| "Plural-Forms: Plural-Forms: nplurals=4; plural=n==1 ? 0 : n==2 ? 1 : n>=3 && n<=10 ? 2 : 3\n" | ||||
| "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" | ||||
|  | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "اقرأ بايت واحدة" | ||||
| msgstr[1] "اقرأ بايتين" | ||||
| msgstr[2] "اقرأ %d بايتات" | ||||
| msgstr[3] "اقرأ %d بايت" | ||||
| msgstr[0] "قرأ صفر بايت" | ||||
| msgstr[1] "قرأ بايت واحدة" | ||||
| msgstr[2] "قرأ بايتين" | ||||
| msgstr[3] "قرأ %Id بايتات" | ||||
| msgstr[4] "قرأ %Id بايت" | ||||
| msgstr[5] "قرأ %Id بايت" | ||||
|  | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "اقرأ حجم البيانات" | ||||
| msgstr "حجم البيانات المقروءة" | ||||
|  | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "اقرأ بايت واحدة " | ||||
| msgstr[1] "اقرأ بايتين" | ||||
| msgstr[2] "اقرأ %lu بايتات" | ||||
| msgstr[3] "اقرأ %lu بايت" | ||||
| msgstr[0] "قرأ صفر بايت من البيانات" | ||||
| msgstr[1] "قرأ بايت واحدة من البيانات" | ||||
| msgstr[2] "قرأ بايتين من البيانات" | ||||
| msgstr[3] "قرأ %lu بايتات من البيانات" | ||||
| msgstr[4] "قرأ %lu بايت من البيانات" | ||||
| msgstr[5] "قرأ %lu بايت من البيانات" | ||||
|  | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "كتابة بايت واحدة" | ||||
| msgstr[1] "كتابة بايتين" | ||||
| msgstr[2] "كتابة %d بايتات" | ||||
| msgstr[3] "كتابة %d بايت" | ||||
| msgstr[0] "كتب صفر بايت" | ||||
| msgstr[1] "كتب بايت واحدة" | ||||
| msgstr[2] "كتب بايتين" | ||||
| msgstr[3] "كتب %Id بايتات" | ||||
| msgstr[4] "كتب %Id بايت" | ||||
| msgstr[5] "كتب %Id بايت" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| @@ -57,7 +63,7 @@ msgstr "فعّل التنقيح" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "فعّل خرْج مسهِب" | ||||
| msgstr "فعّل الخرْج المسهِب" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| @@ -72,167 +78,127 @@ msgstr "استُحضرت من inetd " | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "شغّل '%s --help' لرؤية قائمة كاملة لخيارات سطر الأوامر.\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:27 | ||||
| #: ../sysdeps/sun4/siglist.c:27 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "علق" | ||||
| msgstr "علّق" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:28 | ||||
| #: ../sysdeps/sun4/siglist.c:28 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "قاطِع" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:29 | ||||
| #: ../sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "اخرج" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:30 | ||||
| #: ../sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "توجيه ممنوع" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:31 | ||||
| #: ../sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "فخ رسم" | ||||
| msgstr "تتبع الأثر" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:32 | ||||
| #: ../sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "اجهض" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:33 | ||||
| #: ../sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "خطأ EMT" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:34 | ||||
| #: ../sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "استثناء أرقام عشرية" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:35 | ||||
| #: ../sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "اقتل" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:36 | ||||
| #: ../sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "خطأ ناقل" | ||||
| msgstr "خطأ في ناقل" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:37 | ||||
| #: ../sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "انتهاك اﻻنقسام" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "متغيّر سيء لنداء النظام" | ||||
| msgstr "معطى سيء لنداء النظام" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:39 | ||||
| #: ../sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "أنبوب مكسور" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:40 | ||||
| #: ../sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "ساعة منبهة" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:41 | ||||
| #: ../sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "إنهاء" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "حالة عاجلة عند المقبس" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:43 | ||||
| #: ../sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "قف" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:44 | ||||
| #: ../sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "أوقف لوحة المفاتيح" | ||||
| msgstr "إيقاف من لوحة المفاتيح" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:45 | ||||
| #: ../sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "تابع" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "تغيرت حالة الابن" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "قراءة من tty في الخلفية" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "كتابة لـ 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" | ||||
| msgstr "دخْل/خرْج ممكن الآن" | ||||
| msgstr "الدخْل/الخرْج ممكن الآن" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:50 | ||||
| #: ../sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "تجاوز حد الـمعالج" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "تجاوز حد حجم الملف" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:52 | ||||
| #: ../sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "ساعة تنبيه تخيّلية" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:53 | ||||
| #: ../sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "كتابة لمحة عن ساعة التنبيه" | ||||
| msgstr "تشخيص ساعة التنبيه" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:54 | ||||
| #: ../sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "تغير حجم النافذة" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:55 | ||||
| #: ../sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "طلب معلومات" | ||||
|  | ||||
| #: ../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" | ||||
| msgstr "اشارة 1 معرفة من طرف المستخدم" | ||||
| msgstr "إشارة 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" | ||||
| msgstr "اشارة 2 معرفة من طرف المستخدم" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "DEBUG" | ||||
| #~ msgid "VERBOSE" | ||||
| #~ msgstr "VERBOSE" | ||||
| #~ msgid "NO-DAEMON" | ||||
| #~ msgstr "NO-DAEMON" | ||||
| #~ msgid "INETD" | ||||
| #~ msgstr "INETD" | ||||
| msgstr "إشارة 2 معرفة من طرف المستخدم" | ||||
|  | ||||
|   | ||||
							
								
								
									
										133
									
								
								po/cs.po
									
									
									
									
									
								
							
							
						
						
									
										133
									
								
								po/cs.po
									
									
									
									
									
								
							| @@ -1,23 +1,24 @@ | ||||
| # Czech translation of libgtop | ||||
| # Czech translation of libgtop. | ||||
| # This file is distributed under the same license as the libgtop package. | ||||
| # Copyright (C) 2004 Miloslav Trmac <mitr@volny.cz> | ||||
| # Miloslav Trmac <mitr@volny.cz>, 2002, 2003, 2004 | ||||
| # Copyright (C) 2004 Miloslav Trmac <mitr@volny.cz>. | ||||
| # Miloslav Trmac <mitr@volny.cz>, 2002, 2003, 2004. | ||||
| # Lucas Lommer <llommer@svn.gnome.org>, 2008. | ||||
| # Petr Kovar <pknbe@volny.cz>, 2008. | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop VERSION\n" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2005-09-25 18:15+0200\n" | ||||
| "PO-Revision-Date: 2005-01-02 15:10+0100\n" | ||||
| "Last-Translator: Miloslav Trmac <mitr@volny.cz>\n" | ||||
| "Language-Team: Czech <cs@li.org>\n" | ||||
| "POT-Creation-Date: 2008-02-11 19:20+0100\n" | ||||
| "PO-Revision-Date: 2008-02-11 19:17+0100\n" | ||||
| "Last-Translator: Petr Kovar <pknbe@volny.cz>\n" | ||||
| "Language-Team: Czech <gnome-cs-list@gnome.org>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" | ||||
| "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" | ||||
| "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" | ||||
|  | ||||
| #: lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| @@ -25,11 +26,11 @@ msgstr[0] "přečten %d bajt" | ||||
| msgstr[1] "přečteny %d bajty" | ||||
| msgstr[2] "přečteno %d bajtů" | ||||
|  | ||||
| #: lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "velikost přečtených dat" | ||||
|  | ||||
| #: lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| @@ -37,7 +38,7 @@ msgstr[0] "přečten %lu bajt dat" | ||||
| msgstr[1] "přečteny %lu bajty dat" | ||||
| msgstr[2] "přečteno %lu bajtů dat" | ||||
|  | ||||
| #: lib/write.c:52 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| @@ -45,167 +46,149 @@ msgstr[0] "zapsán %d bajt" | ||||
| msgstr[1] "zapsány %d bajty" | ||||
| msgstr[2] "zapsáno %d bajtů" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "Povolit ladění" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "LADĚNÍ" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "Povolit podrobný výstup" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "PODROBNĚ" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "Neforkovat do pozadí" | ||||
| msgstr "Nevětvit do pozadí" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "NE-DÉMON" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "Spuštěn z inetd" | ||||
| msgstr "Spuštěno z inetd" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "Chyba v přepínači %s: %s.\n" | ||||
| "Úplný seznam dostupných přepínačů zobrazíte spuštěním '%s --help'.\n" | ||||
| "Spusťte prosím \"%s --help\", chcete-li zobrazit všechny dostupné přepínače " | ||||
| "příkazové řádky.\n" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "Zavěšení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "Přerušení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "Konec" | ||||
| msgstr "Ukončení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "Neplatná instrukce" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "Trasovací zachycení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "Přerušení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "Chyba EMT" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "Výjimka v plovoucí řádové čárce" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "Zabití" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "Chyba sběrnice" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "Porušení segmentace" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "Špatný argument systémového volání" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "Přerušená roura" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "Alarm" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "Přerušení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "Urgentní stav soketu" | ||||
| msgstr "Urgentní stav socketu" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "Zastavení" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "Zastavení z klávesnice" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "Pokračování" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "Stav potomka se změnil" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "Čtení tty z pozadí" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "Zápis na tty z pozadí" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "I/O je nyní možné" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "Překročen limit CPU" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "Překročen limit velikosti souboru" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "Virtuální alarm" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "Profilovací alarm" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "Změna velikosti okna" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "Požadavek na informaci" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "Uživatelem definovaný signál 1" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Uživatelem definovaný signál 2" | ||||
|   | ||||
							
								
								
									
										115
									
								
								po/el.po
									
									
									
									
									
								
							
							
						
						
									
										115
									
								
								po/el.po
									
									
									
									
									
								
							| @@ -19,7 +19,7 @@ msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: el\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2005-09-25 18:15+0200\n" | ||||
| "POT-Creation-Date: 2008-03-16 17:03+0000\n" | ||||
| "PO-Revision-Date: 2005-02-18 13:40+0200\n" | ||||
| "Last-Translator: Kostas Papadimas <pkst@gnome.org>\n" | ||||
| "Language-Team: Greek <nls@tux.hellug.gr>\n" | ||||
| @@ -29,195 +29,188 @@ msgstr "" | ||||
| "Plural-Forms:  nplurals=2; plural=(n != 1);\n" | ||||
| "X-Generator: KBabel 1.3.1\n" | ||||
|  | ||||
| #: lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "ανάγνωση %d byte" | ||||
| msgstr[1] "ανάγνωση %d bytes" | ||||
|  | ||||
| #: lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "ανάγνωση μεγέθους δεδομένων" | ||||
|  | ||||
| #: lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "ανάγνωση %lu byte δεδομένων" | ||||
| msgstr[1] "ανάγνωση %lu bytes δεδομένων" | ||||
|  | ||||
| #: lib/write.c:52 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "εγγραφή %d byte" | ||||
| msgstr[1] "εγγραφή %d bytes" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "Ενεργοποίηση εκσφαλμάτωσης" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "ΕΚΣΦΑΛΜΑΤΩΣΗ" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "Ενεργοποίηση περιφραστικής εξόδου" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "VERBOSE" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "Να μη γίνει δικράνωση στο παρασκήνιο" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "ΧΩΡΊΣ-ΔΑΊΜΟΝΑ" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "Εκτελεσμένο από το inetd" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "Σφάλμα στην επιλογή %s: %s.\n" | ||||
| "Εκτελέστε '%s --help' για να δείτε μια πλήρη λίστα των διαθέσιμων επιλογών " | ||||
| "της γραμμής εντολών.\n" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "Αποτελμάτωση" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "Διακοπή" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "Έξοδος" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "Ακατάλληλη εντολή" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "Παγίδευση παρακολούθησης" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "Αποβολή" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "Σφάλμα EMT" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "Εξαίρεση κιν. υποδιαστολής" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "Σκότωμα" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "Σφάλμα διαύλου" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "Παραβίαση τμηματοποίησης" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "Ακατάλληλο όρισμα σε κλήση συστήματος" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "Διακοπείσα σωλήνωση" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "Ξυπνητήρι" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "Τερματισμός" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "Επείγουσα συνθήκη σε υποδοχέα" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "Διακοπή" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "Διακοπή πληκτρολογίου" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "Συνέχεια" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "Η κατάσταση θυγατρικής διεργασίας έχει αλλάξει" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "Ανάγνωση παρασκηνίου από tty" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "Εγγραφή παρασκηνίου σε tty" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "Η Ε/Ε είναι τώρα δυνατή" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "Το όριο ΚΜΕ έχει ξεπεραστεί" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "Το όριο μεγέθους αρχείου έχει ξεπεραστεί" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "Ιδεατό ξυπνητήρι" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "Έλεγχος απόδοσης ξυπνητηριού" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "Αλλαγή μεγέθους παραθύρου" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "Αίτηση πληροφορίας" | ||||
|  | ||||
| # sysdeps/names/procsignal.c:49 | ||||
| #: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "Σήμα 1 οριζόμενο από το χρήστη" | ||||
|  | ||||
| # sysdeps/names/procsignal.c:49 | ||||
| #: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Σήμα 2 οριζόμενο από το χρήστη" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "ΕΚΣΦΑΛΜΑΤΩΣΗ" | ||||
|  | ||||
| #~ msgid "VERBOSE" | ||||
| #~ msgstr "VERBOSE" | ||||
|  | ||||
| #~ msgid "NO-DAEMON" | ||||
| #~ msgstr "ΧΩΡΊΣ-ΔΑΊΜΟΝΑ" | ||||
|  | ||||
| #~ msgid "INETD" | ||||
| #~ msgstr "INETD" | ||||
|   | ||||
							
								
								
									
										19
									
								
								po/eu.po
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								po/eu.po
									
									
									
									
									
								
							| @@ -1,18 +1,18 @@ | ||||
| # translation of eu.po to Basque | ||||
| # translation of libgtop.HEAD.po to Basque | ||||
| # This file is distributed under the same license as the PACKAGE package. | ||||
| # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. | ||||
| # | ||||
| # Hizkuntza Politikarako Sailburuordetza <hizpol@ej-gv.es>, 2004. | ||||
| # Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>, 2004, 2005. | ||||
| # Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>, 2004, 2005, 2008. | ||||
| # Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2007. | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: eu\n" | ||||
| "Project-Id-Version: libgtop.HEAD\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-08-05 13:55+0200\n" | ||||
| "PO-Revision-Date: 2007-08-05 13:56+0200\n" | ||||
| "Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@zundan.com>\n" | ||||
| "Language-Team: Basque <eu@li.org>\n" | ||||
| "POT-Creation-Date: 2008-01-11 16:41+0100\n" | ||||
| "PO-Revision-Date: 2008-01-10 23:26+0100\n" | ||||
| "Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>\n" | ||||
| "Language-Team: Basque <itzulpena@euskalgnu.org>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| @@ -149,11 +149,11 @@ msgstr "Umearen egoera aldatu egin da" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "Irakurri tty atzeko planoan " | ||||
| msgstr "Irakurri tty atzeko planoan" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "Idatzi tty-en atzeko planoan " | ||||
| msgstr "Idatzi tty-en atzeko planoan" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| @@ -190,4 +190,3 @@ msgstr "Erabiltzaileak zehaztutako 1. seinalea" | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Erabiltzaileak zehaztutako 2. seinalea" | ||||
|  | ||||
|   | ||||
							
								
								
									
										118
									
								
								po/gl.po
									
									
									
									
									
								
							
							
						
						
									
										118
									
								
								po/gl.po
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| # translation of libgtop.gnome-2-10.po to Galego | ||||
| # translation of gl.po to Galego | ||||
| # Galician translation of libgtop. | ||||
| # Copyright (C) 1999, 2000 Jesus Bravo Alvarez | ||||
| # | ||||
| @@ -9,209 +9,193 @@ | ||||
| # | ||||
| # Se alguén me axuda coa revisión dalgunhas traduccións "pouco ortodoxas", | ||||
| # agradeceríallo. ;-) | ||||
| # | ||||
| # Jesus Bravo Alvarez <jba@pobox.com>, 1999, 2000. | ||||
| # Ignacio Casal Quinteiro <nacho.resa@gmail.com>, 2005. | ||||
| # | ||||
| # Ignacio Casal Quinteiro <icq@svn.gnome.org>, 2007. | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop.gnome-2-10\n" | ||||
| "Project-Id-Version: gl\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2006-12-04 15:52+0100\n" | ||||
| "PO-Revision-Date: 2005-06-13 17:22+0200\n" | ||||
| "Last-Translator: Ignacio Casal Quinteiro <nacho.resa@gmail.com>\n" | ||||
| "Language-Team: Galego\n" | ||||
| "POT-Creation-Date: 2007-11-28 15:25+0100\n" | ||||
| "PO-Revision-Date: 2007-11-28 15:25+0100\n" | ||||
| "Last-Translator: Ignacio Casal Quinteiro <icq@svn.gnome.org>\n" | ||||
| "Language-Team: Galego <proxecto@trasno.net>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "X-Generator: KBabel 1.9.1\n" | ||||
| "X-Generator: KBabel 1.11.4\n" | ||||
| "Plural-Forms:  nplurals=2; plural=(n != 1);\n" | ||||
|  | ||||
| #: ../lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "lido %d byte" | ||||
| msgstr[1] "lidos %d bytes" | ||||
|  | ||||
| #: ../lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "tamaño dos datos lidos" | ||||
|  | ||||
| #: ../lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "lido %lu byte de datos" | ||||
| msgstr[1] "lidos %lu bytes de datos" | ||||
|  | ||||
| #: ../lib/write.c:53 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "escrito %d byte" | ||||
| msgstr[1] "escritos %d bytes" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "Activar depuración" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "DEPURACIÓN" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "Activar saída detallada" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "DETALLADO" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "Non facer fork na tarefa de fondo" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "NON-DAEMON" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:466 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "Invocado desde inetd" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "Produciuse un erro na opción %s: %s.\n" | ||||
|        "Execute '%s --help' para ver unha lista completa das opcións de liña\n" | ||||
|        "de comandos dispoñibles.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "Execute '%s --help' para ver unha lista completa das opcións de liña\n" | ||||
| "de comandos dispoñibles.\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "Colgar" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "Interromper" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "Saír" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "Instrución ilegal" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "Captura do rastro" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "Interromper" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "Erro EMT" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "Excepción da coma flotante" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "Matar" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "Erro de bus" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "Erro de segmento" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "Argumento incorrecto na chamada ao sistema" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "Canalización danada" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "Reloxo de alarma" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "Finalización" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "Condición urxente no conectador" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "Deter" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "Detención co teclado" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "Continuar" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "O estado do fillo cambiou" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "Lectura en segundo plano do tty" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "Escritura en segundo plano ao tty" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "A E/S é posible agora" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "Límite de CPU excedido" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "Excedeuse o límite de tamaño do ficheiro" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "Reloxo de alarma virtual" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "Reloxo de alarma con perfil" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "Cambio do tamaño da ventá" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "Petición de Información" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "Sinal 1 definido polo usuario" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:59 ../sysdeps/sun4/siglist.c:59 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Sinal 2 definido polo usuario" | ||||
|  | ||||
|   | ||||
							
								
								
									
										12
									
								
								po/hu.po
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								po/hu.po
									
									
									
									
									
								
							| @@ -1,19 +1,19 @@ | ||||
| # Hungarian translation of libgtop. | ||||
| # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. | ||||
| # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. | ||||
| # This file is distributed under the same license as the libgtop package. | ||||
| # | ||||
| # Robert Vanyi <robi@mora.u-szeged.hu>, 2000, 2001. | ||||
| # Andras Timar <timar@gnome.hu>, 2002, 2003. | ||||
| # Laszlo Dvornik <dvornik@gnome.hu>, 2004. | ||||
| # Gabor Kelemen <kelemeng@gnome.hu>, 2004, 2005, 2007. | ||||
| # Gabor Kelemen <kelemeng@gnome.hu>, 2004, 2005, 2007, 2008. | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-05-14 03:41+0100\n" | ||||
| "PO-Revision-Date: 2007-09-13 23:08+0200\n" | ||||
| "POT-Creation-Date: 2007-09-13 23:10+0100\n" | ||||
| "PO-Revision-Date: 2008-03-09 22:02+0100\n" | ||||
| "Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n" | ||||
| "Language-Team: Hungarian <gnome@gnome.hu>\n" | ||||
| "Language-Team: Hungarian <gnome@fsf.hu>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| @@ -64,7 +64,7 @@ msgstr "inetd-ből indítva" | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "Futtassa a(z) \"%s --help\" parancsot a parancssori kapcsolók listájáért.\n" | ||||
| msgstr "Futtassa a(z) „%s --help” parancsot a parancssori kapcsolók listájáért.\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
|   | ||||
							
								
								
									
										2
									
								
								po/it.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/it.po
									
									
									
									
									
								
							| @@ -6,7 +6,7 @@ msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-10-03 14:34+0200\n" | ||||
| "POT-Creation-Date: 2007-10-02 23:18+0200\n" | ||||
| "PO-Revision-Date: 2007-10-02 23:18+0200\n" | ||||
| "Last-Translator: Alessio Frusciante <algol@firenze.linux.it>\n" | ||||
| "Language-Team: Italian <tp@lists.linux.it>\n" | ||||
|   | ||||
							
								
								
									
										124
									
								
								po/ko.po
									
									
									
									
									
								
							
							
						
						
									
										124
									
								
								po/ko.po
									
									
									
									
									
								
							| @@ -1,13 +1,13 @@ | ||||
| # libgtop ko.po | ||||
| # Sung-Hyun Nam <namsh@lgic.co.kr>, 1998 | ||||
| # Changwoo Ryu <cwryu@debian.org>, 2002, 2004, 2005. | ||||
| # Changwoo Ryu <cwryu@debian.org>, 2002, 2004, 2005, 2008. | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop 2.9.92\n" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2005-09-25 18:15+0200\n" | ||||
| "PO-Revision-Date: 2005-02-18 21:24+0900\n" | ||||
| "POT-Creation-Date: 2008-02-26 19:13+0900\n" | ||||
| "PO-Revision-Date: 2008-02-26 19:13+0900\n" | ||||
| "Last-Translator: Changwoo Ryu <cwryu@debian.org>\n" | ||||
| "Language-Team: GNOME Korea <gnome-kr-hackers@lists.kldp.net>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| @@ -15,189 +15,181 @@ msgstr "" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=1; plural=0;\n" | ||||
|  | ||||
| #: lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "%d바이트 읽음" | ||||
|  | ||||
| #: lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "데이타 크기 읽음" | ||||
|  | ||||
| #: lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "데이터 %lu바이트 읽음" | ||||
|  | ||||
| #: lib/write.c:52 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "%d바이트 씀" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "디버깅 사용" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "디버그" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "많은 출력 사용" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "VERBOSE" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "백그라운드로 실행 안 함" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "NO-DAEMON" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "inetd에 의해 불림" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "옵션 %s에 에러: %s.\n" | ||||
| "실행 가능한 명령행 옵션을 모두 보려면 '%s --help'라고 실행하십시오.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "사용할 수 있는 명령행 옵션을 모두 보려면 '%s --help'라고 실행하십시오.\n" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "끊어짐" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "인터럽트" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "끝내기" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "잘못된 기계명령" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "추적 트랩" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "중지" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "EMT 에러" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "실수연산 예외" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "죽임" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "버스 에러" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "세그먼테이션 위반" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "시스템 콜에 잘못된 인자" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "깨진 파이프" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "알람 클럭" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "Termination" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "소켓에 위급한 조건" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "중지" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "키보드 중지" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "계속" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "하위 프로세스 상태가 바뀌었습니다" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "tty에서 백그라운드 읽기" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "tty로 백그라운드 쓰기" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "I/O 이제 가능" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "CPU 한계 초과" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "파일 크기 한계 초과" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "가상 알람 클럭" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "Profiling 알람 클럭" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "창 크기 바뀜" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "정보 요청" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "사용자 정의 신호 1" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "사용자 정의 신호 2" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "디버그" | ||||
|  | ||||
| #~ msgid "VERBOSE" | ||||
| #~ msgstr "VERBOSE" | ||||
|  | ||||
| #~ msgid "NO-DAEMON" | ||||
| #~ msgstr "NO-DAEMON" | ||||
|  | ||||
| #~ msgid "INETD" | ||||
| #~ msgstr "INETD" | ||||
|   | ||||
							
								
								
									
										190
									
								
								po/mr.po
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										190
									
								
								po/mr.po
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,190 @@ | ||||
| # translation of libgtop.HEAD.mr.po to marathi | ||||
| # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||||
| # This file is distributed under the same license as the PACKAGE package. | ||||
| # | ||||
| # sandeep shedmake <sandeep.shedmake@gmail.com>, 2007. | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop.HEAD.mr\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-12-11 03:56+0000\n" | ||||
| "PO-Revision-Date: 2007-12-12 10:37+0530\n" | ||||
| "Last-Translator: sandeep shedmake <sandeep.shedmake@gmail.com>\n" | ||||
| "Language-Team: marathi\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=2; plural=(n!=1);\n\n" | ||||
| "\n" | ||||
| "X-Generator: KBabel 1.11.4\n" | ||||
|  | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "%d बाइट वाचा" | ||||
| msgstr[1] "%d बाइट वाचा" | ||||
|  | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "माहिती आकार वाचा" | ||||
|  | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "%lu बाइट माहिती वाचा" | ||||
| msgstr[1] "%lu बाइट माहिती वाचा" | ||||
|  | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "%d बाइट लिहीले" | ||||
| msgstr[1] "%d बाइट लिहीले" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "निर्धारण कार्यान्वीत करा" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "प्रदान वाचताजोगी करा" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "पार्श्वभूमीत विभाजीत करू नका" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "inetd पासून प्रेरीत" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "उपलब्ध आदेश ओळ पर्याय दर्शविण्याकरीता '%s --help' चालवा.\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "स्तब्ध" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "अडथळा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "बाहेर पडा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "अवैध सूचना" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "शोध जतन करा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "वगळा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "EMT त्रुटी" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "संख्यात्मक अपवाद" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "नष्ट करा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "बस त्रुटी" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "अनैतिक विभागणी" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "प्रणाली कार्यपध्दतीकरीता खराब बाब" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "अवैध पाईप" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "सूचनात्मक घड्याळ" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "वगळा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "सॉकेटवरील तातडीची परिस्थिती" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "थांबा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "कळफलक अकार्यान्वीत" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "पुढे जा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "उपकार्यांची स्थिती बदलली आहे" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "tty पासून पृष्ठभाग वाचन" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "tty कडे पृष्ठभाग लेखन" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "I/O आता शक्य आहे" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "CPU मर्यादा वाढल्या गेले" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "फाइल आकार मर्यादा पलीकडे" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "आभासी सूचनात्मक घड्याळ" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "सूचनात्मक घड्याळ संक्षिप्त चित्र बनवित आहे" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "चौकट आकार बदलवा" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "माहितीकरीता विनंती" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "वापरकर्ता व्याख्यीत संकेत 1" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "वापरकर्ता व्याख्यीत संकेत 2" | ||||
|  | ||||
							
								
								
									
										6
									
								
								po/nb.po
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								po/nb.po
									
									
									
									
									
								
							| @@ -1,15 +1,15 @@ | ||||
| # Norwegian translation for Libgtop (bokmål dialect) | ||||
| # Copyright (C) 1998-2004 Free Software Foundation, Inc. | ||||
| # Kjartan Maraas <kmaraas@gnome.org>, 1998-2004. | ||||
| # Kjartan Maraas <kmaraas@gnome.org>, 1998-2007. | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop 2.5.1\n" | ||||
| "Project-Id-Version: libgtop 2.21.x\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-06-23 11:52+0200\n" | ||||
| "PO-Revision-Date: 2007-06-23 11:52+0200\n" | ||||
| "Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n" | ||||
| "Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n" | ||||
| "Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8-bit\n" | ||||
|   | ||||
							
								
								
									
										131
									
								
								po/nn.po
									
									
									
									
									
								
							
							
						
						
									
										131
									
								
								po/nn.po
									
									
									
									
									
								
							| @@ -9,202 +9,195 @@ msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: nn\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2005-09-25 18:15+0200\n" | ||||
| "PO-Revision-Date: 2004-03-23 12:02+0100\n" | ||||
| "Last-Translator: Åsmund Skjæveland\n" | ||||
| "Language-Team: Norwegian Nynorsk <i18n-nn@lister.ping.uio.no>\n" | ||||
| "POT-Creation-Date: 2008-04-04 13:45+0200\n" | ||||
| "PO-Revision-Date: 2008-04-04 13:45+0200\n" | ||||
| "Last-Translator: Eskild Hustvedt <eskildh@gnome.org>\n" | ||||
| "Language-Team: Norwegian Nynorsk <i18n-no@lister.ping.uio.no>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "X-Generator: KBabel 1.3.1\n" | ||||
| "X-Generator: VIM\n" | ||||
| "Plural-Forms:  nplurals=2; plural=(n != 1);\n" | ||||
|  | ||||
| #: lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "las %d byte" | ||||
| msgstr[1] "las %d byte" | ||||
|  | ||||
| #: lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "lesestorleik på data" | ||||
|  | ||||
| #: lib/read_data.c:72 | ||||
| #, fuzzy, c-format | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "las %d byte" | ||||
| msgstr[1] "las %d byte" | ||||
| msgstr[0] "las %d byte data" | ||||
| msgstr[1] "las %d byte data" | ||||
|  | ||||
| #: lib/write.c:52 | ||||
| #, fuzzy, c-format | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "skriv %d byte" | ||||
| msgstr[1] "skriv %d byte" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "Skru på feilsøking" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "FEILSØK" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "Skru på ordrike utdata" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "ORDRIK" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "Ikkje fork av inn i bakgrunnen" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "UTAN-NISSE" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "Starta frå inetd" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "Feil på valet «%s»: %s.\n" | ||||
| "Køyr «%s --help» for å sjå full liste over tilgjengelege kommandlinjeval.\n" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "Legg på" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "Avbrot" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "Avslutt" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "Ulovleg instruksjon." | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "Sporingsfelle" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "Avbryt" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "EMT-feil" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "Flyttaluttrykk" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "Drep" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "Bussfeil" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "Segmenteringsovertramp" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "Ugyldig argument til systemkall" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "Brote røyr" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "Alarmklokke" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "Avlustting" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "Hastesituasjon på sokkelen" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "Stopp" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "Tastaturstopp" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "Fortset" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "Status på born er endra" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "Les frå tty i bakgrunnen" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "Skriv til tty i bakgrunnen" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "I/O no mogleg" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "CPU-grense passert" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "Filstorleikgrense passert" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "Virtuel alarmklokke" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "Profilerer alarmklokke" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "Endring i vindaugsstorleik" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "Informasjonsførespurnad" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "Eigendefinert 1" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Eigendefinert 2" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "FEILSØK" | ||||
|  | ||||
| #~ msgid "VERBOSE" | ||||
| #~ msgstr "ORDRIK" | ||||
|  | ||||
| #~ msgid "NO-DAEMON" | ||||
| #~ msgstr "UTAN-NISSE" | ||||
|  | ||||
| #~ msgid "INETD" | ||||
| #~ msgstr "INETD" | ||||
|   | ||||
							
								
								
									
										21
									
								
								po/oc.po
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								po/oc.po
									
									
									
									
									
								
							| @@ -1,16 +1,15 @@ | ||||
| # Occitan translation of libgtop. | ||||
| # Copyright (C) 1998-2004 Free Software Foundation, Inc. | ||||
| # Copyright (C) 1998-2004, 2007 Free Software Foundation, Inc. | ||||
| # This file is distributed under the GNU General Public License Version 2. | ||||
| # | ||||
| # Yannig MARCHEGAY (yannig@marchegay.org) - 2006-2007 | ||||
| # | ||||
| # Yannig Marchegay (Kokoyaya) <yannig@marchegay.org> - 2006-2007 | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop 2.9.91\n" | ||||
| "Project-Id-Version: oc\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-08-21 12:14+0100\n" | ||||
| "PO-Revision-Date: 2007-08-21 00:51+0200\n" | ||||
| "Last-Translator: Yannig MARCHEGAY (Kokoyaya) <yannig@marchegay.org>\n" | ||||
| "POT-Creation-Date: 2008-03-07 10:22+0100\n" | ||||
| "PO-Revision-Date: 2007-11-20 14:32+0100\n" | ||||
| "Last-Translator: Yannig Marchegay (Kokoyaya) <yannig@marchegay.org>\n" | ||||
| "Language-Team: Occitan (post 1500) <ubuntu-l10n-oci@lists.ubuntu.com>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| @@ -21,8 +20,8 @@ msgstr "" | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "" | ||||
| msgstr[1] "" | ||||
| msgstr[0] "a legit %d octet" | ||||
| msgstr[1] "a legits %d octets" | ||||
|  | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| @@ -39,8 +38,8 @@ msgstr[1] "" | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "" | ||||
| msgstr[1] "" | ||||
| msgstr[0] "a escrich %d octet" | ||||
| msgstr[1] "a escriches %d octets" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
|   | ||||
| @@ -10,8 +10,8 @@ msgstr "" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-07-21 14:34-0300\n" | ||||
| "PO-Revision-Date: 2007-07-21 14:37-0300\n" | ||||
| "Last-Translator: Og Maciel <ogmaciel@gnome.org>\n" | ||||
| "PO-Revision-Date: 2008-07-24 13:23-0300\n" | ||||
| "Last-Translator: Vladimir Melo <vladimirmelo.psi@gmail.com>\n" | ||||
| "Language-Team: Brazilian Portuguese <gnome-l10n-br@listas.cipsga.org.br>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| @@ -76,7 +76,7 @@ msgstr "Interromper" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "Encerrar" | ||||
| msgstr "Sair" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
|   | ||||
							
								
								
									
										115
									
								
								po/sk.po
									
									
									
									
									
								
							
							
						
						
									
										115
									
								
								po/sk.po
									
									
									
									
									
								
							| @@ -1,15 +1,13 @@ | ||||
| # libgtop sk.po | ||||
| # Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||||
| # Marcel Telka <marcel@telka.sk>, 2001, 2002, 2003, 2004. | ||||
| # | ||||
| # $Id$ | ||||
| # Copyright (C) 2001, 2002, 2003, 2004, 2008 Free Software Foundation, Inc. | ||||
| # Marcel Telka <marcel@telka.sk>, 2001, 2002, 2003, 2004, 2008. | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2005-09-25 18:15+0200\n" | ||||
| "PO-Revision-Date: 2004-12-29 10:21+0100\n" | ||||
| "POT-Creation-Date: 2008-03-06 22:12+0100\n" | ||||
| "PO-Revision-Date: 2008-03-06 22:12+0100\n" | ||||
| "Last-Translator: Marcel Telka <Marcel@telka.sk>\n" | ||||
| "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| @@ -17,7 +15,7 @@ msgstr "" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=3; plural= (n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n" | ||||
|  | ||||
| #: lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| @@ -25,11 +23,11 @@ msgstr[0] "načítaných %d bajtov" | ||||
| msgstr[1] "načítaný %d bajt" | ||||
| msgstr[2] "načítané %d bajty" | ||||
|  | ||||
| #: lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "veľkosť načítaných dát" | ||||
|  | ||||
| #: lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| @@ -37,7 +35,7 @@ msgstr[0] "načítaných %lu bajtov dát" | ||||
| msgstr[1] "načítaný %lu bajt dát" | ||||
| msgstr[2] "načítané %lu bajty dát" | ||||
|  | ||||
| #: lib/write.c:52 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| @@ -45,168 +43,149 @@ msgstr[0] "zapísaných %d bajtov" | ||||
| msgstr[1] "zapísaný %d bajt" | ||||
| msgstr[2] "zapísané %d bajty" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "Povoliť ladenie" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "LADENIE" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "Povoliť detailný výpis" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "DETAILNE" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "Nerozvetvuj sa do pozadia" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "NO-DAEMON" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "Vyvolaný cez inetd" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "Chyba vo voľbe %s: %s.\n" | ||||
| "Výpis všetkých dostupných volieb príkazového riadku získate spustením '%s --" | ||||
| "help'.\n" | ||||
| "Spustite '%s --help', aby ste videli úplný zoznam dostupných volieb " | ||||
| "príkazového riadku.\n" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "Zavesenie" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "Prerušenie" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "Ukončiť" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "Neplatná inštrukcia" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "Ladiaci bod" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "Prerušiť" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "Chyba EMT" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "Výnimka pri práci s pohyblivou rádovou čiarkou" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "Zabiť" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "Chyba na spoji" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "Chyba segmentácie" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "Nesprávny argument v systémvom volaní" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "Prerušená rúra" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "Budík" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "Ukončenie" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "Naliehavá situácia na zásuvke" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "Zastaviť" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "Prerušenie klávesnice" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "Pokračovanie" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "Stav potomka bol zmenený" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "Čítanie z tty na pozadí" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "Zápis do tty na pozadí" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "V/V je možné" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "Prekročený limit procesora" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "Prekročený limit veľkosti súboru" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "Virtuálny budík" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "Nastavenie budíka" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "Zmena veľkosti okna" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "Požiadavka na informáciu" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "Používateľom definovaný signál 1" | ||||
|  | ||||
| #: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Používateľom definovaný signál 2" | ||||
|   | ||||
							
								
								
									
										57
									
								
								po/sl.po
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								po/sl.po
									
									
									
									
									
								
							| @@ -1,30 +1,29 @@ | ||||
| # Slovenian translation of libgtop | ||||
| # Copyright (C) 2000 Free Software Foundation, Inc. | ||||
| # Andraz Tori <andraz.tori1@guest.arnes.si>, 2000. | ||||
| # Matic Žgur <mr.zgur@gmail.com>, 2006. | ||||
| # Matej Urbančič <matej.urban@gmail.com>, 2007. | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop\n" | ||||
| "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop&component=general\n" | ||||
| "POT-Creation-Date: 2009-04-17 10:18+0000\n" | ||||
| "PO-Revision-Date: 2009-10-19 09:59+0100\n" | ||||
| "Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2007-05-14 03:41+0100\n" | ||||
| "PO-Revision-Date: 2007-10-18 16:10+0100\n" | ||||
| "Last-Translator: Matej Urbančič <matej.urban@gmail.com>\n" | ||||
| "Language-Team: Slovenian <sl@li.org>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3\n" | ||||
| "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" | ||||
| "X-Poedit-Language: Slovenian\n" | ||||
|  | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "prebran %d bajt" | ||||
| msgstr[1] "prebrana %d bajta" | ||||
| msgstr[2] "prebrani %d bajti" | ||||
| msgstr[3] "prebranih %d bajtov" | ||||
| msgstr[0] "prebranih %d bajtov" | ||||
| msgstr[1] "prebran %d bajt" | ||||
| msgstr[2] "prebrana %d bajta" | ||||
| msgstr[3] "prebrani %d bajti" | ||||
|  | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| @@ -34,19 +33,19 @@ msgstr "prebrana velikost podatkov" | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "prebran %lu bajt podatkov" | ||||
| msgstr[1] "prebrana %lu bajta podatkov" | ||||
| msgstr[2] "prebrani %lu bajti podatkov" | ||||
| msgstr[3] "prebranih %lu bajtov podatkov" | ||||
| msgstr[0] "prebranih %lu bajtov podatkov" | ||||
| msgstr[1] "prebran %lu bajt podatkov" | ||||
| msgstr[2] "prebrana %lu bajta podatkov" | ||||
| msgstr[3] "prebrani %lu bajti podatkov" | ||||
|  | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "zapisan %d bajt" | ||||
| msgstr[1] "zapisana %d bajta" | ||||
| msgstr[2] "zapisani %d bajti" | ||||
| msgstr[3] "zapisanih %d bajtov" | ||||
| msgstr[0] "zapisanih %d bajtov" | ||||
| msgstr[1] "zapisan %d bajt" | ||||
| msgstr[2] "zapisana %d bajta" | ||||
| msgstr[3] "zapisani %d bajti" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| @@ -54,7 +53,7 @@ msgstr "Vključi razhroščevanje" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "Vključi zgovoren izhod" | ||||
| msgstr "Vključi podroben izpis" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Don't fork into background" | ||||
| @@ -67,7 +66,7 @@ msgstr "Poklican iz programa inetd" | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "Zaženite '%s --help', če želite videti popoln seznam možnosti ukazne vrstice.\n" | ||||
| msgstr "Z zastavico '%s --help' se izpiše popoln seznam možnosti ukaza.\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:27 | ||||
| #: ../sysdeps/sun4/siglist.c:27 | ||||
| @@ -87,7 +86,7 @@ msgstr "Izhod" | ||||
| #: ../sysdeps/osf1/siglist.c:30 | ||||
| #: ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "Neveljavn ukaz" | ||||
| msgstr "Neveljaven ukaz" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:31 | ||||
| #: ../sysdeps/sun4/siglist.c:31 | ||||
| @@ -122,12 +121,12 @@ msgstr "Napaka vodila" | ||||
| #: ../sysdeps/osf1/siglist.c:37 | ||||
| #: ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "Segmentacijska kršitev" | ||||
| msgstr "Segmentacijska napaka" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:38 | ||||
| #: ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "Slab argument sistemskemu klicu" | ||||
| msgstr "Nepravilen argument za sistemski klic" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:39 | ||||
| #: ../sysdeps/sun4/siglist.c:39 | ||||
| @@ -157,7 +156,7 @@ msgstr "Ustavi" | ||||
| #: ../sysdeps/osf1/siglist.c:44 | ||||
| #: ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "Ustavitev s tipkovnice" | ||||
| msgstr "Zaustavitev tipkovnice" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:45 | ||||
| #: ../sysdeps/sun4/siglist.c:45 | ||||
| @@ -167,7 +166,7 @@ msgstr "Nadaljuj" | ||||
| #: ../sysdeps/osf1/siglist.c:46 | ||||
| #: ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "Stanje otroka se je spremenilo" | ||||
| msgstr "Stanje podrejenega procesa se je spremenilo" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:47 | ||||
| #: ../sysdeps/sun4/siglist.c:47 | ||||
| @@ -182,7 +181,7 @@ msgstr "Pisanje na tty v ozadju" | ||||
| #: ../sysdeps/osf1/siglist.c:49 | ||||
| #: ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "V/I sedaj možen" | ||||
| msgstr "V/I sedaj mogoč" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:50 | ||||
| #: ../sysdeps/sun4/siglist.c:50 | ||||
| @@ -217,12 +216,12 @@ msgstr "Zahteva po podatkih" | ||||
| #: ../sysdeps/osf1/siglist.c:56 | ||||
| #: ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "Uporabniško definiran signal 1" | ||||
| msgstr "Uporabniško določen signal 1" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:57 | ||||
| #: ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "Uporabniško definiran signal 2" | ||||
| msgstr "Uporabniško določen signal 2" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "RAZHROŠČUJ" | ||||
|   | ||||
							
								
								
									
										116
									
								
								po/zh_HK.po
									
									
									
									
									
								
							
							
						
						
									
										116
									
								
								po/zh_HK.po
									
									
									
									
									
								
							| @@ -4,10 +4,10 @@ | ||||
| #  | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop 2.9.92\n" | ||||
| "Project-Id-Version: libgtop 2.2.5\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2006-06-26 23:04+0800\n" | ||||
| "PO-Revision-Date: 2006-06-26 23:06+0800\n" | ||||
| "POT-Creation-Date: 2008-02-14 20:10+0800\n" | ||||
| "PO-Revision-Date: 2008-02-14 20:12+0800\n" | ||||
| "Last-Translator: Abel Cheung <abel@oaka.org>\n" | ||||
| "Language-Team: Chinese (Hong Kong) <community@linuxhall.org>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| @@ -15,189 +15,181 @@ msgstr "" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=1; plural=0;\n" | ||||
|  | ||||
| #: ../lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "讀入 %d 位元組" | ||||
|  | ||||
| #: ../lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "讀入資料大小" | ||||
|  | ||||
| #: ../lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "讀入 %lu 位元組的資料" | ||||
|  | ||||
| #: ../lib/write.c:53 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "寫入 %d 位元組" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "啟用偵錯功能" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "偵錯" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "顯示詳細的輸出訊息" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "詳細訊息" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "不要放置於背景執行" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "NO-DAEMON" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:466 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "透過 inetd 執行" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "選項 %s 發生錯誤:%s。\n" | ||||
| "請執行‘%s --help’查看完整的指令列選項清單。\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "請執行‘%s --help’查看完整的指令列選項清單。\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "掛斷 (Hangup)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "中斷 (Interrupt)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "退出 (Quit)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "不合法硬件指示" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "TRAP 硬件錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "不正常中止" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "EMT 硬件錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "浮點數運算出現例外情況" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "強行中止 (Kill)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "匯流排錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "記憶體區段錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "系統函數參數錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "管線中斷" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "系統時鐘訊號" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "強行中止 (Term)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "socket 緊急情況" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "暫停進程" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "鍵盤停止" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "繼續進程" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "副進程狀態已改變" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "背景進程從 tty 讀入資料" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "背景進程向 tty 輸出資料" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "可重新進行輸入/輸出" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "超過 CPU 限制" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "超過檔案大小限制" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "虛擬時鐘訊號" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "效能測試計時器週期結束" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "更改視窗尺寸" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "要求進程資訊" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "用戶自定訊號 1" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:59 ../sysdeps/sun4/siglist.c:59 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "用戶自定訊號 2" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "偵錯" | ||||
|  | ||||
| #~ msgid "VERBOSE" | ||||
| #~ msgstr "詳細訊息" | ||||
|  | ||||
| #~ msgid "NO-DAEMON" | ||||
| #~ msgstr "NO-DAEMON" | ||||
|  | ||||
| #~ msgid "INETD" | ||||
| #~ msgstr "INETD" | ||||
|   | ||||
							
								
								
									
										113
									
								
								po/zh_TW.po
									
									
									
									
									
								
							
							
						
						
									
										113
									
								
								po/zh_TW.po
									
									
									
									
									
								
							| @@ -4,10 +4,10 @@ | ||||
| #  | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: libgtop 2.9.92\n" | ||||
| "Project-Id-Version: libgtop 2.2.5\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2006-06-26 23:04+0800\n" | ||||
| "PO-Revision-Date: 2006-06-26 23:04+0800\n" | ||||
| "POT-Creation-Date: 2008-02-14 20:10+0800\n" | ||||
| "PO-Revision-Date: 2008-02-14 23:04+0800\n" | ||||
| "Last-Translator: Abel Cheung <abel@oaka.org>\n" | ||||
| "Language-Team: Chinese (Taiwan) <community@linuxhall.org>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| @@ -15,189 +15,182 @@ msgstr "" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=1; plural=0;\n" | ||||
|  | ||||
| #: ../lib/read.c:65 | ||||
| #: ../lib/read.c:51 | ||||
| #, c-format | ||||
| msgid "read %d byte" | ||||
| msgid_plural "read %d bytes" | ||||
| msgstr[0] "讀入 %d 位元組" | ||||
|  | ||||
| #: ../lib/read_data.c:53 | ||||
| #: ../lib/read_data.c:51 | ||||
| msgid "read data size" | ||||
| msgstr "讀入資料大小" | ||||
|  | ||||
| #: ../lib/read_data.c:72 | ||||
| #: ../lib/read_data.c:70 | ||||
| #, c-format | ||||
| msgid "read %lu byte of data" | ||||
| msgid_plural "read %lu bytes of data" | ||||
| msgstr[0] "讀入 %lu 位元組的資料" | ||||
|  | ||||
| #: ../lib/write.c:53 | ||||
| #: ../lib/write.c:51 | ||||
| #, c-format | ||||
| msgid "wrote %d byte" | ||||
| msgid_plural "wrote %d bytes" | ||||
| msgstr[0] "寫入 %d 位元組" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| #: ../src/daemon/gnuserv.c:458 | ||||
| msgid "Enable debugging" | ||||
| msgstr "啟用偵錯功能" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:460 | ||||
| msgid "DEBUG" | ||||
| msgstr "偵錯" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "Enable verbose output" | ||||
| msgstr "顯示詳細的輸出訊息" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:462 | ||||
| msgid "VERBOSE" | ||||
| msgstr "詳細訊息" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "Don't fork into background" | ||||
| msgstr "不要放置於背景執行" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:464 | ||||
| msgid "NO-DAEMON" | ||||
| msgstr "NO-DAEMON" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:466 | ||||
| msgid "Invoked from inetd" | ||||
| msgstr "透過 inetd 執行" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:466 | ||||
| msgid "INETD" | ||||
| msgstr "INETD" | ||||
|  | ||||
| #: ../src/daemon/gnuserv.c:500 | ||||
| #: ../src/daemon/gnuserv.c:498 | ||||
| #, c-format | ||||
| msgid "" | ||||
| "Error on option %s: %s.\n" | ||||
| "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgid "Run '%s --help' to see a full list of available command line options.\n" | ||||
| msgstr "" | ||||
| "選項 %s 發生錯誤:%s。\n" | ||||
| "請執行‘%s --help’查看完整的指令列選項清單。\n" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| #: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27 | ||||
| msgid "Hangup" | ||||
| msgstr "掛斷 (Hangup)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| #: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28 | ||||
| msgid "Interrupt" | ||||
| msgstr "中斷 (Interrupt)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| #: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29 | ||||
| msgid "Quit" | ||||
| msgstr "退出 (Quit)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| #: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30 | ||||
| msgid "Illegal instruction" | ||||
| msgstr "不合法硬體指示" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| #: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31 | ||||
| msgid "Trace trap" | ||||
| msgstr "TRAP 硬體錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| #: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32 | ||||
| msgid "Abort" | ||||
| msgstr "不正常中止" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| #: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33 | ||||
| msgid "EMT error" | ||||
| msgstr "EMT 硬體錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| #: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34 | ||||
| msgid "Floating-point exception" | ||||
| msgstr "浮點數運算出現例外情況" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| #: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35 | ||||
| msgid "Kill" | ||||
| msgstr "強行中止 (Kill)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| #: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36 | ||||
| msgid "Bus error" | ||||
| msgstr "匯流排錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| #: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37 | ||||
| msgid "Segmentation violation" | ||||
| msgstr "記憶體區段錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| #: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38 | ||||
| msgid "Bad argument to system call" | ||||
| msgstr "系統函式參數錯誤" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| #: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39 | ||||
| msgid "Broken pipe" | ||||
| msgstr "管線中斷" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| #: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40 | ||||
| msgid "Alarm clock" | ||||
| msgstr "系統時鐘訊號" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| #: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41 | ||||
| msgid "Termination" | ||||
| msgstr "強行中止 (Term)" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| #: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42 | ||||
| msgid "Urgent condition on socket" | ||||
| msgstr "socket 緊急情況" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| #: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43 | ||||
| msgid "Stop" | ||||
| msgstr "暫停進程" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| #: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44 | ||||
| msgid "Keyboard stop" | ||||
| msgstr "鍵盤停止" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| #: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45 | ||||
| msgid "Continue" | ||||
| msgstr "繼續進程" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| #: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46 | ||||
| msgid "Child status has changed" | ||||
| msgstr "副進程狀態已改變" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| #: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47 | ||||
| msgid "Background read from tty" | ||||
| msgstr "背景進程從 tty 讀入資料" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| #: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48 | ||||
| msgid "Background write to tty" | ||||
| msgstr "背景進程向 tty 輸出資料" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| #: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49 | ||||
| msgid "I/O now possible" | ||||
| msgstr "可重新進行輸入/輸出" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| #: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50 | ||||
| msgid "CPU limit exceeded" | ||||
| msgstr "超過 CPU 限制" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| #: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51 | ||||
| msgid "File size limit exceeded" | ||||
| msgstr "超過檔案大小限制" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| #: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52 | ||||
| msgid "Virtual alarm clock" | ||||
| msgstr "虛擬時鐘訊號" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| #: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53 | ||||
| msgid "Profiling alarm clock" | ||||
| msgstr "效能測試計時器週期結束" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| #: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54 | ||||
| msgid "Window size change" | ||||
| msgstr "更改視窗尺寸" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| #: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55 | ||||
| msgid "Information request" | ||||
| msgstr "要求進程資訊" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58 | ||||
| #: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56 | ||||
| msgid "User defined signal 1" | ||||
| msgstr "用戶自定訊號 1" | ||||
|  | ||||
| #: ../sysdeps/osf1/siglist.c:59 ../sysdeps/sun4/siglist.c:59 | ||||
| #: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57 | ||||
| msgid "User defined signal 2" | ||||
| msgstr "用戶自定訊號 2" | ||||
|  | ||||
| #~ msgid "DEBUG" | ||||
| #~ msgstr "偵錯" | ||||
|  | ||||
| #~ msgid "VERBOSE" | ||||
| #~ msgstr "詳細訊息" | ||||
|  | ||||
| #~ msgid "NO-DAEMON" | ||||
| #~ msgstr "NO-DAEMON" | ||||
|  | ||||
| #~ msgid "INETD" | ||||
| #~ msgstr "INETD" | ||||
|   | ||||
| @@ -27,7 +27,7 @@ void | ||||
| do_output (int s, glibtop_response *resp, off_t offset, | ||||
| 	   size_t data_size, const void *data) | ||||
| { | ||||
| #ifdef REAL_DEBUG | ||||
| #ifdef DEBUG | ||||
| 	fprintf (stderr, "Really writing %d bytes at offset %lu.\n", | ||||
| 		 sizeof (glibtop_response), offset); | ||||
| #endif | ||||
| @@ -44,7 +44,7 @@ do_output (int s, glibtop_response *resp, off_t offset, | ||||
| 	} | ||||
|  | ||||
| 	if (resp->data_size) { | ||||
| #ifdef REAL_DEBUG | ||||
| #ifdef DEBUG | ||||
| 		fprintf (stderr, "Writing %d bytes of data.\n", resp->data_size); | ||||
| #endif | ||||
|  | ||||
| @@ -88,7 +88,7 @@ do_read (int s, void *ptr, size_t total_size) | ||||
| 		tmp_ptr += nread; | ||||
| 		ptr = tmp_ptr; | ||||
|  | ||||
| #ifdef REAL_DEBUG | ||||
| #ifdef DEBUG | ||||
| 		fprintf (stderr, "READ (%d): %d - %d - %d\n", | ||||
| 			 nread, already_read, remaining, total_size); | ||||
| #endif | ||||
|   | ||||
| @@ -53,6 +53,7 @@ GLIBTOP_SUID_PROC_MAP + | ||||
| GLIBTOP_SUID_NETLOAD + | ||||
| GLIBTOP_SUID_NETLIST + | ||||
| GLIBTOP_SUID_PROC_WD + | ||||
| GLIBTOP_SUID_PROC_AFFINITY + | ||||
| GLIBTOP_SUID_PPP; | ||||
|  | ||||
| #include <fcntl.h> | ||||
|   | ||||
| @@ -2,4 +2,4 @@ | ||||
| SUBDIRS			= common @sysdeps_dir@ | ||||
|  | ||||
| DIST_SUBDIRS		= bsd common linux osf1 \ | ||||
| 			  stub stub_suid sun4 freebsd solaris aix | ||||
| 			  stub stub_suid sun4 freebsd solaris aix darwin | ||||
|   | ||||
| @@ -3,11 +3,18 @@ INCLUDES			= @INCLUDES@ | ||||
|  | ||||
| noinst_LTLIBRARIES		= libgtop_common-2.0.la libgtop_suid_common-2.0.la | ||||
|  | ||||
| if !LIBGTOP_SYSDEPS_PRIVATE_MOUNTLIST | ||||
| mountlist_src = mountlist.c | ||||
| endif | ||||
|  | ||||
| if !LIBGTOP_SYSDEPS_PRIVATE_FSUSAGE | ||||
| fsusage_src = fsusage.c | ||||
| endif | ||||
|  | ||||
| libgtop_common_2_0_la_SOURCES	= error.c gnuslib.c \ | ||||
| 				  fsusage.c \ | ||||
|                                   mountlist.c \ | ||||
|                                   procargs.c \ | ||||
| 				  default.c | ||||
| 				  default.c \ | ||||
| 				  $(mountlist_src) $(fsusage_src) | ||||
|  | ||||
| # libgtop_common_2_0_la_LDFLAGS	= $(LT_VERSION_INFO) | ||||
| libgtop_common_2_0_la_LIBADD	= $(LIBGTOP_EXTRA_LIBS) | ||||
|   | ||||
| @@ -368,3 +368,17 @@ glibtop_get_proc_wd(glibtop_proc_wd *buf, pid_t pid) | ||||
| } | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * glibtop_get_proc_affinity: | ||||
|  * @buf: | ||||
|  * @pid: Process id to get the affinity | ||||
|  * | ||||
|  * Get the processor affinity list for a process | ||||
|  * | ||||
|  * Returns: A list of processor ID of 'buf.number' elements. | ||||
|  */ | ||||
| guint16 * | ||||
| glibtop_get_proc_affinity(glibtop_proc_affinity *buf, pid_t pid) | ||||
| { | ||||
| 	return glibtop_get_proc_affinity_l(glibtop_global_server, buf, pid); | ||||
| } | ||||
|   | ||||
| @@ -554,6 +554,7 @@ static gboolean ignore_mount_entry(const struct mount_entry *me) | ||||
| 		"openpromfs", | ||||
| 		"proc", | ||||
| 		"procfs", | ||||
| 		"rpc_pipefs", | ||||
| 		"securityfs", | ||||
| 		"supermount", | ||||
| 		"sysfs", | ||||
|   | ||||
							
								
								
									
										16
									
								
								sysdeps/darwin/Makefile.am
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								sysdeps/darwin/Makefile.am
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| INCLUDES			= @INCLUDES@ @LIBGTOP_INCS@ | ||||
|  | ||||
| noinst_LTLIBRARIES			= libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la | ||||
|  | ||||
| libgtop_sysdeps_2_0_la_SOURCES	= nosuid.c siglist.c sysinfo.c | ||||
|  | ||||
| libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c \ | ||||
| cpu.c mem.c swap.c uptime.c loadavg.c shm_limits.c msg_limits.c \ | ||||
| sem_limits.c proclist.c procstate.c procuid.c proctime.c \ | ||||
| procmem.c procsignal.c prockernel.c procsegment.c procargs.c \ | ||||
| procmap.c netload.c ppp.c netlist.c procopenfiles.c procwd.c | ||||
|  | ||||
| libgtopinclude_HEADERS		= glibtop_server.h glibtop_machine.h | ||||
| libgtopincludedir		= $(includedir)/libgtop-2.0 | ||||
|  | ||||
| noinst_HEADERS			= glibtop_suid.h | ||||
							
								
								
									
										27
									
								
								sysdeps/darwin/close.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								sysdeps/darwin/close.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <glibtop/close.h> | ||||
|  | ||||
| /* Closes pipe to gtop server. */ | ||||
|  | ||||
| void | ||||
| glibtop_close_p (glibtop *server) | ||||
| { } | ||||
							
								
								
									
										26
									
								
								sysdeps/darwin/close_suid.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								sysdeps/darwin/close_suid.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <glibtop/close.h> | ||||
|  | ||||
| /* Closes pipe to gtop server. */ | ||||
|  | ||||
| void | ||||
| glibtop_close_p (glibtop *server) | ||||
| { } | ||||
							
								
								
									
										91
									
								
								sysdeps/darwin/cpu.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								sysdeps/darwin/cpu.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,91 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/cpu.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/vm_map.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_cpu = | ||||
| (1L << GLIBTOP_CPU_TOTAL)  + (1L << GLIBTOP_CPU_USER) + | ||||
| (1L << GLIBTOP_CPU_NICE)   + (1L << GLIBTOP_CPU_SYS) + | ||||
| (1L << GLIBTOP_CPU_IDLE)   + (1L << GLIBTOP_CPU_FREQUENCY) + | ||||
| (1L << GLIBTOP_XCPU_TOTAL) + (1L << GLIBTOP_XCPU_USER) + | ||||
| (1L << GLIBTOP_XCPU_NICE)  + (1L << GLIBTOP_XCPU_SYS) + | ||||
| (1L << GLIBTOP_XCPU_IDLE); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_cpu_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.cpu = _glibtop_sysdeps_cpu; | ||||
| } | ||||
|  | ||||
| /* Provides information about cpu usage. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf) | ||||
| { | ||||
| 	processor_cpu_load_info_data_t *pinfo; | ||||
| 	mach_msg_type_number_t info_count; | ||||
| 	natural_t processor_count; | ||||
| 	int i; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_CPU), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_cpu)); | ||||
|  | ||||
| 	if (host_processor_info (mach_host_self (), | ||||
| 				 PROCESSOR_CPU_LOAD_INFO, | ||||
| 				 &processor_count, | ||||
| 				 (processor_info_array_t*)&pinfo, | ||||
| 				 &info_count)) { | ||||
| 		glibtop_warn_io_r (server, "host_processor_info (cpu)"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	for (i = 0; i < server->ncpu; i++) { | ||||
| 		buf->xcpu_user [i] = pinfo[i].cpu_ticks [CPU_STATE_USER]; | ||||
| 		buf->xcpu_sys  [i] = pinfo[i].cpu_ticks [CPU_STATE_SYSTEM]; | ||||
| 		buf->xcpu_idle [i] = pinfo[i].cpu_ticks [CPU_STATE_IDLE]; | ||||
| 		buf->xcpu_nice [i] = pinfo[i].cpu_ticks [CPU_STATE_NICE]; | ||||
| 		buf->xcpu_total[i] = buf->xcpu_user [i] + buf->xcpu_sys  [i] + | ||||
| 				     buf->xcpu_idle [i] + buf->xcpu_nice [i]; | ||||
|  | ||||
| 		buf->user  += buf->xcpu_user [i]; | ||||
| 		buf->sys   += buf->xcpu_sys  [i]; | ||||
| 		buf->idle  += buf->xcpu_idle [i]; | ||||
| 		buf->nice  += buf->xcpu_nice [i]; | ||||
| 		buf->total += buf->xcpu_total[i]; | ||||
| 	} | ||||
| 	vm_deallocate (mach_task_self (), (vm_address_t) pinfo, info_count); | ||||
|  | ||||
| 	buf->frequency = 100; | ||||
| 	buf->flags = _glibtop_sysdeps_cpu; | ||||
| } | ||||
|  | ||||
| @@ -1,9 +1,5 @@ | ||||
| /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ | ||||
| 
 | ||||
| /* Copyright (C) 1998-99 Martin Baulig
 | ||||
|    This file is part of LibGTop 1.0. | ||||
| 
 | ||||
|    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998. | ||||
| /*
 | ||||
|    This file is part of LibGTop 2.0. | ||||
| 
 | ||||
|    LibGTop is free software; you can redistribute it and/or modify it | ||||
|    under the terms of the GNU General Public License as published by | ||||
| @@ -21,16 +17,19 @@ | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
| 
 | ||||
| #ifndef __GLIBTOP_SERVER_PRIVATE_H__ | ||||
| #define __GLIBTOP_SERVER_PRIVATE_H__ | ||||
| #ifndef __GLIBTOP_MACHINE_H__ | ||||
| #define __GLIBTOP_MACHINE_H__ | ||||
| 
 | ||||
| #include <glib.h> | ||||
| G_BEGIN_DECLS | ||||
| 
 | ||||
| typedef struct _glibtop_server_private glibtop_server_private; | ||||
| typedef struct _glibtop_machine		glibtop_machine; | ||||
| 
 | ||||
| struct _glibtop_server_private | ||||
| struct _glibtop_machine | ||||
| { | ||||
|     GSList *backend_list; | ||||
| 	uid_t uid, euid;		/* Real and effective user id */ | ||||
| 	gid_t gid, egid;		/* Real and effective group id */ | ||||
| }; | ||||
| 
 | ||||
| G_END_DECLS | ||||
| 
 | ||||
| #endif | ||||
							
								
								
									
										50
									
								
								sysdeps/darwin/glibtop_server.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								sysdeps/darwin/glibtop_server.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #ifndef __GLIBTOP_SERVER_H__ | ||||
| #define __GLIBTOP_SERVER_H__ | ||||
|  | ||||
| G_BEGIN_DECLS | ||||
|  | ||||
| #define GLIBTOP_SUID_CPU		(1 << GLIBTOP_SYSDEPS_CPU) | ||||
| #define GLIBTOP_SUID_MEM		(1 << GLIBTOP_SYSDEPS_MEM) | ||||
| #define GLIBTOP_SUID_SWAP		(1 << GLIBTOP_SYSDEPS_SWAP) | ||||
| #define GLIBTOP_SUID_UPTIME		(1 << GLIBTOP_SYSDEPS_UPTIME) | ||||
| #define GLIBTOP_SUID_LOADAVG		(1 << GLIBTOP_SYSDEPS_LOADAVG) | ||||
| #define GLIBTOP_SUID_SHM_LIMITS		(1 << GLIBTOP_SYSDEPS_SHM_LIMITS) | ||||
| #define GLIBTOP_SUID_MSG_LIMITS		(1 << GLIBTOP_SYSDEPS_MSG_LIMITS) | ||||
| #define GLIBTOP_SUID_SEM_LIMITS		(1 << GLIBTOP_SYSDEPS_SEM_LIMITS) | ||||
| #define GLIBTOP_SUID_PROCLIST		(1 << GLIBTOP_SYSDEPS_PROCLIST) | ||||
| #define GLIBTOP_SUID_PROC_STATE		(1 << GLIBTOP_SYSDEPS_PROC_STATE) | ||||
| #define GLIBTOP_SUID_PROC_UID		(1 << GLIBTOP_SYSDEPS_PROC_UID) | ||||
| #define GLIBTOP_SUID_PROC_MEM		(1 << GLIBTOP_SYSDEPS_PROC_MEM) | ||||
| #define GLIBTOP_SUID_PROC_TIME		(1 << GLIBTOP_SYSDEPS_PROC_TIME) | ||||
| #define GLIBTOP_SUID_PROC_SIGNAL	(1 << GLIBTOP_SYSDEPS_PROC_SIGNAL) | ||||
| #define GLIBTOP_SUID_PROC_KERNEL	(1 << GLIBTOP_SYSDEPS_PROC_KERNEL) | ||||
| #define GLIBTOP_SUID_PROC_SEGMENT	(1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) | ||||
| #define GLIBTOP_SUID_PROC_ARGS		(1 << GLIBTOP_SYSDEPS_PROC_ARGS) | ||||
| #define GLIBTOP_SUID_PROC_MAP		(1 << GLIBTOP_SYSDEPS_PROC_MAP) | ||||
| #define GLIBTOP_SUID_NETLOAD		(1 << GLIBTOP_SYSDEPS_NETLOAD) | ||||
| #define GLIBTOP_SUID_NETLIST		0 | ||||
| #define GLIBTOP_SUID_PPP		(1 << GLIBTOP_SYSDEPS_PPP) | ||||
| #define GLIBTOP_SUID_PROC_WD		(1 << GLIBTOP_SYSDEPS_PROC_WD) | ||||
|  | ||||
| G_END_DECLS | ||||
|  | ||||
| #endif | ||||
							
								
								
									
										44
									
								
								sysdeps/darwin/glibtop_suid.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								sysdeps/darwin/glibtop_suid.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,44 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #ifndef __GLIBTOP_SUID_H__ | ||||
| #define __GLIBTOP_SUID_H__ | ||||
|  | ||||
| G_BEGIN_DECLS | ||||
|  | ||||
| static inline void glibtop_suid_enter (glibtop *server) { | ||||
| 	setreuid (server->machine.uid, server->machine.euid); | ||||
| }; | ||||
|  | ||||
| static inline void glibtop_suid_leave (glibtop *server) { | ||||
| 	if (setreuid (server->machine.euid, server->machine.uid)) | ||||
| 		_exit (1); | ||||
| }; | ||||
|  | ||||
| void | ||||
| glibtop_init_p (glibtop *server, const unsigned long features, | ||||
| 		const unsigned flags); | ||||
| void | ||||
| glibtop_open_p (glibtop *server, const char *program_name, | ||||
| 		const unsigned long features, | ||||
| 		const unsigned flags); | ||||
|  | ||||
| G_END_DECLS | ||||
|  | ||||
| #endif | ||||
							
								
								
									
										65
									
								
								sysdeps/darwin/loadavg.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								sysdeps/darwin/loadavg.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/loadavg.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <stdlib.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_loadavg = | ||||
| (1L << GLIBTOP_LOADAVG_LOADAVG); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_loadavg_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.loadavg = _glibtop_sysdeps_loadavg; | ||||
| } | ||||
|  | ||||
| /* Provides load averange. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf) | ||||
| { | ||||
| 	double ldavg[3]; | ||||
| 	int i; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_LOADAVG), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_loadavg)); | ||||
|  | ||||
| 	if (getloadavg (ldavg, 3) != 3) { | ||||
| 		glibtop_warn_io_r (server, "getloadavg"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	/* fill in the struct */ | ||||
| 	buf->flags = _glibtop_sysdeps_loadavg; | ||||
| 	for (i = 0; i < 3; i++) { | ||||
| 		buf->loadavg [i] = ldavg [i]; | ||||
| 	} | ||||
| } | ||||
|  | ||||
							
								
								
									
										70
									
								
								sysdeps/darwin/mem.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								sysdeps/darwin/mem.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/mem.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/host_info.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_mem = | ||||
| (1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) + | ||||
| (1L << GLIBTOP_MEM_FREE); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_mem_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.mem = _glibtop_sysdeps_mem; | ||||
| } | ||||
|  | ||||
| /* Provides information about memory usage. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_mem_p (glibtop *server, glibtop_mem *buf) | ||||
| { | ||||
| 	vm_statistics_data_t vm_info; | ||||
| 	mach_msg_type_number_t info_count; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MEM), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_mem)); | ||||
|  | ||||
| 	info_count = HOST_VM_INFO_COUNT; | ||||
| 	if (host_statistics (mach_host_self (), HOST_VM_INFO, | ||||
| 			     (host_info_t)&vm_info, &info_count)) { | ||||
| 		glibtop_warn_io_r (server, "host_statistics (vm_statistics)"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	buf->total = (vm_info.active_count + vm_info.inactive_count + | ||||
| 		      vm_info.free_count + vm_info.wire_count) * vm_page_size; | ||||
| 	buf->free = vm_info.free_count   * vm_page_size; | ||||
| 	buf->used = buf->total - buf->free; | ||||
| 	buf->flags = _glibtop_sysdeps_mem; | ||||
| } | ||||
|  | ||||
							
								
								
									
										47
									
								
								sysdeps/darwin/msg_limits.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								sysdeps/darwin/msg_limits.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/msg_limits.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_msg_limits = 0; | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_msg_limits_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits; | ||||
| } | ||||
|  | ||||
| /* Provides information about sysv ipc limits. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) | ||||
| { | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_msg_limits)); | ||||
| } | ||||
							
								
								
									
										66
									
								
								sysdeps/darwin/netlist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								sysdeps/darwin/netlist.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <glibtop/netlist.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include <net/if.h> | ||||
|  | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_netlist = (1 << GLIBTOP_NETLIST_NUMBER); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_netlist_s (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.netlist = _glibtop_sysdeps_netlist; | ||||
| } | ||||
|  | ||||
|  | ||||
| char** | ||||
| glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf) | ||||
| { | ||||
| 	struct if_nameindex *ifstart, *ifs; | ||||
| 	GPtrArray *devices; | ||||
|  | ||||
| 	glibtop_init_s (&server, GLIBTOP_SYSDEPS_NETLIST, 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_netlist)); | ||||
|  | ||||
| 	ifs = ifstart = if_nameindex(); | ||||
|  | ||||
| 	devices = g_ptr_array_new(); | ||||
|  | ||||
| 	while(ifs && ifs->if_name) { | ||||
| 		g_ptr_array_add(devices, g_strdup(ifs->if_name)); | ||||
| 		buf->number++; | ||||
| 		ifs++; | ||||
| 	} | ||||
|  | ||||
| 	if_freenameindex(ifstart); | ||||
|  | ||||
| 	buf->flags = _glibtop_sysdeps_netlist; | ||||
|  | ||||
| 	g_ptr_array_add(devices, NULL); | ||||
|  | ||||
| 	return (char **) g_ptr_array_free(devices, FALSE); | ||||
| } | ||||
|  | ||||
							
								
								
									
										165
									
								
								sysdeps/darwin/netload.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										165
									
								
								sysdeps/darwin/netload.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,165 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/netload.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/types.h> | ||||
| #include <sys/sysctl.h> | ||||
| #include <sys/socket.h> | ||||
| #include <net/if.h> | ||||
| #include <net/if_dl.h> | ||||
| #include <net/route.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_netload = | ||||
| (1L << GLIBTOP_NETLOAD_IF_FLAGS) + | ||||
| (1L << GLIBTOP_NETLOAD_MTU) + | ||||
| /* (1L << GLIBTOP_NETLOAD_SUBNET) + */ | ||||
| /* (1L << GLIBTOP_NETLOAD_ADDRESS) + */ | ||||
| (1L << GLIBTOP_NETLOAD_PACKETS_IN) + | ||||
| (1L << GLIBTOP_NETLOAD_PACKETS_OUT) + | ||||
| (1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) + | ||||
| (1L << GLIBTOP_NETLOAD_BYTES_IN) + | ||||
| (1L << GLIBTOP_NETLOAD_BYTES_OUT) + | ||||
| (1L << GLIBTOP_NETLOAD_BYTES_TOTAL) + | ||||
| (1L << GLIBTOP_NETLOAD_ERRORS_IN) + | ||||
| (1L << GLIBTOP_NETLOAD_ERRORS_OUT) + | ||||
| (1L << GLIBTOP_NETLOAD_ERRORS_TOTAL) + | ||||
| (1L << GLIBTOP_NETLOAD_COLLISIONS); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_netload_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.netload = _glibtop_sysdeps_netload; | ||||
| } | ||||
|  | ||||
| /* Provides Network statistics. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, | ||||
| 		       const char *interface) | ||||
| { | ||||
| 	int mib[] = { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 }; | ||||
| 	size_t bufsize; | ||||
| 	char *rtbuf, *ptr, *eob; | ||||
| 	struct if_msghdr *ifm; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_NETLOAD), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_netload)); | ||||
|  | ||||
| 	if (sysctl (mib, 6, NULL, &bufsize, NULL, 0) < 0) | ||||
| 		return; | ||||
|  | ||||
| 	rtbuf = (char*)g_malloc (bufsize); | ||||
| 	if (rtbuf == NULL) | ||||
| 		return; | ||||
|  | ||||
| 	if (sysctl (mib, 6, rtbuf, &bufsize, NULL, 0) < 0) { | ||||
| 		g_free (rtbuf); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	eob = rtbuf + bufsize; | ||||
| 	ptr = rtbuf; | ||||
| 	while (ptr < eob) { | ||||
| 		struct sockaddr_dl *sdl; | ||||
|  | ||||
| 		ifm = (struct if_msghdr*) ptr; | ||||
|  | ||||
| 		if (ifm->ifm_type != RTM_IFINFO) | ||||
| 			break; | ||||
| 		ptr += ifm->ifm_msglen; | ||||
|  | ||||
| 		while (ptr < eob) { | ||||
| 			struct if_msghdr *nextifm = (struct if_msghdr*) ptr; | ||||
|  | ||||
| 			if (nextifm->ifm_type != RTM_NEWADDR) | ||||
| 				break; | ||||
| 			ptr += nextifm->ifm_msglen; | ||||
| 		} | ||||
|  | ||||
| 		sdl = (struct sockaddr_dl*) (ifm + 1); | ||||
| 		if (sdl->sdl_family != AF_LINK) | ||||
| 			continue; | ||||
| 		if (strlen (interface) != sdl->sdl_nlen) | ||||
| 			continue; | ||||
| 		if (strcmp (interface, sdl->sdl_data) == 0) | ||||
| 			goto FOUND; | ||||
| 	} | ||||
| 	g_free (rtbuf); | ||||
| 	return; | ||||
|  | ||||
| FOUND: | ||||
| 	if (ifm->ifm_flags & IFF_UP) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_UP; | ||||
| 	if (ifm->ifm_flags & IFF_BROADCAST) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_BROADCAST; | ||||
| 	if (ifm->ifm_flags & IFF_DEBUG) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_DEBUG; | ||||
| 	if (ifm->ifm_flags & IFF_LOOPBACK) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_LOOPBACK; | ||||
| 	if (ifm->ifm_flags & IFF_POINTOPOINT) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_POINTOPOINT; | ||||
| 	if (ifm->ifm_flags & IFF_RUNNING) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_RUNNING; | ||||
| 	if (ifm->ifm_flags & IFF_NOARP) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_NOARP; | ||||
| 	if (ifm->ifm_flags & IFF_NOARP) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_PROMISC; | ||||
| 	if (ifm->ifm_flags & IFF_ALLMULTI) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_ALLMULTI; | ||||
| 	if (ifm->ifm_flags & IFF_OACTIVE) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_OACTIVE; | ||||
| 	if (ifm->ifm_flags & IFF_SIMPLEX) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_SIMPLEX; | ||||
| 	if (ifm->ifm_flags & IFF_LINK0) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_LINK0; | ||||
| 	if (ifm->ifm_flags & IFF_LINK1) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_LINK1; | ||||
| 	if (ifm->ifm_flags & IFF_LINK2) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_LINK2; | ||||
| 	if (ifm->ifm_flags & IFF_ALTPHYS) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_ALTPHYS; | ||||
| 	if (ifm->ifm_flags & IFF_MULTICAST) | ||||
| 		buf->if_flags |= GLIBTOP_IF_FLAGS_MULTICAST; | ||||
| 	buf->mtu		= ifm->ifm_data.ifi_mtu; | ||||
| 	buf->subnet		= 0; /* FIXME */ | ||||
| 	buf->address		= 0; /* FIXME */ | ||||
| 	buf->packets_in		= ifm->ifm_data.ifi_ipackets; | ||||
| 	buf->packets_out	= ifm->ifm_data.ifi_opackets; | ||||
| 	buf->packets_total	= buf->packets_in + buf->packets_out; | ||||
| 	buf->bytes_in		= ifm->ifm_data.ifi_ibytes; | ||||
| 	buf->bytes_out		= ifm->ifm_data.ifi_obytes; | ||||
| 	buf->bytes_total	= buf->bytes_in + buf->bytes_out; | ||||
| 	buf->errors_in		= ifm->ifm_data.ifi_ierrors; | ||||
| 	buf->errors_out		= ifm->ifm_data.ifi_oerrors; | ||||
| 	buf->errors_total	= buf->errors_in + buf->errors_out; | ||||
| 	buf->collisions		= ifm->ifm_data.ifi_collisions; | ||||
| 	buf->flags		= _glibtop_sysdeps_netload; | ||||
| 	g_free (buf); | ||||
| } | ||||
							
								
								
									
										55
									
								
								sysdeps/darwin/nosuid.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								sysdeps/darwin/nosuid.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/cpu.h> | ||||
| #include <glibtop/open.h> | ||||
|  | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_interface.h> | ||||
|  | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| void | ||||
| glibtop_open_s (glibtop *server, const char *program_name, | ||||
| 		const unsigned long features, const unsigned flags) | ||||
| { | ||||
| 	processor_cpu_load_info_data_t *pinfo; | ||||
| 	mach_msg_type_number_t info_count;    | ||||
| 	natural_t processor_count; | ||||
|  | ||||
| 	if (host_processor_info (mach_host_self (), | ||||
| 		PROCESSOR_CPU_LOAD_INFO, | ||||
| 		&processor_count, | ||||
| 		(processor_info_array_t*)&pinfo, | ||||
| 		&info_count)) { | ||||
| 		glibtop_error_io_r (server, "host_processor_info"); | ||||
| 	} | ||||
| 	server->ncpu = (processor_count <= GLIBTOP_NCPU) ? | ||||
| 		processor_count : GLIBTOP_NCPU; | ||||
| 	vm_deallocate (mach_task_self (), (vm_address_t) pinfo, info_count); | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_close_s (glibtop *server) | ||||
| { } | ||||
							
								
								
									
										98
									
								
								sysdeps/darwin/open.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								sysdeps/darwin/open.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/cpu.h> | ||||
| #include <glibtop/open.h> | ||||
|  | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_interface.h> | ||||
|  | ||||
| #include <glibtop/init_hooks.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include <unistd.h> | ||||
|  | ||||
| /* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| void | ||||
| glibtop_init_p (glibtop *server, const unsigned long features, | ||||
| 		const unsigned flags) | ||||
| { | ||||
| 	const _glibtop_init_func_t *init_fkt; | ||||
|  | ||||
| 	if (server == NULL) | ||||
| 		glibtop_error_r (NULL, "glibtop_init_p (server == NULL)"); | ||||
|  | ||||
| 	/* Do the initialization, but only if not already initialized. */ | ||||
|  | ||||
| 	if ((server->flags & _GLIBTOP_INIT_STATE_INIT) == 0) { | ||||
| 		glibtop_open_p (server, "glibtop", features, flags); | ||||
|  | ||||
| 		for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++) | ||||
| 			(*init_fkt) (server); | ||||
|  | ||||
| 		server->flags |= _GLIBTOP_INIT_STATE_INIT; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_open_p (glibtop *server, const char *program_name, | ||||
| 		const unsigned long features, const unsigned flags) | ||||
| { | ||||
|         processor_cpu_load_info_data_t *pinfo; | ||||
|         mach_msg_type_number_t info_count; | ||||
|         natural_t processor_count; | ||||
|  | ||||
| 	/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| 	server->name = program_name; | ||||
|  | ||||
| 	server->machine.uid = getuid (); | ||||
| 	server->machine.euid = geteuid (); | ||||
| 	server->machine.gid = getgid (); | ||||
| 	server->machine.egid = getegid (); | ||||
|  | ||||
| 	/* Drop priviledges. */	 | ||||
|  | ||||
| 	if (setreuid (server->machine.euid, server->machine.uid)) | ||||
| 		_exit (1); | ||||
|  | ||||
| 	if (setregid (server->machine.egid, server->machine.gid)) | ||||
| 		_exit (1); | ||||
| 	 | ||||
| 	/* !!! END OF SUID ROOT PART !!! */ | ||||
|  | ||||
| 	/* Our effective uid is now those of the user invoking the server, | ||||
| 	 * so we do no longer have any priviledges. */ | ||||
|  | ||||
| 	if (host_processor_info (mach_host_self (), | ||||
| 		PROCESSOR_CPU_LOAD_INFO, | ||||
| 		&processor_count, | ||||
| 		(processor_info_array_t*)&pinfo, | ||||
| 		&info_count)) { | ||||
| 		glibtop_error_io_r (server, "host_processor_info"); | ||||
| 	} | ||||
| 	server->ncpu = (processor_count <= GLIBTOP_NCPU) ? | ||||
| 		processor_count : GLIBTOP_NCPU; | ||||
| 	vm_deallocate (mach_task_self (), (vm_address_t) pinfo, info_count); | ||||
| } | ||||
							
								
								
									
										47
									
								
								sysdeps/darwin/ppp.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								sysdeps/darwin/ppp.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/ppp.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_ppp = 0; | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_ppp_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.ppp = _glibtop_sysdeps_ppp; | ||||
| } | ||||
|  | ||||
| /* Provides PPP/ISDN information. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device) | ||||
| { | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PPP), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_ppp)); | ||||
| } | ||||
							
								
								
									
										130
									
								
								sysdeps/darwin/procargs.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										130
									
								
								sysdeps/darwin/procargs.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,130 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procargs.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h> | ||||
| #include <limits.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_args = | ||||
| (1L << GLIBTOP_PROC_ARGS_SIZE); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_args_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_args = _glibtop_sysdeps_proc_args; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| char * | ||||
| glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, | ||||
| 			 pid_t pid, unsigned max_len) | ||||
| { | ||||
| 	char argbuf[4096]; | ||||
| 	char *start, *end, *str; | ||||
| 	size_t bufsize = 4096; | ||||
| 	int mib [3]; | ||||
| 	unsigned length; | ||||
| 	char *args; | ||||
| 	int *ip; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_ARGS), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_args)); | ||||
|  | ||||
| 	mib [0] = CTL_KERN; | ||||
| 	mib [1] = KERN_PROCARGS; | ||||
| 	mib [2] = pid; | ||||
| 	 | ||||
| 	/* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| 	glibtop_suid_enter (server); | ||||
| 	if (sysctl (mib, 3, argbuf, &bufsize, NULL, 0) < 0) { | ||||
| 		glibtop_suid_leave (server); | ||||
| 		return NULL; | ||||
| 	} | ||||
| 	glibtop_suid_leave (server); | ||||
|  | ||||
| 	/* !!! END OF SUID ROOT PART !!! */ | ||||
|  | ||||
|     	end = &argbuf[bufsize]; | ||||
|  | ||||
| 	ip = (int *)end - 2; | ||||
| 	while (*--ip) { | ||||
| 		if (ip == (int *)argbuf) { | ||||
| 			return NULL; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	start = (char *)(ip + 1); | ||||
| 	while (*--ip) { | ||||
| 		if (ip == (int *)argbuf) { | ||||
| 			return NULL; | ||||
| 		} | ||||
| 	} | ||||
| 	ip++; | ||||
|  | ||||
|         if ((ip[0] & 0xbfff0000) == 0xbfff0000) { | ||||
| 		ip += 2; | ||||
| 		start = (char*)(ip + (strlen ((char*)ip) + 3) / 4); | ||||
| 		while (!*start) | ||||
| 			start++; | ||||
| 	} | ||||
|  | ||||
| 	for (str = start + strlen (start); str < end - 1; str++) { | ||||
| 		if (*str == '=') { | ||||
| 			while (*str != '\0' && str > start) | ||||
| 				str--; | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| 	end = str; | ||||
|  | ||||
| 	if (start[0] == '-' || start[0] == '?' || start[0] <= ' ') { | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	length = end - start; | ||||
| 	if (max_len != 0 && length > max_len) | ||||
| 		length = max_len; | ||||
| 	args = g_malloc(length + 1); | ||||
| 	if (args == NULL) { | ||||
| 		glibtop_warn_io_r (server, "malloc(procargs)"); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	memcpy (args, start, length); | ||||
| 	args [length] = '\0'; | ||||
|  | ||||
| 	buf->size = length; | ||||
| 	buf->flags = _glibtop_sysdeps_proc_args; | ||||
|  | ||||
| 	return args; | ||||
| } | ||||
| @@ -1,10 +1,6 @@ | ||||
| /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ | ||||
| 
 | ||||
| /* Copyright (C) 1998-99 Martin Baulig
 | ||||
| /*
 | ||||
|    This file is part of LibGTop 2.0. | ||||
| 
 | ||||
|    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998. | ||||
| 
 | ||||
|    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, | ||||
| @@ -22,36 +18,31 @@ | ||||
| */ | ||||
| 
 | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| #include <glibtop.h> | ||||
| #include <glibtop-server-private.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/prockernel.h> | ||||
| 
 | ||||
| glibtop_server * | ||||
| glibtop_server_new (void) | ||||
| { | ||||
|     glibtop_server *retval; | ||||
| #include <glibtop_suid.h> | ||||
| 
 | ||||
|     retval = g_new0 (glibtop_server, 1); | ||||
|     retval->info = g_new0 (glibtop_server_info, 1); | ||||
|     retval->_priv = g_new0 (glibtop_server_private, 1); | ||||
|     retval->refcount = 1; | ||||
| static const unsigned long _glibtop_sysdeps_proc_kernel = 0; | ||||
| 
 | ||||
|     return retval; | ||||
| } | ||||
| /* Init function. */ | ||||
| 
 | ||||
| void | ||||
| glibtop_server_ref (glibtop_server *server) | ||||
| _glibtop_init_proc_kernel_p (glibtop *server) | ||||
| { | ||||
|     server->refcount++; | ||||
| 	server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel; | ||||
| } | ||||
| 
 | ||||
| /* Provides detailed information about a process. */ | ||||
| 
 | ||||
| void | ||||
| glibtop_server_unref (glibtop_server *server) | ||||
| glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, | ||||
| 			   pid_t pid) | ||||
| { | ||||
|     server->refcount--; | ||||
| 
 | ||||
|     if (server->refcount <= 0) { | ||||
| 	g_free (server->_priv); | ||||
| 	g_free (server->info); | ||||
| 	g_free (server); | ||||
|     } | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_KERNEL), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_kernel)); | ||||
| } | ||||
							
								
								
									
										104
									
								
								sysdeps/darwin/proclist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								sysdeps/darwin/proclist.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,104 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/proclist.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h>   | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proclist = | ||||
| (1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) + | ||||
| (1L << GLIBTOP_PROCLIST_SIZE); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proclist_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proclist = _glibtop_sysdeps_proclist; | ||||
| } | ||||
|  | ||||
| pid_t * | ||||
| glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, | ||||
| 			int64_t which, int64_t arg) | ||||
| { | ||||
| 	unsigned count, total, i; | ||||
| 	pid_t *pids_chain; | ||||
| 	int mib[4]; | ||||
| 	struct kinfo_proc *kp; | ||||
| 	size_t length; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROCLIST), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proclist)); | ||||
|  | ||||
| 	mib [0] = CTL_KERN; | ||||
| 	mib [1] = KERN_PROC; | ||||
| 	mib [2] = (int)(which & GLIBTOP_KERN_PROC_MASK); | ||||
| 	mib [3] = (int)arg; | ||||
|  | ||||
| 	if (sysctl (mib, 4, NULL, &length, NULL, 0) < 0) { | ||||
| 		glibtop_warn_io_r (server, "sysctl (proclist)"); | ||||
| 		return NULL; | ||||
| 	} | ||||
| 	if ((kp = (struct kinfo_proc *) g_malloc(length)) == NULL) { | ||||
| 		glibtop_warn_io_r (server, "malloc (proclist)"); | ||||
| 		return NULL; | ||||
| 	} | ||||
| 	if (sysctl (mib, 4, kp, &length, NULL, 0) < 0) { | ||||
| 		glibtop_warn_io_r (server, "sysctl (proclist)"); | ||||
| 		g_free (kp); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	count = length / sizeof (struct kinfo_proc); | ||||
| 	pids_chain = g_malloc(count * sizeof (unsigned)); | ||||
| 	if (pids_chain ==  NULL) { | ||||
| 		glibtop_warn_io_r (server, "g_realloc (proclist)"); | ||||
| 		g_free (kp); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	for (total = 0, i = 0; i < count; i++) { | ||||
| 		if ((which & GLIBTOP_EXCLUDE_IDLE) && | ||||
| 		    (kp [i].kp_proc.p_stat != SRUN)) | ||||
| 			continue; | ||||
| 		if ((which & GLIBTOP_EXCLUDE_SYSTEM) && | ||||
| 			 (kp [i].kp_eproc.e_pcred.p_ruid == 0)) | ||||
| 			continue; | ||||
| 		pids_chain [total++] = (unsigned) kp [i].kp_proc.p_pid; | ||||
| 	} | ||||
|  | ||||
| 	g_free (kp); | ||||
|  | ||||
| 	buf->number = total; | ||||
| 	buf->size = sizeof (unsigned); | ||||
| 	buf->total = total * sizeof (unsigned); | ||||
| 	buf->flags = _glibtop_sysdeps_proclist; | ||||
|  | ||||
| 	return pids_chain; | ||||
| } | ||||
|  | ||||
							
								
								
									
										134
									
								
								sysdeps/darwin/procmap.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										134
									
								
								sysdeps/darwin/procmap.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,134 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procmap.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/vm_map.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_map = | ||||
| (1L << GLIBTOP_PROC_MAP_TOTAL) + (1L << GLIBTOP_PROC_MAP_NUMBER) + | ||||
| (1L << GLIBTOP_PROC_MAP_SIZE); | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_map_entry = | ||||
| (1L << GLIBTOP_MAP_ENTRY_START) + (1L << GLIBTOP_MAP_ENTRY_END) + | ||||
| (1L << GLIBTOP_MAP_ENTRY_OFFSET) + (1L << GLIBTOP_MAP_ENTRY_PERM); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_map_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| glibtop_map_entry * | ||||
| glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,	pid_t pid) | ||||
| { | ||||
| 	glibtop_map_entry *maps; | ||||
| 	mach_port_t task; | ||||
| 	vm_address_t address; | ||||
| 	natural_t nesting_depth; | ||||
| 	int n; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MAP), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_map)); | ||||
|  | ||||
| 	/* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| 	glibtop_suid_enter (server); | ||||
|  | ||||
| 	if (task_for_pid (mach_task_self (), pid, &task) != KERN_SUCCESS) { | ||||
| 		glibtop_suid_leave (server); | ||||
| 		glibtop_warn_io_r (server, "task_for_pid (procmap)"); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	maps = NULL; | ||||
| 	n = 0; | ||||
| 	address = 0; | ||||
| 	nesting_depth = 0; | ||||
| 	while (1) { | ||||
| 		vm_region_submap_info_data_64_t info; | ||||
| 		mach_msg_type_number_t info_count; | ||||
| 		vm_size_t size; | ||||
|  | ||||
| 		info_count = VM_REGION_SUBMAP_INFO_COUNT_64; | ||||
| 		if (vm_region_recurse_64 (task, &address, &size, &nesting_depth, | ||||
| 			(vm_region_recurse_info_64_t)&info, &info_count)) | ||||
| 			break; | ||||
|  | ||||
| 		if (info.is_submap) { | ||||
| 			nesting_depth++; | ||||
| 			continue; | ||||
| 		} | ||||
|  | ||||
| 		maps = g_realloc (maps, (n + 1) * sizeof (glibtop_map_entry)); | ||||
| 		if (!maps) { | ||||
| 			glibtop_suid_leave (server); | ||||
| 			return NULL; | ||||
| 		} | ||||
|  | ||||
| 		memset (maps + n, 0, sizeof (glibtop_map_entry)); | ||||
|  | ||||
| 		maps[n].start	= address; | ||||
| 		maps[n].end	= address + size - 1; | ||||
| 		maps[n].offset	= info.offset; | ||||
| 		if (info.protection & VM_PROT_READ) | ||||
| 			maps[n].perm |= GLIBTOP_MAP_PERM_READ; | ||||
| 		if (info.protection & VM_PROT_WRITE)  | ||||
| 			maps[n].perm |= GLIBTOP_MAP_PERM_WRITE; | ||||
| 		if (info.protection & VM_PROT_EXECUTE)       | ||||
| 			maps[n].perm |= GLIBTOP_MAP_PERM_EXECUTE; | ||||
| 		if (info.share_mode == SM_PRIVATE || | ||||
| 		    info.share_mode == SM_PRIVATE_ALIASED) | ||||
| 			maps[n].perm |= GLIBTOP_MAP_PERM_PRIVATE; | ||||
| 		if (info.share_mode == SM_SHARED || | ||||
| 		    info.share_mode == SM_TRUESHARED || | ||||
| 		    info.share_mode == SM_SHARED_ALIASED) | ||||
| 			maps[n].perm |= GLIBTOP_MAP_PERM_SHARED; | ||||
|  | ||||
| 		maps[n].flags	= _glibtop_sysdeps_proc_map_entry; | ||||
|  | ||||
| 		address += size; | ||||
| 		n++; | ||||
| 	} | ||||
|  | ||||
| 	glibtop_suid_leave (server); | ||||
|  | ||||
| 	/* !!! END OF SUID ROOT PART !!! */ | ||||
|  | ||||
| 	buf->number	= n; | ||||
| 	buf->size	= sizeof (glibtop_map_entry); | ||||
| 	buf->total	= n * sizeof (glibtop_map_entry); | ||||
| 	buf->flags	= _glibtop_sysdeps_proc_map; | ||||
|  | ||||
| 	return maps; | ||||
| } | ||||
							
								
								
									
										245
									
								
								sysdeps/darwin/procmem.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										245
									
								
								sysdeps/darwin/procmem.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,245 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procmem.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/mach_traps.h> | ||||
| #include <mach/task.h> | ||||
| #include <mach/vm_map.h> | ||||
| #include <mach/shared_memory_server.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_mem = | ||||
| (1L << GLIBTOP_PROC_MEM_SIZE)     + (1L << GLIBTOP_PROC_MEM_VSIZE) + | ||||
| (1L << GLIBTOP_PROC_MEM_RESIDENT) + (1L << GLIBTOP_PROC_MEM_SHARE) + | ||||
| (1L << GLIBTOP_PROC_MEM_RSS); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_mem_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem; | ||||
| } | ||||
|  | ||||
|  | ||||
| #define	SHARED_TABLE_SIZE	137 | ||||
| #define	TEXT_SEGMENT_START	(GLOBAL_SHARED_TEXT_SEGMENT) | ||||
| #define TEXT_SEGMENT_END	(GLOBAL_SHARED_TEXT_SEGMENT + SHARED_TEXT_REGION_SIZE) | ||||
| #define	DATA_SEGMENT_START	(GLOBAL_SHARED_DATA_SEGMENT) | ||||
| #define DATA_SEGMENT_END	(GLOBAL_SHARED_DATA_SEGMENT + SHARED_DATA_REGION_SIZE) | ||||
|  | ||||
| struct shared_info { | ||||
| 	unsigned obj_id; | ||||
| 	unsigned share_mode; | ||||
| 	unsigned page_count; | ||||
| 	unsigned ref_count; | ||||
| 	unsigned task_ref_count; | ||||
| 	vm_size_t size; | ||||
| 	struct shared_info *next; | ||||
| }; | ||||
| typedef struct shared_info shared_table[SHARED_TABLE_SIZE]; | ||||
| typedef struct shared_info shared_info; | ||||
|  | ||||
| static void | ||||
| shared_table_init (shared_table table) | ||||
| { | ||||
| 	memset (table, 0, sizeof (shared_table)); | ||||
| } | ||||
|  | ||||
| static void | ||||
| shared_table_free (glibtop *server, shared_table table) | ||||
| { | ||||
| 	int i; | ||||
|  | ||||
| 	for (i = 0; i < SHARED_TABLE_SIZE; i++) { | ||||
| 		shared_info *info = table [i].next; | ||||
|  | ||||
| 		while (info) { | ||||
| 			shared_info *next = info->next; | ||||
| 			g_free (info); | ||||
| 			info = next; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| static void | ||||
| shared_table_register (glibtop *server, shared_table table, | ||||
| 		       vm_region_top_info_data_t *top, vm_size_t size) | ||||
| { | ||||
| 	shared_info *info, *last; | ||||
|  | ||||
| 	info = last = &table [top->obj_id % SHARED_TABLE_SIZE]; | ||||
| 	while (info) { | ||||
| 		if (info->obj_id == top->obj_id) { | ||||
| 			info->task_ref_count++; | ||||
| 			return; | ||||
| 		} | ||||
| 		last = info; | ||||
| 		info = info->next; | ||||
| 	} | ||||
|  | ||||
| 	info = g_malloc (sizeof (shared_info)); | ||||
| 	if (info) { | ||||
| 		info->obj_id = top->obj_id; | ||||
| 		info->share_mode = top->share_mode; | ||||
| 		info->page_count = top->shared_pages_resident; | ||||
| 		info->ref_count = top->ref_count; | ||||
| 		info->task_ref_count = 1; | ||||
| 		info->size = size; | ||||
| 		info->next = NULL; | ||||
| 		last->next = info; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, | ||||
| 			pid_t pid) | ||||
| { | ||||
| 	task_basic_info_data_t tinfo; | ||||
|         mach_msg_type_number_t info_count; | ||||
| 	vm_size_t vsize, resident, private, vprivate, shared; | ||||
| 	kern_return_t retval; | ||||
| 	shared_table stable; | ||||
| 	vm_address_t address; | ||||
| 	mach_port_t task; | ||||
| 	int i, split; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MEM), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_mem)); | ||||
|  | ||||
| 	address = 0; | ||||
| 	split = 0; | ||||
| 	vsize = resident = private = vprivate = shared = 0; | ||||
| 	shared_table_init (stable); | ||||
|  | ||||
| 	/* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| 	glibtop_suid_enter (server); | ||||
| 	retval = task_for_pid (mach_task_self (), pid, &task); | ||||
| 	glibtop_suid_leave (server); | ||||
|  | ||||
| 	/* !!! END OF SUID ROOT PART !!! */ | ||||
|  | ||||
| 	if (retval) | ||||
| 		return; | ||||
|  | ||||
| 	info_count = TASK_BASIC_INFO_COUNT; | ||||
| 	if (task_info (task, TASK_BASIC_INFO, (task_info_t)&tinfo, &info_count)) { | ||||
| 		glibtop_warn_io_r (server, "task_info (procmem)"); | ||||
| 		return; | ||||
| 	} | ||||
| 	vsize = tinfo.virtual_size; | ||||
| 	resident = tinfo.resident_size; | ||||
|  | ||||
| 	/* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| 	glibtop_suid_enter (server); | ||||
| 	while (1) { | ||||
| 		vm_region_basic_info_data_64_t basic; | ||||
| 		vm_region_top_info_data_t top; | ||||
| 		mach_port_t object_name; | ||||
| 		vm_size_t size; | ||||
|  | ||||
| 		info_count = VM_REGION_BASIC_INFO_COUNT_64; | ||||
| 		if (vm_region_64 (task, &address, &size, VM_REGION_BASIC_INFO, | ||||
| 				  (vm_region_info_t)&basic, | ||||
| 				  &info_count, &object_name)) | ||||
| 			break; | ||||
|  | ||||
| 		info_count = VM_REGION_TOP_INFO_COUNT; | ||||
| 		if (vm_region_64 (task, &address, &size, VM_REGION_TOP_INFO, | ||||
| 			       (vm_region_info_t)&top, | ||||
| 			       &info_count, &object_name)) | ||||
| 			break; | ||||
|  | ||||
| 		if (address >= TEXT_SEGMENT_START && address < DATA_SEGMENT_END) { | ||||
| 			if (!split && top.share_mode == SM_EMPTY) { | ||||
| 				if (basic.reserved) | ||||
| 					split = 1; | ||||
| 			} | ||||
| 			if (top.share_mode != SM_PRIVATE) { | ||||
| 				address += size; | ||||
| 				continue; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		switch (top.share_mode) { | ||||
| 		case SM_COW: | ||||
| 			if (top.ref_count == 1) { | ||||
| 				private += top.private_pages_resident * vm_page_size; | ||||
| 				private += top.shared_pages_resident * vm_page_size; | ||||
| 				vprivate += size; | ||||
| 			} else { | ||||
| 				shared_table_register (server, stable, &top, size); | ||||
| 				vprivate += top.private_pages_resident * vm_page_size; | ||||
| 			} | ||||
| 			break; | ||||
| 		case SM_PRIVATE: | ||||
| 			private += top.private_pages_resident * vm_page_size; | ||||
| 			vprivate += size; | ||||
| 			break; | ||||
| 		case SM_SHARED: | ||||
| 			shared_table_register (server, stable, &top, size); | ||||
| 			break; | ||||
| 		} | ||||
|  | ||||
| 		address += size; | ||||
| 	} | ||||
| 	glibtop_suid_leave (server); | ||||
|  | ||||
| 	/* !!! END OF SUID ROOT PART !!! */ | ||||
|  | ||||
| 	for (i = 0; i < SHARED_TABLE_SIZE; i++) { | ||||
| 		shared_info *sinfo = &stable[i]; | ||||
|  | ||||
| 		while (sinfo) { | ||||
| 			if (sinfo->share_mode == SM_SHARED && | ||||
| 			    sinfo->ref_count == sinfo->task_ref_count) { | ||||
| 				private += sinfo->page_count * vm_page_size; | ||||
| 				vprivate += sinfo->size; | ||||
| 			} else { | ||||
| 				shared += sinfo->page_count * vm_page_size; | ||||
| 			} | ||||
| 			sinfo = sinfo->next; | ||||
| 		} | ||||
| 	} | ||||
| 	shared_table_free (server, stable); | ||||
|  | ||||
| 	if (split) | ||||
| 		vsize -= DATA_SEGMENT_END - TEXT_SEGMENT_START; | ||||
|  | ||||
| 	buf->size     = vprivate; | ||||
| 	buf->vsize    = vsize; | ||||
| 	buf->resident = resident; | ||||
| 	buf->share    = shared; | ||||
| 	buf->rss      = private; | ||||
| 	buf->flags    = _glibtop_sysdeps_proc_mem; | ||||
| } | ||||
							
								
								
									
										43
									
								
								sysdeps/darwin/procopenfiles.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/darwin/procopenfiles.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procopenfiles.h> | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_open_files_s (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_open_files = 0; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| glibtop_open_files_entry * | ||||
| glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf,	pid_t pid) | ||||
| { | ||||
| 	glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_open_files)); | ||||
| 	 | ||||
| 	return NULL; | ||||
| } | ||||
							
								
								
									
										48
									
								
								sysdeps/darwin/procsegment.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								sysdeps/darwin/procsegment.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procsegment.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_segment = 0; | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_segment_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, | ||||
| 			    pid_t pid) | ||||
| { | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_segment)); | ||||
| } | ||||
							
								
								
									
										76
									
								
								sysdeps/darwin/procsignal.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								sysdeps/darwin/procsignal.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,76 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procsignal.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_signal = | ||||
| (1L << GLIBTOP_PROC_SIGNAL_SIGNAL) + | ||||
| (1L << GLIBTOP_PROC_SIGNAL_BLOCKED) + | ||||
| (1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + | ||||
| (1L << GLIBTOP_PROC_SIGNAL_SIGCATCH); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_signal_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, | ||||
| 			   pid_t pid) | ||||
| { | ||||
| 	int mib[4]; | ||||
| 	size_t length; | ||||
| 	struct kinfo_proc kinfo; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_signal)); | ||||
|  | ||||
| 	mib [0] = CTL_KERN; | ||||
| 	mib [1] = KERN_PROC;       | ||||
| 	mib [2] = KERN_PROC_PID; | ||||
| 	mib [3] = pid; | ||||
|  | ||||
| 	length = sizeof (struct kinfo_proc); | ||||
| 	if (sysctl (mib, 4, &kinfo, &length, NULL, 0) < 0) { | ||||
| 		glibtop_warn_io_r (server, "sysctl (procuid)"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	buf->signal[0]    = kinfo.kp_proc.p_siglist; | ||||
| 	buf->blocked[0]   = kinfo.kp_proc.p_sigmask; | ||||
| 	buf->sigignore[0] = kinfo.kp_proc.p_sigignore; | ||||
| 	buf->sigcatch[0]  = kinfo.kp_proc.p_sigcatch; | ||||
| 	buf->flags = _glibtop_sysdeps_proc_signal; | ||||
| } | ||||
							
								
								
									
										94
									
								
								sysdeps/darwin/procstate.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								sysdeps/darwin/procstate.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procstate.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h>       | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_state = | ||||
| (1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_STATE) + | ||||
| (1L << GLIBTOP_PROC_STATE_UID) + (1L << GLIBTOP_PROC_STATE_GID); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_state_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_state = _glibtop_sysdeps_proc_state; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, | ||||
| 			  pid_t pid) | ||||
| { | ||||
| 	int mib[4]; | ||||
| 	size_t length; | ||||
| 	struct kinfo_proc kinfo; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_STATE), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_state)); | ||||
|  | ||||
| 	mib [0] = CTL_KERN; | ||||
| 	mib [1] = KERN_PROC; | ||||
| 	mib [2] = KERN_PROC_PID; | ||||
| 	mib [3] = pid; | ||||
|  | ||||
| 	length = sizeof (struct kinfo_proc); | ||||
| 	if (sysctl (mib, 4, &kinfo, &length, NULL, 0) < 0) { | ||||
| 		glibtop_warn_io_r (server, "sysctl (procstat)"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	strncpy (buf->cmd, kinfo.kp_proc.p_comm, sizeof (buf->cmd) - 1); | ||||
| 	buf->cmd [sizeof (buf->cmd) - 1] = 0; | ||||
| 	buf->uid = kinfo.kp_eproc.e_pcred.p_svuid; | ||||
| 	buf->gid = kinfo.kp_eproc.e_pcred.p_svgid; | ||||
| 	switch (kinfo.kp_proc.p_stat) { | ||||
| 	case SIDL: | ||||
| 		buf->state = 0; | ||||
| 		break; | ||||
| 	case SRUN: | ||||
| 		buf->state = 'R'; | ||||
| 		break; | ||||
| 	case SSLEEP: | ||||
| 		buf->state = 'S'; | ||||
| 		break; | ||||
| 	case SSTOP: | ||||
| 		buf->state = 'T'; | ||||
| 		break; | ||||
| 	case SZOMB: | ||||
| 		buf->state = 'Z'; | ||||
| 		break; | ||||
| 	default: | ||||
| 		return; | ||||
| 	} | ||||
| 	buf->flags = _glibtop_sysdeps_proc_state; | ||||
| } | ||||
|  | ||||
							
								
								
									
										118
									
								
								sysdeps/darwin/proctime.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								sysdeps/darwin/proctime.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,118 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/proctime.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <mach/mach_init.h> | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/mach_port.h> | ||||
| #include <mach/task.h> | ||||
| #include <mach/vm_map.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/sysctl.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_time = | ||||
| (1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_STIME) + | ||||
| (1L << GLIBTOP_PROC_TIME_FREQUENCY) + (1L << GLIBTOP_PROC_TIME_START_TIME); | ||||
|  | ||||
| #define tv2sec(tv) (((u_int64_t) tv.seconds * 1000000) + (u_int64_t) tv.microseconds) | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_time_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_time = _glibtop_sysdeps_proc_time; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, | ||||
| 			 pid_t pid) | ||||
| { | ||||
| 	unsigned int count; | ||||
| 	task_basic_info_data_t ti; | ||||
| 	task_thread_times_info_data_t tti; | ||||
| 	task_port_t task; | ||||
| 	time_value_t utime = {0, 0}, stime = {0, 0}; | ||||
| 	size_t length; | ||||
| 	struct kinfo_proc kinfo; | ||||
| 	int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, 0 }; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_TIME), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_time)); | ||||
|  | ||||
| 	mib[3] = pid; | ||||
| 	length = sizeof (kinfo); | ||||
| 	if (sysctl (mib, 4, &kinfo, &length, NULL, 0) < 0) { | ||||
| 		glibtop_suid_leave (server); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	/* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ | ||||
|  | ||||
| 	glibtop_suid_enter (server); | ||||
|  | ||||
| 	if (task_for_pid (mach_task_self(), pid, &task) != KERN_SUCCESS) { | ||||
| 		glibtop_suid_leave (server); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	glibtop_suid_leave (server); | ||||
|  | ||||
| 	/* !!! END OF SUID ROOT PART !!! */ | ||||
|  | ||||
| 	count = TASK_BASIC_INFO_COUNT; | ||||
| 	if (task_info(task, TASK_BASIC_INFO, (task_info_t)&ti, &count) != KERN_SUCCESS) { | ||||
| 		glibtop_warn_io_r (server, "task_info (proctime)"); | ||||
| 		if (task != mach_task_self()) | ||||
| 			mach_port_deallocate (mach_task_self(), task); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	count = TASK_THREAD_TIMES_INFO_COUNT; | ||||
| 	if (task_info(task, TASK_THREAD_TIMES_INFO, (task_info_t)&tti, &count) != KERN_SUCCESS) { | ||||
| 		glibtop_warn_io_r (server, "task_info (proctime)"); | ||||
| 		if (task != mach_task_self()) | ||||
| 			mach_port_deallocate (mach_task_self(), task); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	time_value_add (&utime, &ti.user_time); | ||||
| 	time_value_add (&stime, &ti.system_time); | ||||
| 	time_value_add (&utime, &tti.user_time); | ||||
| 	time_value_add (&stime, &tti.system_time); | ||||
|  | ||||
| 	/* use the same frequency as cpu.c */ | ||||
| 	buf->utime  = tv2sec (utime) / 10000; | ||||
| 	buf->stime  = tv2sec (stime) / 10000; | ||||
| 	buf->frequency = 1000000 / 10000; | ||||
| 	buf->start_time = kinfo.kp_proc.p_starttime.tv_sec; | ||||
|  | ||||
| 	buf->flags  = _glibtop_sysdeps_proc_time; | ||||
| } | ||||
							
								
								
									
										83
									
								
								sysdeps/darwin/procuid.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								sysdeps/darwin/procuid.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,83 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procuid.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_uid = | ||||
| (1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) + | ||||
| (1L << GLIBTOP_PROC_UID_GID) + (1L << GLIBTOP_PROC_UID_EGID) + | ||||
| (1L << GLIBTOP_PROC_UID_PID) + (1L << GLIBTOP_PROC_UID_PPID) + | ||||
| (1L << GLIBTOP_PROC_UID_PGRP) + (1L << GLIBTOP_PROC_UID_TTY) + | ||||
| (1L << GLIBTOP_PROC_UID_TPGID); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_uid_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, | ||||
| 			pid_t pid) | ||||
| { | ||||
| 	int mib[4]; | ||||
| 	size_t length; | ||||
| 	struct kinfo_proc kinfo; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_UID), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_uid)); | ||||
|  | ||||
| 	mib [0] = CTL_KERN; | ||||
| 	mib [1] = KERN_PROC; | ||||
| 	mib [2] = KERN_PROC_PID; | ||||
| 	mib [3] = pid; | ||||
|  | ||||
| 	length = sizeof (struct kinfo_proc); | ||||
| 	if (sysctl (mib, 4, &kinfo, &length, NULL, 0) < 0) { | ||||
| 		glibtop_warn_io_r (server, "sysctl (procuid)"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	buf->uid      = kinfo.kp_eproc.e_pcred.p_ruid; | ||||
| 	buf->euid     = kinfo.kp_eproc.e_pcred.p_svuid; | ||||
| 	buf->gid      = kinfo.kp_eproc.e_pcred.p_rgid; | ||||
| 	buf->egid     = kinfo.kp_eproc.e_pcred.p_svgid; | ||||
| 	buf->ppid     = kinfo.kp_eproc.e_ppid; | ||||
| 	buf->pgrp     = kinfo.kp_eproc.e_pgid; | ||||
| 	buf->tpgid    = kinfo.kp_eproc.e_tpgid; | ||||
| 	buf->nice     = kinfo.kp_proc.p_nice; | ||||
| 	buf->priority = kinfo.kp_proc.p_priority; | ||||
|  | ||||
| 	buf->flags    = _glibtop_sysdeps_proc_uid; | ||||
| } | ||||
							
								
								
									
										50
									
								
								sysdeps/darwin/procwd.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								sysdeps/darwin/procwd.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <glibtop/procwd.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <unistd.h> | ||||
| #include <dirent.h> | ||||
| #include <sys/types.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_wd = 0; | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_wd_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd; | ||||
| } | ||||
|  | ||||
| /* Provides detailed information about a process. */ | ||||
|  | ||||
| char ** | ||||
| glibtop_get_proc_wd_p (glibtop *server, glibtop_proc_wd *buf, | ||||
| 			pid_t pid) | ||||
| { | ||||
| 	glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_WD, 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_wd)); | ||||
| 	return NULL; | ||||
| } | ||||
							
								
								
									
										47
									
								
								sysdeps/darwin/sem_limits.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								sysdeps/darwin/sem_limits.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/sem_limits.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_sem_limits = 0; | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_sem_limits_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits; | ||||
| } | ||||
|  | ||||
| /* Provides information about sysv sem limits. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) | ||||
| { | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_sem_limits)); | ||||
| } | ||||
							
								
								
									
										47
									
								
								sysdeps/darwin/shm_limits.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								sysdeps/darwin/shm_limits.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/shm_limits.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_shm_limits = 0; | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_shm_limits_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits; | ||||
| } | ||||
|  | ||||
| /* Provides information about sysv ipc limits. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) | ||||
| { | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_shm_limits)); | ||||
| } | ||||
							
								
								
									
										60
									
								
								sysdeps/darwin/siglist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								sysdeps/darwin/siglist.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/signal.h> | ||||
|  | ||||
| const glibtop_signame glibtop_sys_siglist [] = | ||||
| { {  1, "SIGHUP",    NULL },	/* hangup */ | ||||
|   {  2, "SIGINT",    NULL },	/* interrupt */ | ||||
|   {  3, "SIGQUIT",   NULL },	/* quit */ | ||||
|   {  4, "SIGILL",    NULL },	/* illegal instruction */ | ||||
|   {  5, "SIGTRAP",   NULL },	/* trace trap */ | ||||
|   {  6, "SIGTRAP",   NULL },	/* abort */ | ||||
|   {  7, "SIGEMT",    NULL },	/* EMT instruction */ | ||||
|   {  8, "SIGFPE",    NULL },	/* floating point exception */ | ||||
|   {  9, "SIGKILL",   NULL },	/* kill */ | ||||
|   { 10, "SIGBUS",    NULL },	/* bus error */ | ||||
|   { 11, "SIGSEGV",   NULL },	/* segmentation violation */ | ||||
|   { 12, "SIGSYS",    NULL },	/* bad argument to system call */ | ||||
|   { 13, "SIGPIPE",   NULL },	/* write on a pipe with no one to read it */ | ||||
|   { 14, "SIGALRM",   NULL },	/* alarm clock */ | ||||
|   { 15, "SIGTERM",   NULL },	/* software termination signal from kill */ | ||||
|   { 16, "SIGURG",    NULL },	/* urgent condition on IO channel */ | ||||
|   { 17, "SIGSTOP",   NULL },	/* sendable stop signal not from tty */ | ||||
|   { 18, "SIGTSTP",   NULL },	/* stop signal from tty */ | ||||
|   { 19, "SIGCONT",   NULL },	/* continue a stopped process */ | ||||
|   { 20, "SIGCHLD",   NULL },	/* to parent on child stop or exit */ | ||||
|   { 21, "SIGTTIN",   NULL },	/* to readers pgrp upon background tty read */ | ||||
|   { 22, "SIGTTOU",   NULL },	/* like TTIN for output */ | ||||
|   { 23, "SIGIO",     NULL },	/* input/output possible signal */ | ||||
|   { 24, "SIGXCPU",   NULL },	/* exceeded CPU time limit */ | ||||
|   { 25, "SIGXFSZ",   NULL },	/* exceeded file size limit */ | ||||
|   { 26, "SIGVTALRM", NULL },	/* virtual time alarm */ | ||||
|   { 27, "SIGPROF",   NULL },	/* profiling time alarm */ | ||||
|   { 28, "SIGWINCH",  NULL },	/* window size changes */ | ||||
|   { 29, "SIGWINFO",  NULL },	/* information request */ | ||||
|   { 30, "SIGUSR1",   NULL },	/* user defined signal 1 */ | ||||
|   { 31, "SIGUSR2",   NULL },	/* user defined signal 2 */ | ||||
|   {  0, NULL,        NULL } | ||||
| }; | ||||
|  | ||||
							
								
								
									
										110
									
								
								sysdeps/darwin/swap.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								sysdeps/darwin/swap.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,110 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/swap.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <mach/mach_host.h> | ||||
| #include <mach/host_info.h> | ||||
| #include <mach/mach_init.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/mount.h> | ||||
| #include <dirent.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_swap = | ||||
| (1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) + | ||||
| (1L << GLIBTOP_SWAP_FREE) + (1L << GLIBTOP_SWAP_PAGEIN) + | ||||
| (1L << GLIBTOP_SWAP_PAGEOUT); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_swap_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.swap = _glibtop_sysdeps_swap; | ||||
| } | ||||
|  | ||||
| /* Provides information about swap usage. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_swap_p (glibtop *server, glibtop_swap *buf) | ||||
| { | ||||
| 	vm_statistics_data_t vm_info; | ||||
| 	mach_msg_type_number_t info_count; | ||||
| 	DIR *dirp; | ||||
| 	struct dirent *dp; | ||||
| 	struct statfs sfs; | ||||
| 	u_int64_t total, used; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SWAP), 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_swap)); | ||||
|  | ||||
| 	total = used = 0; | ||||
|  | ||||
| 	dirp = opendir ("/private/var/vm"); | ||||
| 	if (!dirp) { | ||||
| 		glibtop_warn_io_r (server, "opendir (swap)"); | ||||
| 		return; | ||||
| 	} | ||||
| 	while ((dp = readdir (dirp)) != NULL) { | ||||
| 		struct stat sb; | ||||
| 		char fname [MAXNAMLEN]; | ||||
|  | ||||
| 		if (strncmp (dp->d_name, "swapfile", 8)) | ||||
| 			continue; | ||||
|  | ||||
| 		strcpy (fname, "/private/var/vm/"); | ||||
| 		strcat (fname, dp->d_name); | ||||
| 		if (stat (fname, &sb) < 0) | ||||
| 			continue; | ||||
|  | ||||
| 		used += sb.st_size; | ||||
| 	} | ||||
| 	closedir (dirp); | ||||
|  | ||||
| 	if (statfs ("/private/var/vm", &sfs) < 0) { | ||||
| 		glibtop_warn_io_r (server, "statfs (swap)"); | ||||
| 		return; | ||||
| 	} | ||||
| 	total = (u_int64_t)sfs.f_bfree * sfs.f_bsize + used; | ||||
|  | ||||
| 	info_count = HOST_VM_INFO_COUNT; | ||||
| 	if (host_statistics (mach_host_self (), HOST_VM_INFO, | ||||
| 			     (host_info_t) &vm_info, &info_count)) { | ||||
| 		glibtop_warn_io_r (server, "host_statistics (swap)"); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	buf->total    = total; | ||||
| 	buf->used     = used; | ||||
| 	buf->free     = total - used; | ||||
| 	buf->pagein   = vm_info.pageins; | ||||
| 	buf->pageout  = vm_info.pageouts; | ||||
| 	buf->flags    = _glibtop_sysdeps_swap; | ||||
| } | ||||
|  | ||||
							
								
								
									
										90
									
								
								sysdeps/darwin/sysinfo.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										90
									
								
								sysdeps/darwin/sysinfo.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,90 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/sysctl.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/cpu.h> | ||||
| #include <glibtop/sysinfo.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_sysinfo = | ||||
| (1L << GLIBTOP_SYSINFO_CPUINFO); | ||||
|  | ||||
| static glibtop_sysinfo sysinfo = { .flags = 0 }; | ||||
|  | ||||
| static void | ||||
| init_sysinfo (glibtop *server) | ||||
| { | ||||
| 	char *model; | ||||
| 	guint64 ncpus = 1; | ||||
| 	int mhz = 0; | ||||
| 	size_t len; | ||||
|  | ||||
| 	if (G_LIKELY (sysinfo.flags)) | ||||
| 		return; | ||||
|  | ||||
| 	glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); | ||||
|  | ||||
| 	len = sizeof (ncpus); | ||||
| 	sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0); | ||||
| 	len = 0; | ||||
| 	sysctlbyname ("hw.model", NULL, &len, NULL, 0); | ||||
| 	model = g_malloc (len); | ||||
| 	sysctlbyname ("hw.model", model, &len, NULL, 0); | ||||
| 	len = sizeof (mhz); | ||||
| 	sysctlbyname ("hw.cpufrequency", &mhz, &len, NULL, 0); | ||||
| 	mhz = mhz / 1000000; | ||||
|  | ||||
| 	for (sysinfo.ncpu = 0; | ||||
| 	     sysinfo.ncpu < GLIBTOP_NCPU && sysinfo.ncpu < ncpus; | ||||
| 	     sysinfo.ncpu++) { | ||||
| 		glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[sysinfo.ncpu]; | ||||
|  | ||||
| 		cpuinfo->labels = g_ptr_array_new (); | ||||
|  | ||||
| 		cpuinfo->values = g_hash_table_new_full(g_str_hash, | ||||
| 							g_str_equal, | ||||
| 							NULL, g_free); | ||||
|  | ||||
| 		g_ptr_array_add (cpuinfo->labels, "processor"); | ||||
| 		g_hash_table_insert (cpuinfo->values, "processor", | ||||
| 				     g_strdup_printf("%u", (guint)sysinfo.ncpu)); | ||||
|  | ||||
| 		g_ptr_array_add (cpuinfo->labels, "vendor_id"); | ||||
| 		g_hash_table_insert (cpuinfo->values, "vendor_id", | ||||
| 				     g_strdup(model)); | ||||
|  | ||||
| 		g_ptr_array_add (cpuinfo->labels, "cpu MHz"); | ||||
| 		g_hash_table_insert (cpuinfo->values, "cpu MHz", | ||||
| 				     g_strdup_printf("%d", mhz)); | ||||
| 	} | ||||
|  | ||||
| 	g_free (model); | ||||
|  | ||||
| 	sysinfo.flags = _glibtop_sysdeps_sysinfo; | ||||
| } | ||||
|  | ||||
| const glibtop_sysinfo * | ||||
| glibtop_get_sysinfo_s (glibtop *server) | ||||
| { | ||||
| 	init_sysinfo (server); | ||||
| 	return &sysinfo; | ||||
| } | ||||
							
								
								
									
										66
									
								
								sysdeps/darwin/uptime.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								sysdeps/darwin/uptime.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | ||||
| /* | ||||
|    This file is part of LibGTop 2.0. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/uptime.h> | ||||
|  | ||||
| #include <glibtop_suid.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h> | ||||
| #include <time.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_uptime = | ||||
| (1L << GLIBTOP_UPTIME_UPTIME); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| void | ||||
| _glibtop_init_uptime_p (glibtop *server) | ||||
| { | ||||
| 	server->sysdeps.uptime = _glibtop_sysdeps_uptime; | ||||
| } | ||||
|  | ||||
| /* Provides uptime and idle time. */ | ||||
|  | ||||
| void | ||||
| glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) | ||||
| { | ||||
| 	int mib [] = { CTL_KERN, KERN_BOOTTIME }; | ||||
| 	struct timeval boottime; | ||||
| 	size_t size = sizeof (boottime); | ||||
| 	time_t now; | ||||
|  | ||||
| 	glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_UPTIME), 0); | ||||
| 	 | ||||
| 	memset (buf, 0, sizeof (glibtop_uptime)); | ||||
|  | ||||
| 	/* copied from gkrellm port */ | ||||
|  | ||||
| 	if (sysctl (mib, 2, &boottime, &size, NULL, 0) == -1) | ||||
| 		return; | ||||
| 	time (&now); | ||||
|  | ||||
| 	buf->uptime = now - boottime.tv_sec + 30; | ||||
| 	buf->flags = _glibtop_sysdeps_uptime; | ||||
| } | ||||
| @@ -6,8 +6,8 @@ noinst_LTLIBRARIES		= libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la | ||||
| libgtop_sysdeps_2_0_la_SOURCES	= nosuid.c siglist.c sysinfo.c shm_limits.c \ | ||||
| 				  cpu.c msg_limits.c sem_limits.c loadavg.c \ | ||||
| 				  uptime.c netlist.c fsusage.c mem.c \ | ||||
| 				  procopenfiles.c procwd.c \ | ||||
| 				  glibtop_private.c | ||||
| 				  mountlist.c procopenfiles.c procwd.c \ | ||||
| 				  procaffinity.c glibtop_private.c | ||||
|  | ||||
| libgtop_sysdeps_2_0_la_LDFLAGS	= $(LT_VERSION_INFO) | ||||
|  | ||||
|   | ||||
| @@ -10,6 +10,7 @@ | ||||
| #include <unistd.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/mount.h> | ||||
| #include <sys/statvfs.h> | ||||
| #if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__) | ||||
| #include <libgeom.h> | ||||
| #include <sys/resource.h> | ||||
| @@ -21,15 +22,13 @@ | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
|  | ||||
| void | ||||
| _glibtop_freebsd_get_fsusage_read_write(glibtop *server, | ||||
|                                         glibtop_fsusage *buf, | ||||
|                                         const char *path); | ||||
| static const unsigned long _glibtop_sysdeps_fsusage = | ||||
| (1L << GLIBTOP_FSUSAGE_BLOCKS) + (1L << GLIBTOP_FSUSAGE_BFREE) | ||||
| + (1L << GLIBTOP_FSUSAGE_BAVAIL) + (1L << GLIBTOP_FSUSAGE_FILES) | ||||
| + (1L << GLIBTOP_FSUSAGE_FFREE) + (1L << GLIBTOP_FSUSAGE_BLOCK_SIZE); | ||||
|  | ||||
| void | ||||
| _glibtop_freebsd_get_fsusage_read_write(glibtop *server, | ||||
|                                         glibtop_fsusage *buf, | ||||
|                                         const char *path) | ||||
| static void | ||||
| _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const char *path) | ||||
| { | ||||
|         int result; | ||||
|         struct statfs sfs; | ||||
| @@ -135,3 +134,28 @@ _glibtop_freebsd_get_fsusage_read_write(glibtop *server, | ||||
| #endif | ||||
|         buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE); | ||||
| } | ||||
|  | ||||
| void | ||||
| glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path) | ||||
| { | ||||
| 	struct statvfs fsd; | ||||
|  | ||||
| 	glibtop_init_r (&server, 0, 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_fsusage)); | ||||
|  | ||||
| 	if (statvfs (path, &fsd) < 0) | ||||
| 		return; | ||||
|  | ||||
| 	buf->block_size = fsd.f_frsize; | ||||
| 	buf->blocks = fsd.f_blocks; | ||||
| 	buf->bfree  = fsd.f_bfree; | ||||
| 	buf->bavail = (fsd.f_bavail > fsd.f_bfree) ? 0 : fsd.f_bavail; | ||||
| 	buf->files  = fsd.f_files; | ||||
| 	buf->ffree  = fsd.f_ffree; | ||||
|  | ||||
| 	buf->flags = _glibtop_sysdeps_fsusage; | ||||
|  | ||||
| 	_glibtop_get_fsusage_read_write(server, buf, path); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -46,6 +46,7 @@ G_BEGIN_DECLS | ||||
| #define GLIBTOP_SUID_SEM_LIMITS		0 | ||||
| #define GLIBTOP_SUID_NETLIST		0 | ||||
| #define GLIBTOP_SUID_PROC_WD		0 | ||||
| #define GLIBTOP_SUID_PROC_AFFINITY	0 | ||||
|  | ||||
| G_END_DECLS | ||||
|  | ||||
|   | ||||
							
								
								
									
										168
									
								
								sysdeps/freebsd/mountlist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										168
									
								
								sysdeps/freebsd/mountlist.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,168 @@ | ||||
| /* mountlist.c -- return a list of mounted filesystems | ||||
|    Copyright (C) 1991, 1992 Free Software Foundation, Inc. | ||||
|  | ||||
|    This program 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, or (at your option) | ||||
|    any later version. | ||||
|  | ||||
|    This program 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 this program; if not, write to the Free Software Foundation, | ||||
|    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ | ||||
|  | ||||
| #include <config.h> | ||||
|  | ||||
| #include <glib.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/mount.h> | ||||
|  | ||||
| #include <string.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/mountlist.h> | ||||
|  | ||||
| /* A mount table entry. */ | ||||
| struct mount_entry | ||||
| { | ||||
|   char *me_devname;             /* Device node pathname, including "/dev/". */ | ||||
|   char *me_mountdir;            /* Mount point directory pathname. */ | ||||
|   char *me_type;                /* "nfs", "4.2", etc. */ | ||||
|   dev_t me_dev;                 /* Device number of me_mountdir. */ | ||||
|   struct mount_entry *me_next; | ||||
| }; | ||||
|  | ||||
| static struct mount_entry *read_filesystem_list (void); | ||||
|  | ||||
| /* Return a list of the currently mounted filesystems, or NULL on error. | ||||
|    Add each entry to the tail of the list so that they stay in order. | ||||
| */ | ||||
|  | ||||
| static struct mount_entry * | ||||
| read_filesystem_list (void) | ||||
| { | ||||
|   struct mount_entry *mount_list; | ||||
|   struct mount_entry *me; | ||||
|   struct mount_entry *mtail; | ||||
|  | ||||
|   /* Start the list off with a dummy entry. */ | ||||
|   me = g_new (struct mount_entry, 1); | ||||
|   me->me_next = NULL; | ||||
|   mount_list = mtail = me; | ||||
|   { | ||||
|     struct statfs *fsp; | ||||
|     int entries; | ||||
|  | ||||
|     entries = getmntinfo (&fsp, MNT_NOWAIT); | ||||
|     if (entries < 0) | ||||
|       return NULL; | ||||
|     while (entries-- > 0) | ||||
|       { | ||||
| 	me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry)); | ||||
| 	me->me_devname = g_strdup (fsp->f_mntfromname); | ||||
| 	me->me_mountdir = g_strdup (fsp->f_mntonname); | ||||
| 	me->me_type = g_strdup (fsp->f_fstypename); | ||||
| 	me->me_dev = (dev_t) -1;	/* Magic; means not known yet. */ | ||||
| 	me->me_next = NULL; | ||||
|  | ||||
| 	/* Add to the linked list. */ | ||||
| 	mtail->me_next = me; | ||||
| 	mtail = me; | ||||
| 	fsp++; | ||||
|       } | ||||
|   } | ||||
|  | ||||
|   /* Free the dummy head. */ | ||||
|   me = mount_list; | ||||
|   mount_list = mount_list->me_next; | ||||
|   g_free (me); | ||||
|   return mount_list; | ||||
| } | ||||
|  | ||||
| static gboolean ignore_mount_entry(const struct mount_entry *me) | ||||
| { | ||||
| 	/* keep sorted */ | ||||
| 	static const char ignored[][17] = { | ||||
| 		"autofs", | ||||
| 		"devfs", | ||||
| 		"fusectl", | ||||
| 		"linprocfs", | ||||
| 		"linsysfs", | ||||
| 		"mfs", | ||||
| 		"none", | ||||
| 		"nfs", | ||||
| 		"nullfs", | ||||
| 		"nwfs", | ||||
| 		"portalfs", | ||||
| 		"proc", | ||||
| 		"procfs", | ||||
| 		"smbfs", | ||||
| 		"tmpfs", | ||||
| 		"unionfs", | ||||
| 		"unknown" | ||||
| 	}; | ||||
|  | ||||
| 	typedef int (*Comparator)(const void*, const void*); | ||||
|  | ||||
| 	return bsearch(me->me_type, | ||||
| 		       ignored, G_N_ELEMENTS(ignored), sizeof ignored[0], | ||||
| 		       (Comparator) strcmp) != NULL; | ||||
| } | ||||
|  | ||||
|  | ||||
| glibtop_mountentry * | ||||
| glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs) | ||||
| { | ||||
| 	struct mount_entry *entries, *cur, *next; | ||||
|  | ||||
| 	GArray *mount_array = g_array_new(FALSE, FALSE, | ||||
| 					  sizeof(glibtop_mountentry)); | ||||
|  | ||||
| 	glibtop_init_r (&server, 0, 0); | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_mountlist)); | ||||
|  | ||||
| 	/* Read filesystem list. */ | ||||
|  | ||||
| 	if((entries = read_filesystem_list ()) == NULL) | ||||
| 		return NULL; | ||||
|  | ||||
| 	for (cur = &entries[0]; cur != NULL; cur = next) { | ||||
|  | ||||
| 		if(all_fs || !ignore_mount_entry(cur)) { | ||||
| 			/* add a new glibtop_mountentry */ | ||||
| 			glibtop_mountentry e; | ||||
|  | ||||
| 			g_strlcpy(e.devname,  cur->me_devname,  sizeof e.devname); | ||||
| 			g_strlcpy(e.mountdir, cur->me_mountdir, sizeof e.mountdir); | ||||
| 			g_strlcpy(e.type,     cur->me_type,     sizeof e.type); | ||||
| 			e.dev = cur->me_dev; | ||||
|  | ||||
| 			g_array_append_val(mount_array, e); | ||||
| 		} | ||||
|  | ||||
| 		/* free current mount_entry and move to the next */ | ||||
| 		next = cur->me_next; | ||||
| 		g_free(cur->me_devname); | ||||
| 		g_free(cur->me_mountdir); | ||||
| 		g_free(cur->me_type); | ||||
| 		g_free(cur); | ||||
| 	} | ||||
|  | ||||
| 	buf->size   = sizeof (glibtop_mountentry); | ||||
| 	buf->number = mount_array->len; | ||||
| 	buf->total  = buf->number * buf->size; | ||||
|  | ||||
| 	buf->flags  = (1 << GLIBTOP_MOUNTLIST_SIZE) | ||||
| 	  | (1 << GLIBTOP_MOUNTLIST_NUMBER) | ||||
| 	  | (1 << GLIBTOP_MOUNTLIST_TOTAL); | ||||
|  | ||||
| 	return (glibtop_mountentry*) g_array_free(mount_array, FALSE); | ||||
| } | ||||
							
								
								
									
										84
									
								
								sysdeps/freebsd/procaffinity.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								sysdeps/freebsd/procaffinity.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,84 @@ | ||||
| /* Copyright (C) 2007 Joe Marcus Clarke <marcus@FreeBSD.org> | ||||
|    This file is part of LibGTop 2. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <glibtop/procaffinity.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include <glibtop_private.h> | ||||
|  | ||||
| #include <sys/param.h> | ||||
| #if __FreeBSD_version > 800024 | ||||
| #include <sys/cpuset.h> | ||||
| #endif | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_affinity_s(glibtop *server) | ||||
| { | ||||
|   server->sysdeps.proc_affinity = | ||||
|     (1 << GLIBTOP_PROC_AFFINITY_NUMBER) | | ||||
|     (1 << GLIBTOP_PROC_AFFINITY_ALL); | ||||
|  | ||||
| } | ||||
|  | ||||
|  | ||||
| guint16 * | ||||
| glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid) | ||||
| { | ||||
| #if __FreeBSD_version > 800024 | ||||
|   id_t id; | ||||
|   cpulevel_t level; | ||||
|   cpuwhich_t which; | ||||
|   cpuset_t mask; | ||||
|   size_t i; | ||||
|   GArray* cpus; | ||||
|  | ||||
|   memset(buf, 0, sizeof *buf); | ||||
|  | ||||
|   which = CPU_WHICH_PID; | ||||
|   level = CPU_LEVEL_WHICH; | ||||
|   id = pid; | ||||
|  | ||||
|   if (cpuset_getaffinity(level, which, id, sizeof(mask), &mask) != 0) { | ||||
|     glibtop_error_r(server, "cpuset_getaffinity failed"); | ||||
|     return NULL; | ||||
|   } | ||||
|  | ||||
|   cpus = g_array_new(FALSE, FALSE, sizeof(guint16)); | ||||
|  | ||||
|   for (i = 0; i < MIN(CPU_SETSIZE, (size_t)(server->ncpu + 1)); i++) { | ||||
|     if (CPU_ISSET(i, &mask)) { | ||||
|       guint16 n = i; | ||||
|       g_array_append_val(cpus, n); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   buf->number = cpus->len; | ||||
|   buf->all = (cpus->len == (size_t)(server->ncpu + 1)); | ||||
|   buf->flags = (1 << GLIBTOP_PROC_AFFINITY_NUMBER) | ||||
|     | (1 << GLIBTOP_PROC_AFFINITY_ALL); | ||||
|  | ||||
|   return (guint16*) g_array_free(cpus, FALSE); | ||||
| #else | ||||
|   memset(buf, 0, sizeof *buf); | ||||
|  | ||||
|   return NULL; | ||||
| #endif | ||||
| } | ||||
|  | ||||
| @@ -41,7 +41,17 @@ | ||||
| #define _KERNEL | ||||
| #include <sys/pipe.h> | ||||
| #include <sys/conf.h> | ||||
| #undef _KERNEL | ||||
| #if __FreeBSD_version >= 800038 | ||||
| #define _WANT_FILE | ||||
| #include <sys/file.h> | ||||
| #undef _WANT_FILE | ||||
| #else | ||||
| #define _KERNEL | ||||
| #include <sys/file.h> | ||||
| #undef _KERNEL | ||||
| #endif | ||||
| #define _KERNEL | ||||
| #include <sys/mount.h> | ||||
| #include <ufs/ufs/quota.h> | ||||
| #include <ufs/ufs/inode.h> | ||||
| @@ -103,8 +113,14 @@ _glibtop_sysdeps_freebsd_dev_inode (glibtop *server, struct vnode *vnode, | ||||
|  | ||||
|         if (kvm_read (server->machine.kd, (gulong) inode.i_dev, (char *) &si, | ||||
| 	              sizeof (si)) != sizeof (si) || | ||||
| #if __FreeBSD_version >= 800039 | ||||
|             kvm_read (server->machine.kd, (gulong)  cdev2priv(&si), (char *) &priv, | ||||
| 		      sizeof (priv)) | ||||
| #else | ||||
|             kvm_read (server->machine.kd, (gulong) si.si_priv, (char *) &priv, | ||||
| 		      sizeof (priv)) != sizeof (priv)) | ||||
| 		      sizeof (priv)) | ||||
| #endif | ||||
| 	    != sizeof (priv)) | ||||
|         { | ||||
|                 glibtop_warn_io_r (server, "kvm_read (si)"); | ||||
|                 return; | ||||
|   | ||||
| @@ -28,6 +28,13 @@ | ||||
| #include <glibtop/error.h> | ||||
| #include <glibtop/procopenfiles.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/socket.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h> | ||||
| #include <sys/un.h> | ||||
| #include <sys/user.h> | ||||
| #include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
|  | ||||
| @@ -46,6 +53,63 @@ _glibtop_init_proc_open_files_s (glibtop *server) | ||||
| 	server->sysdeps.proc_open_files = _glibtop_sysdeps_proc_open_files; | ||||
| } | ||||
|  | ||||
| #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104) | ||||
| static char * | ||||
| addr_to_string(struct sockaddr_storage *ss) | ||||
| { | ||||
| 	char *buffer = NULL; | ||||
| 	char buffer2[INET6_ADDRSTRLEN]; | ||||
| 	struct sockaddr_in6 *sin6; | ||||
| 	struct sockaddr_in *sin; | ||||
| 	struct sockaddr_un *sun; | ||||
|  | ||||
| 	switch (ss->ss_family) { | ||||
| 		case AF_LOCAL: | ||||
| 			sun = (struct sockaddr_un *)ss; | ||||
| 			if (strlen(sun->sun_path) == 0) | ||||
| 				buffer = g_strdup("-"); | ||||
| 			else | ||||
| 				buffer = g_strdup(sun->sun_path); | ||||
| 			break; | ||||
| 		case AF_INET: | ||||
| 			sin = (struct sockaddr_in *)ss; | ||||
| 			buffer = g_strdup(inet_ntoa(sin->sin_addr)); | ||||
| 			break; | ||||
| 		case AF_INET6: | ||||
| 			sin6 = (struct sockaddr_in6 *)ss; | ||||
| 			if (inet_ntop(AF_INET6, &sin6->sin6_addr, buffer2, | ||||
| 			    sizeof(buffer2)) != NULL) | ||||
| 				buffer = g_strdup(buffer2); | ||||
| 			else | ||||
| 				buffer = g_strdup("-"); | ||||
| 			break; | ||||
| 	} | ||||
|  | ||||
| 	return buffer; | ||||
| } | ||||
|  | ||||
| static int | ||||
| addr_to_port(struct sockaddr_storage *ss) | ||||
| { | ||||
| 	int port = 0; | ||||
| 	struct sockaddr_in6 *sin6; | ||||
| 	struct sockaddr_in *sin; | ||||
|  | ||||
| 	switch (ss->ss_family) { | ||||
| 		case AF_INET: | ||||
| 			sin = (struct sockaddr_in *)ss; | ||||
| 			port = ntohs(sin->sin_port); | ||||
| 			break; | ||||
| 		case AF_INET6: | ||||
| 			sin6 = (struct sockaddr_in6 *)ss; | ||||
| 			port = ntohs(sin6->sin6_port); | ||||
| 			break; | ||||
| 	} | ||||
|  | ||||
| 	return port; | ||||
| } | ||||
| #else | ||||
|  | ||||
| static GArray * | ||||
| parse_output(const char *output) { | ||||
| 	GArray *entries; | ||||
| @@ -142,6 +206,39 @@ parse_output(const char *output) { | ||||
| 					  sizeof(entry.info.sock.dest_host)); | ||||
| 			entry.info.sock.dest_port = atoi(remote_host[1]); | ||||
|  | ||||
| 			g_strfreev(remote_host); | ||||
| 		} else if (!strcmp(ftype, "IPv6")) { | ||||
| 			char **hosts; | ||||
| 			char **remote_host; | ||||
|  | ||||
| 			if (!strstr(fname, "->")) { | ||||
| 				remote_host = g_strsplit(fname, ":", 0); | ||||
| 			} else { | ||||
| 				hosts = g_strsplit(fname, "->", 0); | ||||
| 				if (g_strv_length(hosts) < 2) { | ||||
| 					g_strfreev(hosts); | ||||
| 					continue; | ||||
| 				} | ||||
|  | ||||
| 				remote_host = g_strsplit(hosts[1], "]", 0); | ||||
| 				g_strfreev(hosts); | ||||
| 			} | ||||
|  | ||||
| 			if (g_strv_length(remote_host) < 2) { | ||||
| 				g_strfreev(remote_host); | ||||
| 				continue; | ||||
| 			} | ||||
|  | ||||
| 			entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET; | ||||
| 			if (!strcmp(remote_host[0], "*")) | ||||
| 				g_strlcpy(entry.info.sock.dest_host, "0.0.0.0", | ||||
| 					  sizeof(entry.info.sock.dest_host)); | ||||
| 			else | ||||
| 				g_strlcpy(entry.info.sock.dest_host, | ||||
| 					  remote_host[0] + 1, | ||||
| 					  sizeof(entry.info.sock.dest_host)); | ||||
| 			entry.info.sock.dest_port = atoi(remote_host[1] + 1); | ||||
|  | ||||
| 			g_strfreev(remote_host); | ||||
| 		} else | ||||
| 			continue; | ||||
| @@ -159,21 +256,108 @@ parse_output(const char *output) { | ||||
|  | ||||
| 	return entries; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| glibtop_open_files_entry * | ||||
| glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf,	pid_t pid) | ||||
| { | ||||
| #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104) | ||||
| 	struct kinfo_file *freep, *kif; | ||||
| 	int name[4]; | ||||
| 	size_t len; | ||||
| 	size_t i; | ||||
| #else | ||||
| 	char *output; | ||||
| #endif | ||||
| 	GArray *entries; | ||||
|  | ||||
| 	memset(buf, 0, sizeof (glibtop_proc_open_files)); | ||||
|  | ||||
| #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104) | ||||
| 	name[0] = CTL_KERN; | ||||
| 	name[1] = KERN_PROC; | ||||
| 	name[2] = KERN_PROC_FILEDESC; | ||||
| 	name[3] = pid; | ||||
|  | ||||
| 	if (sysctl(name, 4, NULL, &len, NULL, 0) < 0) | ||||
| 		return NULL; | ||||
|  | ||||
| 	freep = kif = g_malloc(len); | ||||
| 	if (sysctl(name, 4, kif, &len, NULL, 0) < 0) { | ||||
| 		g_free(freep); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry)); | ||||
|  | ||||
| 	for (i = 0; i < len / sizeof(*kif); i++, kif++) { | ||||
| 		glibtop_open_files_entry entry = {0}; | ||||
|  | ||||
| 		if (kif->kf_fd < 0) | ||||
| 			continue; | ||||
|  | ||||
| 		if (kif->kf_type == KF_TYPE_SOCKET) { | ||||
| 			if (kif->kf_sock_domain == AF_LOCAL) { | ||||
| 				struct sockaddr_un *sun; | ||||
|  | ||||
| 				entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET; | ||||
| 				sun = (struct sockaddr_un *)&kif->kf_sa_local; | ||||
|  | ||||
| 				if (sun->sun_path[0]) { | ||||
| 					char *addrstr; | ||||
|  | ||||
| 					addrstr = addr_to_string(&kif->kf_sa_local); | ||||
| 					g_strlcpy(entry.info.localsock.name, | ||||
| 						  addrstr, | ||||
| 						  sizeof(entry.info.localsock.name)); | ||||
| 					g_free(addrstr); | ||||
| 				} else { | ||||
| 					char *addrstr; | ||||
|  | ||||
| 					addrstr = addr_to_string(&kif->kf_sa_peer); | ||||
| 					g_strlcpy(entry.info.localsock.name, | ||||
| 						  addrstr, | ||||
| 						  sizeof(entry.info.localsock.name)); | ||||
| 					g_free(addrstr); | ||||
| 				} | ||||
| 			} else if (kif->kf_sock_domain == AF_INET || | ||||
| 				   kif->kf_sock_domain == AF_INET6) { | ||||
| 				char *addrstr; | ||||
|  | ||||
| 				if (kif->kf_sock_domain == AF_INET) | ||||
| 					entry.type = GLIBTOP_FILE_TYPE_INETSOCKET; | ||||
| 				else | ||||
| 					entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET; | ||||
| 				addrstr = addr_to_string(&kif->kf_sa_peer); | ||||
| 				g_strlcpy(entry.info.sock.dest_host, | ||||
| 					  addrstr, | ||||
| 					  sizeof(entry.info.sock.dest_host)); | ||||
| 				g_free(addrstr); | ||||
| 				entry.info.sock.dest_port = addr_to_port(&kif->kf_sa_peer); | ||||
| 			} | ||||
| 		} else if (kif->kf_type == KF_TYPE_PIPE) { | ||||
| 			entry.type = GLIBTOP_FILE_TYPE_PIPE; | ||||
| 		} else if (kif->kf_type == KF_TYPE_VNODE) { | ||||
| 			entry.type = GLIBTOP_FILE_TYPE_FILE; | ||||
| 			g_strlcpy(entry.info.file.name, kif->kf_path, | ||||
| 				  sizeof(entry.info.file.name)); | ||||
| 		} else | ||||
| 			continue; | ||||
|  | ||||
| 		entry.fd = kif->kf_fd; | ||||
|  | ||||
| 		g_array_append_val(entries, entry); | ||||
| 	} | ||||
| 	g_free(freep); | ||||
| #else | ||||
|  | ||||
| 	output = execute_lsof(pid); | ||||
| 	if (output == NULL) return NULL; | ||||
|  | ||||
| 	entries = parse_output(output); | ||||
|  | ||||
| 	g_free(output); | ||||
| #endif | ||||
|  | ||||
| 	buf->flags = _glibtop_sysdeps_proc_open_files; | ||||
| 	buf->number = entries->len; | ||||
|   | ||||
| @@ -24,7 +24,9 @@ | ||||
| #include <glibtop_private.h> | ||||
|  | ||||
| #include <sys/types.h> | ||||
| #include <sys/sysctl.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/user.h> | ||||
| #include <string.h> | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_proc_wd = | ||||
| @@ -38,6 +40,7 @@ _glibtop_init_proc_wd_s(glibtop *server) | ||||
| 	server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd; | ||||
| } | ||||
|  | ||||
| #if (__FreeBSD_version >= 800000 && __FreeBSD_version < 800019) || _FreeBSD_version < 700104 | ||||
| static GPtrArray * | ||||
| parse_output(const char *output, glibtop_proc_wd *buf) | ||||
| { | ||||
| @@ -89,12 +92,21 @@ parse_output(const char *output, glibtop_proc_wd *buf) | ||||
|  | ||||
| 	return dirs; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| char** | ||||
| glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid) | ||||
| { | ||||
| 	char path[MAXPATHLEN]; | ||||
| #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104) | ||||
| 	struct kinfo_file *freep, *kif; | ||||
| 	GPtrArray *dirs; | ||||
| 	size_t len; | ||||
| 	int i; | ||||
| 	int name[4]; | ||||
| #else | ||||
| 	char *output; | ||||
| #endif | ||||
|  | ||||
| 	memset (buf, 0, sizeof (glibtop_proc_wd)); | ||||
|  | ||||
| @@ -102,6 +114,43 @@ glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid) | ||||
| 	if (safe_readlink(path, buf->exe, sizeof(buf->exe))) | ||||
| 		buf->flags |= (1 << GLIBTOP_PROC_WD_EXE); | ||||
|  | ||||
| #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104) | ||||
| 	name[0] = CTL_KERN; | ||||
| 	name[1] = KERN_PROC; | ||||
| 	name[2] = KERN_PROC_FILEDESC; | ||||
| 	name[3] = pid; | ||||
|  | ||||
| 	if (sysctl(name, 4, NULL, &len, NULL, 0) < 0) | ||||
| 		return NULL; | ||||
| 	freep = kif = g_malloc(len); | ||||
| 	if (sysctl(name, 4, kif, &len, NULL, 0) < 0) { | ||||
| 		g_free(freep); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	dirs = g_ptr_array_sized_new(1); | ||||
|  | ||||
| 	for (i = 0; i < len / sizeof(*kif); i++, kif++) { | ||||
| 		switch (kif->kf_fd) { | ||||
| 			case KF_FD_TYPE_ROOT: | ||||
| 				g_strlcpy(buf->root, kif->kf_path, | ||||
| 					   sizeof(buf->root)); | ||||
| 				buf->flags |= (1 << GLIBTOP_PROC_WD_ROOT); | ||||
| 				break; | ||||
| 			case KF_FD_TYPE_CWD: | ||||
| 				g_ptr_array_add(dirs, g_strdup (kif->kf_path)); | ||||
| 				break; | ||||
| 		} | ||||
| 	} | ||||
| 	g_free(freep); | ||||
|  | ||||
| 	buf->number = dirs->len; | ||||
| 	buf->flags |= (1 << GLIBTOP_PROC_WD_NUMBER); | ||||
|  | ||||
| 	g_ptr_array_add(dirs, NULL); | ||||
|  | ||||
| 	return (char **)g_ptr_array_free(dirs, FALSE); | ||||
| #else | ||||
| 	output = execute_lsof(pid); | ||||
| 	if (output != NULL) { | ||||
| 		GPtrArray *dirs; | ||||
| @@ -116,6 +165,7 @@ glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid) | ||||
|  | ||||
| 		return (char **)g_ptr_array_free(dirs, FALSE); | ||||
| 	} | ||||
| #endif | ||||
|  | ||||
| 	return NULL; | ||||
| } | ||||
|   | ||||
| @@ -25,6 +25,7 @@ | ||||
| #include <glibtop/shm_limits.h> | ||||
|  | ||||
| #include <sys/types.h> | ||||
| #include <sys/param.h> | ||||
| #include <sys/sysctl.h> | ||||
|  | ||||
| static unsigned long _glibtop_sysdeps_shm_limits = | ||||
| @@ -46,7 +47,11 @@ void | ||||
| glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf) | ||||
| { | ||||
| 	size_t len; | ||||
| #if __FreeBSD_version < 700002 | ||||
| 	int shmmax, shmmin, shmmni, shmseg, shmall; | ||||
| #else | ||||
| 	unsigned long shmmax, shmmin, shmmni, shmseg, shmall; | ||||
| #endif | ||||
|  | ||||
| 	glibtop_init_s (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0); | ||||
|  | ||||
|   | ||||
| @@ -8,6 +8,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 \ | ||||
| 				  procsegment.c procargs.c procmap.c siglist.c \ | ||||
| 				  sysinfo.c netload.c ppp.c glibtop_private.c \ | ||||
| 				  mountlist.c  procaffinity.c \ | ||||
| 				  fsusage.c netlist.c procopenfiles.c procwd.c | ||||
|  | ||||
| libgtop_sysdeps_2_0_la_LIBADD	=  @GLIB_LIBS@ | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| #include <config.h> | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/fsusage.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include "glibtop_private.h" | ||||
|  | ||||
| @@ -10,15 +11,12 @@ | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
| #include <linux/kdev_t.h> | ||||
|  | ||||
| #include <sys/statvfs.h> | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
| #include <mntent.h> | ||||
|  | ||||
| void | ||||
| _glibtop_linux_get_fsusage_read_write(glibtop *server, | ||||
| 				      glibtop_fsusage *buf, | ||||
| 				      const char *path); | ||||
|  | ||||
| /* | ||||
|  * Linux 2.6.x | ||||
| @@ -28,66 +26,102 @@ _glibtop_linux_get_fsusage_read_write(glibtop *server, | ||||
|  | ||||
|  | ||||
|  | ||||
| static char * | ||||
| get_partition(const char *mountpoint) | ||||
| static gboolean | ||||
| get_device(glibtop* server, const char *mountpoint, | ||||
| 	   char* device, size_t device_size) | ||||
| { | ||||
| 	FILE *partitions; | ||||
| 	char *name = NULL; | ||||
| 	char line[1024]; | ||||
| 	struct stat statb; | ||||
| 	const struct mntent *mnt; | ||||
| 	FILE *fp; | ||||
| 	gboolean found = FALSE; | ||||
|  | ||||
| 	if(stat(mountpoint, &statb) == -1) | ||||
| 		return NULL; | ||||
|  | ||||
| 	if((partitions = fopen("/proc/partitions", "r")) == NULL) | ||||
| 		return NULL; | ||||
|  | ||||
| 	while(fgets(line, sizeof line, partitions)) | ||||
| 	{ | ||||
| 		unsigned major, minor; | ||||
| 		char dev[32]; | ||||
|  | ||||
| 		if(sscanf(line, "%u %u %*u %31s", &major, &minor, dev) != 3) | ||||
| 			continue; | ||||
|  | ||||
| 		if(MKDEV(major, minor) != statb.st_dev) | ||||
| 			continue; | ||||
|  | ||||
| 		name = g_strdup(dev); | ||||
| 		break; | ||||
| 	if (!(fp = setmntent(MOUNTED, "r"))) { | ||||
| 		glibtop_warn_io_r(server, "Could not open %s", MOUNTED); | ||||
| 		goto out; | ||||
| 	} | ||||
|  | ||||
| 	fclose(partitions); | ||||
| 	return name; | ||||
| 	while ((mnt = getmntent(fp))) | ||||
| 	{ | ||||
| 		if (!strcmp(mountpoint, mnt->mnt_dir)) { | ||||
| 			if (!strncmp(mnt->mnt_fsname, "/dev/", 5)) { | ||||
| 				g_strlcpy(device, mnt->mnt_fsname + 5, device_size); | ||||
| 				found = TRUE; | ||||
| 			} | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	endmntent(fp); | ||||
| out: | ||||
| 	return found; | ||||
| } | ||||
|  | ||||
|  | ||||
| static void | ||||
| get_sys_path(const char *device, char **stat_path, const char **parse_format) | ||||
| /* | ||||
|   TRUE if device is like "hda3" and then set prefix to "hda". | ||||
|  */ | ||||
| static gboolean | ||||
| is_partition(const char* device, char* prefix, size_t prefix_size) | ||||
| { | ||||
| 	if(g_str_has_prefix(device, "hd") || g_str_has_prefix(device, "sd")) | ||||
| 	{ | ||||
| 		char *prefix; | ||||
| 		char *path; | ||||
| 		size_t offset; | ||||
| 	g_strlcpy(prefix, device, prefix_size); | ||||
|  | ||||
| 		offset = strcspn(device, "0123456789"); | ||||
| 	for ( ; *prefix; prefix++) { | ||||
| 		if (isdigit(*prefix)) { | ||||
| 			*prefix = '\0'; | ||||
| 			return TRUE; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 		prefix = g_strdup(device); | ||||
| 		prefix [offset] = '\0'; | ||||
| 	return FALSE; | ||||
| } | ||||
|  | ||||
| 		path = g_strdup_printf("/sys/block/%s/%s/stat", | ||||
| 				       prefix, device); | ||||
|  | ||||
| 		g_free(prefix); | ||||
| /* | ||||
|   Bug #539360. | ||||
|   /sys/.../stat format is partially defined in | ||||
|   linux/Documentation/block/stat.txt (looks outdated).  Before linux | ||||
|   2.5.25, /sys/block/%s/stat and /sys/block/%s/%s/stat were not the | ||||
|   same, but the following commit changed the latter to have the same | ||||
|   format and broke compatibility. | ||||
|  | ||||
| 		*stat_path = path; | ||||
| 		*parse_format = "%*llu %llu %*llu %llu"; | ||||
|   Commit 34e8beac92c27d292938065f8375842d2840767c | ||||
|   Author: Jerome Marchand <jmarchan@redhat.com> | ||||
|   Date:   Fri Feb 8 11:04:55 2008 +0100 | ||||
|  | ||||
|     Enhanced partition statistics: sysfs | ||||
|  | ||||
|     Reports enhanced partition statistics in sysfs. | ||||
|  | ||||
|     Signed-off-by: Jerome Marchand <jmarchan@redhat.com> | ||||
|  | ||||
|     fs/partitions/check.c |   22 +++++++++++++++++++--- | ||||
|     1 files changed, 19 insertions(+), 3 deletions(-) | ||||
|  | ||||
|  */ | ||||
|  | ||||
| static void | ||||
| get_sys_path(glibtop* server, const char *device, char **stat_path, const char **parse_format) | ||||
| { | ||||
| 	const char* linux_2_6_25_format = "%*llu %*llu %llu %*llu" | ||||
| 					  "%*llu %*llu %llu %*llu"; | ||||
|  | ||||
| 	char prefix[32]; | ||||
|  | ||||
| 	if (is_partition(device, prefix, sizeof prefix)) { | ||||
|  | ||||
| 		*stat_path = g_strdup_printf("/sys/block/%s/%s/stat", | ||||
| 					     prefix, device); | ||||
| 		if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 25)) | ||||
| 			*parse_format = "%*llu %llu %*llu %llu"; | ||||
| 		else | ||||
| 			*parse_format = linux_2_6_25_format; | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		*stat_path = g_strdup_printf("/sys/block/%s/stat", device); | ||||
| 		*parse_format = "%*llu %*llu %llu %*llu %*llu %*llu %llu"; | ||||
| 		if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 25)) | ||||
| 			*parse_format = "%*llu %*llu %llu %*llu %*llu %*llu %llu"; | ||||
| 		else | ||||
| 			*parse_format = linux_2_6_25_format; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @@ -95,17 +129,16 @@ get_sys_path(const char *device, char **stat_path, const char **parse_format) | ||||
|  | ||||
| static void linux_2_6_0(glibtop *server, glibtop_fsusage *buf, const char *path) | ||||
| { | ||||
| 	char *device; | ||||
| 	char *filename; | ||||
| 	const char *format; | ||||
| 	int ret; | ||||
| 	char buffer[BUFSIZ]; | ||||
| 	char device[64]; | ||||
|  | ||||
| 	device = get_partition(path); | ||||
| 	if(!device) return; | ||||
| 	if (!get_device(server, path, device, sizeof device)) | ||||
| 		return; | ||||
|  | ||||
| 	get_sys_path(device, &filename, &format); | ||||
| 	g_free(device); | ||||
| 	get_sys_path(server, device, &filename, &format); | ||||
|  | ||||
| 	ret = try_file_to_buffer(buffer, sizeof buffer, filename); | ||||
|  | ||||
| @@ -127,10 +160,8 @@ static void linux_2_4_0(glibtop *server, glibtop_fsusage *buf, const char *path) | ||||
| } | ||||
|  | ||||
|  | ||||
| void | ||||
| _glibtop_linux_get_fsusage_read_write(glibtop *server, | ||||
| 				      glibtop_fsusage *buf, | ||||
| 				      const char *path) | ||||
| static void | ||||
| get_fsusage_read_write(glibtop *server, glibtop_fsusage *buf, const char *path) | ||||
| { | ||||
|   if(server->os_version_code >= LINUX_VERSION_CODE(2, 6, 0)) | ||||
|     { | ||||
| @@ -141,3 +172,39 @@ _glibtop_linux_get_fsusage_read_write(glibtop *server, | ||||
|       linux_2_4_0(server, buf, path); | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
| /* the following comes from sysdeps/common/mountlist.c if copyright matters... | ||||
|  */ | ||||
|  | ||||
| static const unsigned long _glibtop_sysdeps_fsusage = | ||||
| (1L << GLIBTOP_FSUSAGE_BLOCKS) + (1L << GLIBTOP_FSUSAGE_BFREE) | ||||
| + (1L << GLIBTOP_FSUSAGE_BAVAIL) + (1L << GLIBTOP_FSUSAGE_FILES) | ||||
| + (1L << GLIBTOP_FSUSAGE_FFREE) + (1L << GLIBTOP_FSUSAGE_BLOCK_SIZE); | ||||
|  | ||||
|  | ||||
|  | ||||
| void | ||||
| glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path) | ||||
| { | ||||
|   struct statvfs fsd; | ||||
|  | ||||
|   glibtop_init_r(&server, 0, 0); | ||||
|   memset(buf, 0, sizeof(glibtop_fsusage)); | ||||
|  | ||||
|   if (statvfs(path, &fsd) < 0) { | ||||
|     glibtop_warn_r(server, "statvfs '%s' failed", path); | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   buf->blocks = fsd.f_blocks; | ||||
|   buf->bfree  = fsd.f_bfree; | ||||
|   buf->bavail = (fsd.f_bavail > fsd.f_bfree) ? 0 : fsd.f_bavail; | ||||
|   buf->files  = fsd.f_files; | ||||
|   buf->ffree  = fsd.f_ffree; | ||||
|   buf->block_size = fsd.f_bsize; | ||||
|   buf->flags = _glibtop_sysdeps_fsusage; | ||||
|  | ||||
|   /* setting additional flags is delegated */ | ||||
|   get_fsusage_read_write(server, buf, path); | ||||
| } | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
| unsigned long long | ||||
| get_scaled(const char *buffer, const char *key) | ||||
| { | ||||
| 	const char    *ptr = buffer;; | ||||
| 	const char    *ptr = buffer; | ||||
| 	char	      *next; | ||||
| 	unsigned long long value; | ||||
|  | ||||
| @@ -119,20 +119,27 @@ file_to_buffer(glibtop *server, char *buffer, size_t bufsiz, const char *filenam | ||||
| static unsigned long | ||||
| read_boot_time(glibtop *server) | ||||
| { | ||||
| 	char buffer[BUFSIZ]; | ||||
| 	char *btime; | ||||
| 	char* line = NULL; | ||||
| 	size_t size = 0; | ||||
| 	FILE* stat; | ||||
| 	unsigned long btime = 0; | ||||
|  | ||||
| 	file_to_buffer(server, buffer, sizeof buffer, "/proc/stat"); | ||||
|  | ||||
| 	btime = strstr(buffer, "btime"); | ||||
|  | ||||
| 	if (!btime) { | ||||
| 		glibtop_warn_io_r(server, "cannot find btime in /proc/stat"); | ||||
| 		return 0UL; | ||||
| 	if (!(stat = fopen("/proc/stat", "r"))) { | ||||
| 		glibtop_error_io_r(server, "fopen(\"/proc/stat\")"); | ||||
| 		goto out; | ||||
| 	} | ||||
|  | ||||
| 	btime = skip_token(btime); | ||||
| 	return strtoul(btime, NULL, 10); | ||||
| 	while (getline(&line, &size, stat) != -1) { | ||||
| 		if (!strncmp(line, "btime", 5)) { | ||||
| 			btime = strtoul(skip_token(line), NULL, 10); | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	free(line); | ||||
| 	fclose(stat); | ||||
| out: | ||||
| 	return btime; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -61,7 +61,11 @@ skip_line (const char *p) | ||||
| 	return (char *) (*p ? p+1 : p); | ||||
| } | ||||
|  | ||||
|  | ||||
| /* | ||||
|  * Smart strtoul which handles binary suffixes | ||||
|  * e.g: get_scaled("Size: 32 kB", "Size:") == 32768 | ||||
|  * key can be NULL if there's not prefix to strip (or prefix size is known | ||||
|  */ | ||||
| unsigned long long | ||||
| get_scaled(const char *buffer, const char *key); | ||||
|  | ||||
|   | ||||
| @@ -43,6 +43,7 @@ | ||||
| #define GLIBTOP_SUID_NETLOAD		0 | ||||
| #define GLIBTOP_SUID_NETLIST		0 | ||||
| #define GLIBTOP_SUID_PROC_WD		0 | ||||
| #define GLIBTOP_SUID_PROC_AFFINITY	0 | ||||
| #define GLIBTOP_SUID_PPP		0 | ||||
| #define GLIBTOP_SUID_PROC_FILE		0 | ||||
|  | ||||
|   | ||||
							
								
								
									
										166
									
								
								sysdeps/linux/mountlist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										166
									
								
								sysdeps/linux/mountlist.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,166 @@ | ||||
| /* mountlist.c -- return a list of mounted filesystems | ||||
|    Copyright (C) 1991, 1992 Free Software Foundation, Inc. | ||||
|  | ||||
|    This file is a fork of sysdeps/common/mountlist.c. | ||||
|  | ||||
|    This program 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, or (at your option) | ||||
|    any later version. | ||||
|  | ||||
|    This program 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 this program; if not, write to the Free Software Foundation, | ||||
|    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ | ||||
|  | ||||
|  | ||||
| /* | ||||
| Local Variables: | ||||
| mode: C | ||||
| c-file-style: "gnu" | ||||
| End: | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <mntent.h> | ||||
|  | ||||
| #include <glibtop.h> | ||||
| #include <glibtop/mountlist.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
|  | ||||
| /* IgnoreList */ | ||||
|  | ||||
|  | ||||
| typedef struct | ||||
| { | ||||
|   GHashTable *table; | ||||
| } IgnoreList; | ||||
|  | ||||
|  | ||||
| static IgnoreList* | ||||
| ignore_list_new(void) | ||||
| { | ||||
|   IgnoreList* ig; | ||||
|   ig = g_new(IgnoreList, 1); | ||||
|   ig->table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); | ||||
|   return ig; | ||||
| } | ||||
|  | ||||
|  | ||||
| static void | ||||
| ignore_list_delete(IgnoreList* ig) | ||||
| { | ||||
|   if (ig) { | ||||
|     g_hash_table_destroy(ig->table); | ||||
|     g_free(ig); | ||||
|   } | ||||
| } | ||||
|  | ||||
|  | ||||
| static void | ||||
| ignore_list_add(IgnoreList* ig, const char* fs) | ||||
| { | ||||
|   g_hash_table_insert(ig->table, g_strdup(fs), GINT_TO_POINTER(1)); | ||||
| } | ||||
|  | ||||
|  | ||||
| static gboolean | ||||
| ignore_list_has(IgnoreList* ig, const char* fs) | ||||
| { | ||||
|   gpointer data; | ||||
|   data = g_hash_table_lookup(ig->table, fs); | ||||
|   return data != NULL; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* ~IgnoreList */ | ||||
|  | ||||
|  | ||||
| static gboolean | ||||
| ignore_fs(const char *fstype, IgnoreList** ig) | ||||
| { | ||||
|   if (!*ig) { | ||||
|     FILE* fs; | ||||
|     char line[128]; | ||||
|  | ||||
|     *ig = ignore_list_new(); | ||||
|  | ||||
|     if ((fs = fopen("/proc/filesystems", "r")) != NULL) { | ||||
|       while (fgets(line, sizeof line, fs)) { | ||||
| 	if (!strncmp(line, "nodev", 5)) { | ||||
| 	  char *type; | ||||
| 	  type = g_strstrip(line + 5); | ||||
| 	  ignore_list_add(*ig, type); | ||||
| 	} | ||||
|       } | ||||
|       fclose(fs); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   return ignore_list_has(*ig, fstype); | ||||
| } | ||||
|  | ||||
|  | ||||
| glibtop_mountentry * | ||||
| glibtop_get_mountlist_s(glibtop *server, glibtop_mountlist *buf, int all_fs) | ||||
| { | ||||
|   const struct mntent *mnt; | ||||
|   FILE *fp; | ||||
|   GArray* entries; | ||||
|   IgnoreList* ig = NULL; | ||||
|  | ||||
|   glibtop_init_r(&server, 0, 0); | ||||
|   memset(buf, 0, sizeof(glibtop_mountlist)); | ||||
|  | ||||
|   /* wild guess, preallocate 8 entries | ||||
|      on a desktop, almost everyone has / and a tmpfs for udev | ||||
|      if all_fs, there are also proc, sys, fuse, binfmt, etc */ | ||||
|   entries = g_array_sized_new(FALSE, FALSE, sizeof(glibtop_mountentry), 8); | ||||
|  | ||||
|   if (!(fp = setmntent(MOUNTED, "r"))) { | ||||
|       glibtop_warn_io_r(server, "Could not open %s", MOUNTED); | ||||
|       goto out; | ||||
|     } | ||||
|  | ||||
|   while ((mnt = getmntent(fp))) | ||||
|     { | ||||
|       glibtop_mountentry *me; | ||||
|       const char *devopt; | ||||
|       gsize len; | ||||
|  | ||||
|       if (!all_fs && ignore_fs(mnt->mnt_type, &ig)) | ||||
| 	continue; | ||||
|  | ||||
|       len = entries->len; | ||||
|       g_array_set_size(entries, len + 1); | ||||
|       me = &g_array_index(entries, glibtop_mountentry, len); | ||||
|  | ||||
|       g_strlcpy(me->devname, mnt->mnt_fsname, sizeof me->devname); | ||||
|       g_strlcpy(me->mountdir, mnt->mnt_dir, sizeof me->mountdir); | ||||
|       g_strlcpy(me->type, mnt->mnt_type, sizeof me->type); | ||||
|       devopt = strstr(mnt->mnt_opts, "dev="); | ||||
|       me->dev = (devopt ? strtoull(devopt + sizeof "dev=", NULL, 0) : (dev_t)-1); | ||||
|     } | ||||
|  | ||||
|     endmntent(fp); | ||||
|  | ||||
|  | ||||
|   out: | ||||
|     ignore_list_delete(ig); | ||||
|  | ||||
|     buf->size = sizeof(glibtop_mountentry); | ||||
|     buf->number = entries->len; | ||||
|     buf->total = buf->number * buf->size; | ||||
|     buf->flags = (1 << GLIBTOP_MOUNTLIST_SIZE) | ||||
|     | (1 << GLIBTOP_MOUNTLIST_NUMBER) | ||||
|     | (1 << GLIBTOP_MOUNTLIST_TOTAL); | ||||
|  | ||||
|   return (glibtop_mountentry*) g_array_free(entries, FALSE); | ||||
| } | ||||
| @@ -0,0 +1,69 @@ | ||||
| /* Copyright (C) 2007 Benoît Dejean | ||||
|    This file is part of LibGTop 2. | ||||
|  | ||||
|    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., 59 Temple Place - Suite 330, | ||||
|    Boston, MA 02111-1307, USA. | ||||
| */ | ||||
|  | ||||
| #include <config.h> | ||||
| #include <glibtop/procaffinity.h> | ||||
| #include <glibtop/error.h> | ||||
|  | ||||
| #include <glibtop_private.h> | ||||
|  | ||||
| #include <sched.h> | ||||
|  | ||||
|  | ||||
| void | ||||
| _glibtop_init_proc_affinity_s(glibtop *server) | ||||
| { | ||||
|   server->sysdeps.proc_affinity = | ||||
|     (1 << GLIBTOP_PROC_AFFINITY_NUMBER) | | ||||
|     (1 << GLIBTOP_PROC_AFFINITY_ALL); | ||||
|  | ||||
| } | ||||
|  | ||||
|  | ||||
| guint16 * | ||||
| glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid) | ||||
| { | ||||
|   cpu_set_t set; | ||||
|   size_t i; | ||||
|   GArray* cpus; | ||||
|  | ||||
|   memset(buf, 0, sizeof *buf); | ||||
|  | ||||
|   if (sched_getaffinity(pid, sizeof set, &set) == -1) { | ||||
|     glibtop_error_r(server, "sched_getaffinity failed"); | ||||
|     return NULL; | ||||
|   } | ||||
|  | ||||
|   cpus = g_array_new(FALSE, FALSE, sizeof(guint16)); | ||||
|  | ||||
|   for (i = 0; i < MIN(CPU_SETSIZE, (size_t)(server->ncpu + 1)); i++) { | ||||
|     if (CPU_ISSET(i, &set)) { | ||||
|       guint16 n = i; | ||||
|       g_array_append_val(cpus, n); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   buf->number = cpus->len; | ||||
|   buf->all = (cpus->len == (size_t)(server->ncpu + 1)); | ||||
|   buf->flags = (1 << GLIBTOP_PROC_AFFINITY_NUMBER) | ||||
|     | (1 << GLIBTOP_PROC_AFFINITY_ALL); | ||||
|  | ||||
|   return (guint16*) g_array_free(cpus, FALSE); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -30,7 +30,8 @@ static const unsigned long _glibtop_sysdeps_proc_kernel = | ||||
| (1L << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) + | ||||
| (1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + (1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) + | ||||
| (1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT) + (1L << GLIBTOP_PROC_KERNEL_KSTK_ESP) + | ||||
| (1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1L << GLIBTOP_PROC_KERNEL_WCHAN); | ||||
| (1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1L << GLIBTOP_PROC_KERNEL_NWCHAN) + | ||||
| (1L << GLIBTOP_PROC_KERNEL_WCHAN); | ||||
|  | ||||
| /* Init function. */ | ||||
|  | ||||
| @@ -72,5 +73,7 @@ glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid) | ||||
|  | ||||
| 	buf->nwchan = strtoull (p, &p, 0); | ||||
|  | ||||
| 	proc_file_to_buffer(buf->wchan, sizeof buf->wchan, "/proc/%d/wchan", pid), | ||||
|  | ||||
| 	buf->flags = _glibtop_sysdeps_proc_kernel; | ||||
| } | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user