|
Packit |
d37888 |
/* Copyright (C) 1998-99 Martin Baulig
|
|
Packit |
d37888 |
This file is part of LibGTop 1.0.
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
LibGTop is free software; you can redistribute it and/or modify it
|
|
Packit |
d37888 |
under the terms of the GNU General Public License as published by
|
|
Packit |
d37888 |
the Free Software Foundation; either version 2 of the License,
|
|
Packit |
d37888 |
or (at your option) any later version.
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit |
d37888 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
Packit |
d37888 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
Packit |
d37888 |
for more details.
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
You should have received a copy of the GNU General Public License
|
|
Packit |
d37888 |
along with LibGTop; see the file COPYING. If not, write to the
|
|
Packit |
d37888 |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Packit |
d37888 |
Boston, MA 02110-1301, USA.
|
|
Packit |
d37888 |
*/
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#ifndef __GLIBTOP_PRIVATE_H__
|
|
Packit |
d37888 |
#define __GLIBTOP_PRIVATE_H__
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#include <glibtop.h>
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#include <sys/param.h>
|
|
Packit |
d37888 |
#include <kstat.h>
|
|
Packit |
d37888 |
#include <fcntl.h>
|
|
Packit |
d37888 |
#if defined(HAVE_PROCFS_H)
|
|
Packit |
d37888 |
# include <procfs.h>
|
|
Packit |
d37888 |
#elif defined(HAVE_SYS_PROCFS_H)
|
|
Packit |
d37888 |
# include <sys/procfs.h>
|
|
Packit |
d37888 |
#else
|
|
Packit |
d37888 |
# error Cannot compile without <procfs.h> or <sys/procfs.h>
|
|
Packit |
d37888 |
#endif
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
G_BEGIN_DECLS
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#ifdef HAVE_PROCFS_H
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
/* Read /proc/<pid>/psinfo */
|
|
Packit |
d37888 |
int glibtop_get_proc_data_psinfo_s(glibtop *, struct psinfo *, pid_t pid);
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
/* Read /proc/<pid>/status */
|
|
Packit |
d37888 |
int glibtop_get_proc_status_s(glibtop *, struct pstatus *, pid_t);
|
|
Packit |
d37888 |
#else
|
|
Packit |
d37888 |
int glibtop_get_proc_data_psinfo_s(glibtop *, struct prpsinfo *, pid_t);
|
|
Packit |
d37888 |
int glibtop_get_proc_status_s(glibtop *, struct prstatus *, pid_t);
|
|
Packit |
d37888 |
#endif
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
/* Read /proc/<pid>/usage */
|
|
Packit |
d37888 |
int glibtop_get_proc_data_usage_s(glibtop *, struct prusage *, pid_t);
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#if LIBGTOP_VERSION_CODE >= 1001002
|
|
Packit |
d37888 |
/* Read /proc/<pid>/cred */
|
|
Packit |
d37888 |
int glibtop_get_proc_credentials_s(glibtop *, struct prcred *, gid_t *, pid_t);
|
|
Packit |
d37888 |
#endif
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
/* Reread kstat chains */
|
|
Packit |
d37888 |
void glibtop_get_kstats(glibtop *);
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
G_END_DECLS
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#endif /* __GLIBTOP_PRIVATE_H__ */
|