Added pprint_get_proc_kernel(pid).
Fixed prototypes.
This commit is contained in:
@@ -1,3 +1,13 @@
|
|||||||
|
2005-08-02 Benoît Dejean <TazForEver@dlfp.org>
|
||||||
|
|
||||||
|
* pprint.c: (pprint_get_cpu), (pprint_get_loadavg),
|
||||||
|
(pprint_get_mem), (pprint_get_msg_limits), (pprint_get_netlist),
|
||||||
|
(pprint_get_swap), (pprint_get_uptime), (pprint_get_proc_kernel),
|
||||||
|
(main):
|
||||||
|
|
||||||
|
Added pprint_get_proc_kernel(pid).
|
||||||
|
Fixed prototypes.
|
||||||
|
|
||||||
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
|
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
|
||||||
|
|
||||||
* openfiles.c: (show_open_files): Updated.
|
* openfiles.c: (show_open_files): Updated.
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <glibtop/union.h>
|
#include <glibtop/union.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@@ -28,7 +29,7 @@ printf(".%u = " FORMAT " }\n", SIZE - 1 , buf.ARRAY[SIZE - 1]); \
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_cpu()
|
static void pprint_get_cpu(void)
|
||||||
{
|
{
|
||||||
glibtop_cpu buf;
|
glibtop_cpu buf;
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ static void pprint_get_fsusage(const char *mountpoint)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_loadavg()
|
static void pprint_get_loadavg(void)
|
||||||
{
|
{
|
||||||
glibtop_loadavg buf;
|
glibtop_loadavg buf;
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ static void pprint_get_loadavg()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_mem()
|
static void pprint_get_mem(void)
|
||||||
{
|
{
|
||||||
glibtop_mem buf;
|
glibtop_mem buf;
|
||||||
|
|
||||||
@@ -156,7 +157,7 @@ static void pprint_get_mountlist(gboolean allfs)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_msg_limits()
|
static void pprint_get_msg_limits(void)
|
||||||
{
|
{
|
||||||
glibtop_msg_limits buf;
|
glibtop_msg_limits buf;
|
||||||
|
|
||||||
@@ -189,7 +190,7 @@ static void pprint_get_netload(const char *iface)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_netlist()
|
static void pprint_get_netlist(void)
|
||||||
{
|
{
|
||||||
glibtop_netlist buf;
|
glibtop_netlist buf;
|
||||||
char **devices;
|
char **devices;
|
||||||
@@ -211,7 +212,7 @@ static void pprint_get_netlist()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_swap()
|
static void pprint_get_swap(void)
|
||||||
{
|
{
|
||||||
glibtop_swap buf;
|
glibtop_swap buf;
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ static void pprint_get_swap()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void pprint_get_uptime()
|
static void pprint_get_uptime(void)
|
||||||
{
|
{
|
||||||
glibtop_uptime buf;
|
glibtop_uptime buf;
|
||||||
|
|
||||||
@@ -246,6 +247,23 @@ static void pprint_get_uptime()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void pprint_get_proc_kernel(pid_t pid)
|
||||||
|
{
|
||||||
|
glibtop_proc_kernel buf;
|
||||||
|
|
||||||
|
glibtop_get_proc_kernel(&buf, pid);
|
||||||
|
|
||||||
|
HEADER_PPRINT(glibtop_get_proc_kernel);
|
||||||
|
PPRINT(flags, "%#llx");
|
||||||
|
PPRINT(k_flags, "%llu");
|
||||||
|
PPRINT(min_flt, "%llu");
|
||||||
|
PPRINT(maj_flt, "%llu");
|
||||||
|
PPRINT(cmin_flt, "%llu");
|
||||||
|
PPRINT(cmaj_flt, "%llu");
|
||||||
|
FOOTER_PPRINT();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@@ -275,6 +293,8 @@ int main()
|
|||||||
|
|
||||||
pprint_get_uptime();
|
pprint_get_uptime();
|
||||||
|
|
||||||
|
pprint_get_proc_kernel(getpid());
|
||||||
|
|
||||||
glibtop_close();
|
glibtop_close();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user