1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2 * vim: ts=4 sw=4 noet ai cindent syntax=c
4 * Conky, a system monitor, based on torsmo
6 * Any original torsmo code is licensed under the BSD license
8 * All code written since the fork of torsmo is licensed under the GPL
10 * Please see COPYING for details
12 * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
13 * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
15 * All rights reserved.
17 * This program is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
31 #define PROCDIR "/proc"
32 #define READERR "Can't read '%s'"
35 void print_pid_chroot(struct text_object *obj, char *p, int p_max_size);
36 void print_pid_cmdline(struct text_object *obj, char *p, int p_max_size);
37 void print_pid_cwd(struct text_object *obj, char *p, int p_max_size);
38 void print_pid_environ(struct text_object *obj, char *p, int p_max_size);
39 void print_pid_environ_list(struct text_object *obj, char *p, int p_max_size);
40 void print_pid_exe(struct text_object *obj, char *p, int p_max_size);
41 void print_pid_nice(struct text_object *obj, char *p, int p_max_size);
42 void print_pid_openfiles(struct text_object *obj, char *p, int p_max_size);
43 void print_pid_parent(struct text_object *obj, char *p, int p_max_size);
44 void print_pid_priority(struct text_object *obj, char *p, int p_max_size);
45 void print_pid_state(struct text_object *obj, char *p, int p_max_size);
46 void print_pid_state_short(struct text_object *obj, char *p, int p_max_size);
47 void print_pid_stderr(struct text_object *obj, char *p, int p_max_size);
48 void print_pid_stdin(struct text_object *obj, char *p, int p_max_size);
49 void print_pid_stdout(struct text_object *obj, char *p, int p_max_size);
50 void print_pid_threads(struct text_object *obj, char *p, int p_max_size);
51 void print_pid_thread_list(struct text_object *obj, char *p, int p_max_size);
52 void print_pid_time_kernelmode(struct text_object *obj, char *p, int p_max_size);
53 void print_pid_time_usermode(struct text_object *obj, char *p, int p_max_size);
54 void print_pid_time(struct text_object *obj, char *p, int p_max_size);
55 void print_pid_uid(struct text_object *obj, char *p, int p_max_size);
56 void print_pid_euid(struct text_object *obj, char *p, int p_max_size);
57 void print_pid_suid(struct text_object *obj, char *p, int p_max_size);
58 void print_pid_fsuid(struct text_object *obj, char *p, int p_max_size);
59 void print_pid_gid(struct text_object *obj, char *p, int p_max_size);
60 void print_pid_egid(struct text_object *obj, char *p, int p_max_size);
61 void print_pid_sgid(struct text_object *obj, char *p, int p_max_size);
62 void print_pid_fsgid(struct text_object *obj, char *p, int p_max_size);
63 void print_pid_read(struct text_object *obj, char *p, int p_max_size);
64 void print_pid_vmpeak(struct text_object *obj, char *p, int p_max_size);
65 void print_pid_vmsize(struct text_object *obj, char *p, int p_max_size);
66 void print_pid_vmlck(struct text_object *obj, char *p, int p_max_size);
67 void print_pid_vmhwm(struct text_object *obj, char *p, int p_max_size);
68 void print_pid_vmrss(struct text_object *obj, char *p, int p_max_size);
69 void print_pid_vmdata(struct text_object *obj, char *p, int p_max_size);
70 void print_pid_vmstk(struct text_object *obj, char *p, int p_max_size);
71 void print_pid_vmexe(struct text_object *obj, char *p, int p_max_size);
72 void print_pid_vmlib(struct text_object *obj, char *p, int p_max_size);
73 void print_pid_vmpte(struct text_object *obj, char *p, int p_max_size);
74 void print_pid_write(struct text_object *obj, char *p, int p_max_size);
76 void scan_cmdline_to_pid_arg(struct text_object *obj, const char *arg, void* free_at_crash);
77 void print_cmdline_to_pid(struct text_object *obj, char *p, int p_max_size);