Compare commits
	
		
			3 Commits
		
	
	
		
			LIBGTOP_2_
			...
			solaris_ma
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					26b4615262 | ||
| 
						 | 
					c4ccf53aad | ||
| 
						 | 
					8fe9163e6b | 
							
								
								
									
										2
									
								
								po/de.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/de.po
									
									
									
									
									
								
							@@ -5,7 +5,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: libgtop VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: Martin Baulig <martin@home-of-linux.org>\n"
 | 
			
		||||
"Language-Team: Martin Baulig <martin@home-of-linux.org>\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								po/es.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/es.po
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: glibtop 1.0.0\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-23 13:48+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
 | 
			
		||||
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
 | 
			
		||||
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
			
		||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								po/fr.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/fr.po
									
									
									
									
									
								
							@@ -5,7 +5,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: libgtop VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
			
		||||
"Last-Translator: Vincent Renardias <vincent@waw.com>\n"
 | 
			
		||||
"Language-Team: Vincent Renardias <vincent@waw.com>\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								po/ja.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/ja.po
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: libgtop VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: 1998-12-11 06:53+09:00\n"
 | 
			
		||||
"Last-Translator: Eiichiro ITANI <emu@ceres.dti.ne.jp>\n"
 | 
			
		||||
"Language-Team: <gnome@lists.hypercore.co.jp>\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								po/ko.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/ko.po
									
									
									
									
									
								
							@@ -5,7 +5,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: libgtop VERSION\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: 1999-02-04 14:31:38+0900\n"
 | 
			
		||||
"Last-Translator: Sung-Hyun Nam <namsh@lgic.co.kr>\n"
 | 
			
		||||
"Language-Team: Korean <ko@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								po/no.po
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								po/no.po
									
									
									
									
									
								
							@@ -5,7 +5,7 @@
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: libgtop 0.99.3\n"
 | 
			
		||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
 | 
			
		||||
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
 | 
			
		||||
"PO-Revision-Date: 1999-01-27 23:22+0100\n"
 | 
			
		||||
"Last-Translator: Kjartan Maraas <kmaraas@fib.hl.no>\n"
 | 
			
		||||
"Language-Team: Norwegian <no@li.org>\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								sysdeps/solaris/Makefile.am
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								sysdeps/solaris/Makefile.am
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
LINK				= $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
 | 
			
		||||
 | 
			
		||||
INCLUDES			= @INCLUDES@
 | 
			
		||||
 | 
			
		||||
lib_LTLIBRARIES			= libgtop_sysdeps.la
 | 
			
		||||
 | 
			
		||||
libgtop_sysdeps_la_SOURCES	= open.c close.c siglist.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 procdata.c
 | 
			
		||||
 | 
			
		||||
libgtop_sysdeps_la_LDFLAGS	= $(LT_VERSION_INFO)
 | 
			
		||||
 | 
			
		||||
include_HEADERS			= glibtop_server.h glibtop_machine.h
 | 
			
		||||
noinst_HEADERS			= glibtop_private.h
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										30
									
								
								sysdeps/solaris/close.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								sysdeps/solaris/close.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop/close.h>
 | 
			
		||||
 | 
			
		||||
/* Closes pipe to gtop server. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_close_s (glibtop *server)
 | 
			
		||||
{ }
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/cpu.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/cpu.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/cpu.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_cpu = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_cpu_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.cpu = _glibtop_sysdeps_cpu;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides information about cpu usage. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_cpu));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										46
									
								
								sysdeps/solaris/glibtop_machine.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								sysdeps/solaris/glibtop_machine.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 1998-99 Martin Baulig
 | 
			
		||||
   This file is part of LibGTop 1.0.
 | 
			
		||||
 | 
			
		||||
   Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
 | 
			
		||||
 | 
			
		||||
   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_MACHINE_H__
 | 
			
		||||
#define __GLIBTOP_MACHINE_H__
 | 
			
		||||
 | 
			
		||||
#include <sys/param.h>
 | 
			
		||||
#include <procfs.h>
 | 
			
		||||
#include <kstat.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
 | 
			
		||||
BEGIN_LIBGTOP_DECLS
 | 
			
		||||
 | 
			
		||||
typedef struct _glibtop_machine glibtop_machine;
 | 
			
		||||
 | 
			
		||||
struct _glibtop_machine
 | 
			
		||||
{
 | 
			
		||||
	uid_t uid, euid;
 | 
			
		||||
	gid_t gid, egid;
 | 
			
		||||
 | 
			
		||||
	kstat_ctl_t *kstat;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
END_LIBGTOP_DECLS
 | 
			
		||||
 | 
			
		||||
#endif __GLIBTOP_MACHINE_H__
 | 
			
		||||
							
								
								
									
										45
									
								
								sysdeps/solaris/glibtop_private.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								sysdeps/solaris/glibtop_private.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 1998-99 Martin Baulig
 | 
			
		||||
   This file is part of LibGTop 1.0.
 | 
			
		||||
 | 
			
		||||
   Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
 | 
			
		||||
 | 
			
		||||
   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_PRIVATE_H__
 | 
			
		||||
#define __GLIBTOP_PRIVATE_H__
 | 
			
		||||
 | 
			
		||||
#include <glibtop.h>
 | 
			
		||||
#include <glibtop/error.h>
 | 
			
		||||
 | 
			
		||||
#include <sys/param.h>
 | 
			
		||||
#include <procfs.h>
 | 
			
		||||
#include <kstat.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
 | 
			
		||||
BEGIN_LIBGTOP_DECLS
 | 
			
		||||
 | 
			
		||||
/* Read /proc/<pid>/psinfo */
 | 
			
		||||
int glibtop_get_proc_data_psinfo_s (glibtop *server, struct psinfo *psinfo, pid_t pid);
 | 
			
		||||
 | 
			
		||||
/* Read /proc/<pid>/usage */
 | 
			
		||||
int glibtop_get_proc_data_usage_s (glibtop *server, struct prusage *prusage, pid_t pid);
 | 
			
		||||
 | 
			
		||||
END_LIBGTOP_DECLS
 | 
			
		||||
 | 
			
		||||
#endif __GLIBTOP_PRIVATE_H__
 | 
			
		||||
							
								
								
									
										52
									
								
								sysdeps/solaris/glibtop_server.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								sysdeps/solaris/glibtop_server.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef __GLIBTOP_SERVER_H__
 | 
			
		||||
#define __GLIBTOP_SERVER_H__
 | 
			
		||||
 | 
			
		||||
BEGIN_LIBGTOP_DECLS
 | 
			
		||||
 | 
			
		||||
#define GLIBTOP_SUID_CPU		0
 | 
			
		||||
#define GLIBTOP_SUID_MEM		0
 | 
			
		||||
#define GLIBTOP_SUID_SWAP		0
 | 
			
		||||
#define GLIBTOP_SUID_UPTIME		0
 | 
			
		||||
#define GLIBTOP_SUID_LOADAVG		0
 | 
			
		||||
#define GLIBTOP_SUID_SHM_LIMITS		0
 | 
			
		||||
#define GLIBTOP_SUID_MSG_LIMITS		0
 | 
			
		||||
#define GLIBTOP_SUID_SEM_LIMITS		0
 | 
			
		||||
#define GLIBTOP_SUID_PROCLIST		0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_STATE		0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_UID		0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_MEM		0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_TIME		0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_SIGNAL	0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_KERNEL	0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_SEGMENT	0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_ARGS		0
 | 
			
		||||
#define GLIBTOP_SUID_PROC_MAP		0
 | 
			
		||||
#define GLIBTOP_SUID_NETLOAD		0
 | 
			
		||||
#define GLIBTOP_SUID_PPP		0
 | 
			
		||||
 | 
			
		||||
END_LIBGTOP_DECLS
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										51
									
								
								sysdeps/solaris/loadavg.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								sysdeps/solaris/loadavg.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 1998-99 Martin Baulig
 | 
			
		||||
   This file is part of LibGTop 1.0.
 | 
			
		||||
 | 
			
		||||
   Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
 | 
			
		||||
 | 
			
		||||
   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.h>
 | 
			
		||||
#include <glibtop/loadavg.h>
 | 
			
		||||
 | 
			
		||||
#include <sys/loadavg.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_loadavg =
 | 
			
		||||
(1 << GLIBTOP_LOADAVG_LOADAVG);
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_loadavg_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides load averange. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_loadavg));
 | 
			
		||||
 | 
			
		||||
	if (getloadavg (buf->loadavg, 3))
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	buf->flags = _glibtop_sysdeps_loadavg;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/mem.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/mem.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/mem.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_mem = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_mem_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.mem = _glibtop_sysdeps_mem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides information about memory usage. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_mem));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/msg_limits.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/msg_limits.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/msg_limits.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_msg_limits = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_msg_limits_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides information about sysv ipc limits. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_msg_limits));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										45
									
								
								sysdeps/solaris/netload.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								sysdeps/solaris/netload.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 1998-99 Martin Baulig
 | 
			
		||||
   This file is part of LibGTop 1.0.
 | 
			
		||||
 | 
			
		||||
   Contributed by Martin Baulig <martin@home-of-linux.org>, October 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/error.h>
 | 
			
		||||
#include <glibtop/netload.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_netload = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_netload_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.netload = _glibtop_sysdeps_netload;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides network statistics. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
 | 
			
		||||
		       const char *interface)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_netload));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										38
									
								
								sysdeps/solaris/open.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								sysdeps/solaris/open.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop/open.h>
 | 
			
		||||
 | 
			
		||||
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_open_s (glibtop *server, const char *program_name,
 | 
			
		||||
		const unsigned long features, const unsigned flags)
 | 
			
		||||
{
 | 
			
		||||
	server->name = program_name;
 | 
			
		||||
 | 
			
		||||
	server->machine.kstat = kstat_open ();
 | 
			
		||||
 | 
			
		||||
	if (!server->machine.kstat)
 | 
			
		||||
		glibtop_error_io_r (server, "kstat_open ()");
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								sysdeps/solaris/ppp.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								sysdeps/solaris/ppp.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 1998-99 Martin Baulig
 | 
			
		||||
   This file is part of LibGTop 1.0.
 | 
			
		||||
 | 
			
		||||
   Contributed by Martin Baulig <martin@home-of-linux.org>, October 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/error.h>
 | 
			
		||||
#include <glibtop/ppp.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_ppp = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_ppp_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.ppp = _glibtop_sysdeps_ppp;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides PPP/ISDN information. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_ppp));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										47
									
								
								sysdeps/solaris/procargs.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								sysdeps/solaris/procargs.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/error.h>
 | 
			
		||||
#include <glibtop/xmalloc.h>
 | 
			
		||||
#include <glibtop/procargs.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_args = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_args_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
char *
 | 
			
		||||
glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
 | 
			
		||||
			 pid_t pid, unsigned max_len)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_args));
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										73
									
								
								sysdeps/solaris/procdata.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								sysdeps/solaris/procdata.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop_private.h>
 | 
			
		||||
 | 
			
		||||
/* Read /proc/<pid>/psinfo. */
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
glibtop_get_proc_data_psinfo_s (glibtop *server, struct psinfo *psinfo, pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	int fd;
 | 
			
		||||
	char buffer [BUFSIZ];
 | 
			
		||||
 | 
			
		||||
	sprintf (buffer, "/proc/%d/psinfo", (int) pid);
 | 
			
		||||
	fd = open (buffer, O_RDONLY);
 | 
			
		||||
	if (fd < 0) {
 | 
			
		||||
		glibtop_warn_io_r (server, "open (%s)", buffer);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (read (fd, psinfo, sizeof (struct psinfo)) != sizeof (struct psinfo)) {
 | 
			
		||||
		close (fd);
 | 
			
		||||
		glibtop_warn_io_r (server, "read (%s)", buffer);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	close (fd);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
glibtop_get_proc_data_usage_s (glibtop *server, struct prusage *prusage, pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	int fd;
 | 
			
		||||
	char buffer [BUFSIZ];
 | 
			
		||||
 | 
			
		||||
	sprintf (buffer, "/proc/%d/usage", (int) pid);
 | 
			
		||||
	fd = open (buffer, O_RDONLY);
 | 
			
		||||
	if (fd < 0) {
 | 
			
		||||
		glibtop_warn_io_r (server, "open (%s)", buffer);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (read (fd, prusage, sizeof (struct prusage)) != sizeof (struct prusage)) {
 | 
			
		||||
		close (fd);
 | 
			
		||||
		glibtop_warn_io_r (server, "read (%s)", buffer);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	close (fd);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								sysdeps/solaris/prockernel.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								sysdeps/solaris/prockernel.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/prockernel.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_kernel_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
 | 
			
		||||
			   pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_kernel));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										162
									
								
								sysdeps/solaris/proclist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										162
									
								
								sysdeps/solaris/proclist.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,162 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/proclist.h>
 | 
			
		||||
#include <glibtop/xmalloc.h>
 | 
			
		||||
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <dirent.h>
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
 | 
			
		||||
#define GLIBTOP_PROCLIST_FLAGS	3
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proclist =
 | 
			
		||||
(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) +
 | 
			
		||||
(1 << GLIBTOP_PROCLIST_SIZE);
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proclist_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proclist = _glibtop_sysdeps_proclist;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define BLOCK_COUNT	256
 | 
			
		||||
#define BLOCK_SIZE	(BLOCK_COUNT * sizeof (unsigned))
 | 
			
		||||
 | 
			
		||||
/* Fetch list of currently running processes.
 | 
			
		||||
 *
 | 
			
		||||
 * IMPORTANT NOTE:
 | 
			
		||||
 *   On error, this function MUST return NULL and set buf->flags to zero !
 | 
			
		||||
 *   On success, it returnes a pointer to a list of buf->number elements
 | 
			
		||||
 *   each buf->size big. The total size is stored in buf->total. */
 | 
			
		||||
 | 
			
		||||
unsigned *
 | 
			
		||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
 | 
			
		||||
			int64_t which, int64_t arg)
 | 
			
		||||
{
 | 
			
		||||
	DIR *proc;
 | 
			
		||||
	struct dirent *entry;
 | 
			
		||||
	char buffer [BUFSIZ];
 | 
			
		||||
	unsigned count, total, pid;
 | 
			
		||||
	unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
 | 
			
		||||
	unsigned pids_size = 0, pids_offset = 0, new_size;
 | 
			
		||||
	struct stat statb;
 | 
			
		||||
	int len, i, ok;
 | 
			
		||||
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proclist));
 | 
			
		||||
 | 
			
		||||
	proc = opendir ("/proc");
 | 
			
		||||
	if (!proc) return NULL;
 | 
			
		||||
 | 
			
		||||
	/* read every every entry in /proc */
 | 
			
		||||
 | 
			
		||||
	for (count = total = 0, entry = readdir (proc);
 | 
			
		||||
	     entry; entry = readdir (proc)) {
 | 
			
		||||
		ok = 1; len = strlen (entry->d_name);
 | 
			
		||||
 | 
			
		||||
		/* does it consist entirely of digits? */
 | 
			
		||||
		
 | 
			
		||||
		for (i = 0; i < len; i++)
 | 
			
		||||
			if (!isdigit (entry->d_name [i])) ok = 0;
 | 
			
		||||
		if (!ok) continue;
 | 
			
		||||
 | 
			
		||||
		/* convert it in a number */
 | 
			
		||||
 | 
			
		||||
		if (sscanf (entry->d_name, "%u", &pid) != 1) continue;
 | 
			
		||||
 | 
			
		||||
		/* is it really a directory? */
 | 
			
		||||
 | 
			
		||||
		sprintf (buffer, "/proc/%d", pid);
 | 
			
		||||
		
 | 
			
		||||
		if (stat (buffer, &statb)) continue;
 | 
			
		||||
 | 
			
		||||
		if (!S_ISDIR (statb.st_mode)) continue;
 | 
			
		||||
 | 
			
		||||
		/* Fine. Now we first try to store it in pids. If this buffer is
 | 
			
		||||
		 * full, we copy it to the pids_chain. */
 | 
			
		||||
 | 
			
		||||
		if (count >= BLOCK_COUNT) {
 | 
			
		||||
			/* The following call to glibtop_realloc will be
 | 
			
		||||
			 * equivalent to glibtop_malloc () if `pids_chain' is
 | 
			
		||||
			 * NULL. We just calculate the new size and copy `pids'
 | 
			
		||||
			 * to the beginning of the newly allocated block. */
 | 
			
		||||
 | 
			
		||||
			new_size = pids_size + BLOCK_SIZE;
 | 
			
		||||
 | 
			
		||||
			pids_chain = glibtop_realloc_r
 | 
			
		||||
				(server, pids_chain, new_size);
 | 
			
		||||
 | 
			
		||||
			memcpy (pids_chain + pids_offset, pids, BLOCK_SIZE);
 | 
			
		||||
 | 
			
		||||
			pids_size = new_size;
 | 
			
		||||
 | 
			
		||||
			pids_offset += BLOCK_COUNT;
 | 
			
		||||
 | 
			
		||||
			count = 0;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/* pids is now big enough to hold at least one single pid. */
 | 
			
		||||
		
 | 
			
		||||
		pids [count++] = pid;
 | 
			
		||||
 | 
			
		||||
		total++;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	closedir (proc);
 | 
			
		||||
 | 
			
		||||
	/* count is only zero if an error occured (one a running Linux system,
 | 
			
		||||
	 * we have at least one single process). */
 | 
			
		||||
 | 
			
		||||
	if (!count) return NULL;
 | 
			
		||||
 | 
			
		||||
	/* The following call to glibtop_realloc will be equivalent to
 | 
			
		||||
	 * glibtop_malloc if pids_chain is NULL. We just calculate the
 | 
			
		||||
	 * new size and copy pids to the beginning of the newly allocated
 | 
			
		||||
	 * block. */
 | 
			
		||||
	
 | 
			
		||||
	new_size = pids_size + count * sizeof (unsigned);
 | 
			
		||||
	
 | 
			
		||||
	pids_chain = glibtop_realloc_r (server, pids_chain, new_size);
 | 
			
		||||
	
 | 
			
		||||
	memcpy (pids_chain + pids_offset, pids, count * sizeof (unsigned));
 | 
			
		||||
	
 | 
			
		||||
	pids_size = new_size;
 | 
			
		||||
	
 | 
			
		||||
	pids_offset += BLOCK_COUNT;
 | 
			
		||||
 | 
			
		||||
	/* Since everything is ok now, we can set buf->flags, fill in the
 | 
			
		||||
	 * remaining fields and return the `pids_chain'. */
 | 
			
		||||
 | 
			
		||||
	buf->flags = _glibtop_sysdeps_proclist;
 | 
			
		||||
 | 
			
		||||
	buf->size = sizeof (unsigned);
 | 
			
		||||
	buf->number = total;
 | 
			
		||||
 | 
			
		||||
	buf->total = total * sizeof (unsigned);
 | 
			
		||||
 | 
			
		||||
	return pids_chain;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										50
									
								
								sysdeps/solaris/procmap.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								sysdeps/solaris/procmap.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/error.h>
 | 
			
		||||
#include <glibtop/xmalloc.h>
 | 
			
		||||
#include <glibtop/procmap.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_map = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_map_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
glibtop_map_entry *
 | 
			
		||||
glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf,	pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
 | 
			
		||||
	
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_map));
 | 
			
		||||
	
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								sysdeps/solaris/procmem.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								sysdeps/solaris/procmem.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/procmem.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_mem = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_mem_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
 | 
			
		||||
			pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_mem));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								sysdeps/solaris/procsegment.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								sysdeps/solaris/procsegment.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/procsegment.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_segment = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_segment_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
 | 
			
		||||
			    pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_segment));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								sysdeps/solaris/procsignal.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								sysdeps/solaris/procsignal.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/procsignal.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_signal = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_signal_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
 | 
			
		||||
			   pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_signal));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										59
									
								
								sysdeps/solaris/procstate.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								sysdeps/solaris/procstate.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/procstate.h>
 | 
			
		||||
 | 
			
		||||
#include <glibtop_private.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_state =
 | 
			
		||||
(1 << GLIBTOP_PROC_STATE_UID) + (1 << GLIBTOP_PROC_STATE_GID) +
 | 
			
		||||
(1 << GLIBTOP_PROC_STATE_CMD);
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_state_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	struct psinfo psinfo;
 | 
			
		||||
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_state));
 | 
			
		||||
 | 
			
		||||
	if (glibtop_get_proc_data_psinfo_s (server, &psinfo, pid))
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	buf->uid = psinfo.pr_uid;
 | 
			
		||||
	buf->gid = psinfo.pr_gid;
 | 
			
		||||
 | 
			
		||||
	strncpy (buf->cmd, psinfo.pr_fname, 39);
 | 
			
		||||
 | 
			
		||||
	buf->flags = _glibtop_sysdeps_proc_state;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										65
									
								
								sysdeps/solaris/proctime.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								sysdeps/solaris/proctime.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,65 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/proctime.h>
 | 
			
		||||
 | 
			
		||||
#include <glibtop_private.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_time =
 | 
			
		||||
(1 << GLIBTOP_PROC_TIME_START_TIME) + (1 << GLIBTOP_PROC_TIME_RTIME) +
 | 
			
		||||
(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_STIME);
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_time_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
 | 
			
		||||
			 pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	struct prusage prusage;
 | 
			
		||||
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_time));
 | 
			
		||||
 | 
			
		||||
	if (glibtop_get_proc_data_usage_s (server, &prusage, pid))
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	buf->start_time = prusage.pr_create.tv_sec * 1E+6 +
 | 
			
		||||
		prusage.pr_create.tv_nsec / 1E+3;
 | 
			
		||||
 | 
			
		||||
	buf->rtime = prusage.pr_rtime.tv_sec * 1E+6 +
 | 
			
		||||
		prusage.pr_rtime.tv_nsec / 1E+3;
 | 
			
		||||
	buf->utime = prusage.pr_utime.tv_sec * 1E+6 +
 | 
			
		||||
		prusage.pr_utime.tv_nsec / 1E+3;
 | 
			
		||||
	buf->stime = prusage.pr_stime.tv_sec * 1E+6 +
 | 
			
		||||
		prusage.pr_stime.tv_nsec / 1E+3;
 | 
			
		||||
 | 
			
		||||
	buf->flags = _glibtop_sysdeps_proc_time;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										69
									
								
								sysdeps/solaris/procuid.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								sysdeps/solaris/procuid.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,69 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/procuid.h>
 | 
			
		||||
 | 
			
		||||
#include <glibtop_private.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_proc_uid =
 | 
			
		||||
(1 << GLIBTOP_PROC_UID_EUID) + (1 << GLIBTOP_PROC_UID_UID) +
 | 
			
		||||
(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_GID) +
 | 
			
		||||
(1 << GLIBTOP_PROC_UID_PID) + (1 << GLIBTOP_PROC_UID_PPID) +
 | 
			
		||||
(1 << GLIBTOP_PROC_UID_PGRP) + (1 << GLIBTOP_PROC_UID_SESSION) +
 | 
			
		||||
(1 << GLIBTOP_PROC_UID_TTY);
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_proc_uid_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides detailed information about a process. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
 | 
			
		||||
{
 | 
			
		||||
	struct psinfo psinfo;
 | 
			
		||||
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_proc_uid));
 | 
			
		||||
 | 
			
		||||
	if (glibtop_get_proc_data_psinfo_s (server, &psinfo, pid))
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	buf->euid = psinfo.pr_euid;
 | 
			
		||||
	buf->uid = psinfo.pr_uid;
 | 
			
		||||
	buf->egid = psinfo.pr_egid;
 | 
			
		||||
	buf->gid = psinfo.pr_gid;
 | 
			
		||||
 | 
			
		||||
	buf->pid = psinfo.pr_pid;
 | 
			
		||||
	buf->ppid = psinfo.pr_ppid;
 | 
			
		||||
	buf->pgrp = psinfo.pr_pgid;
 | 
			
		||||
 | 
			
		||||
	buf->session = psinfo.pr_sid;
 | 
			
		||||
	buf->tty = psinfo.pr_ttydev;
 | 
			
		||||
 | 
			
		||||
	buf->flags = _glibtop_sysdeps_proc_uid;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/sem_limits.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/sem_limits.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/sem_limits.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_sem_limits = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_sem_limits_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides information about sysv sem limits. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_sem_limits));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/shm_limits.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/shm_limits.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/shm_limits.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_shm_limits = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_shm_limits_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides information about sysv ipc limits. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_shm_limits));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										28
									
								
								sysdeps/solaris/siglist.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								sysdeps/solaris/siglist.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/signal.h>
 | 
			
		||||
 | 
			
		||||
const glibtop_signame glibtop_sys_siglist [] =
 | 
			
		||||
{ { 0, NULL, NULL } };
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/swap.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/swap.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/swap.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_swap = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_swap_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.swap = _glibtop_sysdeps_swap;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides information about swap usage. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_swap));
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										43
									
								
								sysdeps/solaris/uptime.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sysdeps/solaris/uptime.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
/* 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 <glibtop.h>
 | 
			
		||||
#include <glibtop/uptime.h>
 | 
			
		||||
 | 
			
		||||
static const unsigned long _glibtop_sysdeps_uptime = 0;
 | 
			
		||||
 | 
			
		||||
/* Init function. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_init_uptime_s (glibtop *server)
 | 
			
		||||
{
 | 
			
		||||
	server->sysdeps.uptime = _glibtop_sysdeps_uptime;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Provides uptime and idle time. */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
 | 
			
		||||
{
 | 
			
		||||
	memset (buf, 0, sizeof (glibtop_uptime));
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user