aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/usage.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
commit1379851360349d6617ad32944a25ee5e2bb74fc2 (patch)
treef69b48e90708bfa3c2723d5a27ed3e024c827b43 /src/firemon/usage.c
parentdelete files (diff)
downloadfirejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip
Baseline firejail 0.9.28
Diffstat (limited to 'src/firemon/usage.c')
-rw-r--r--src/firemon/usage.c77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/firemon/usage.c b/src/firemon/usage.c
new file mode 100644
index 000000000..52788807a
--- /dev/null
+++ b/src/firemon/usage.c
@@ -0,0 +1,77 @@
1/*
2 * Copyright (C) 2014, 2015 netblue30 (netblue30@yahoo.com)
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "firemon.h"
21
22void usage(void) {
23 printf("firemon - version %s\n", VERSION);
24 printf("Usage: firemon [OPTIONS] [PID]\n\n");
25 printf("Monitor processes started in a Firejail sandbox. Without any PID specified,\n");
26 printf("all processes started by Firejail are monitored. Descendants of these processes\n");
27 printf("are also being monitored.\n\n");
28 printf("Options:\n");
29 printf("\t--arp - print ARP table for each sandbox.\n\n");
30 printf("\t--caps - print capabilities configuration for each sandbox.\n\n");
31 printf("\t--cgroup - print control group information for each sandbox.\n\n");
32 printf("\t--cpu - print CPU affinity for each sandbox.\n\n");
33 printf("\t--help, -? - this help screen.\n\n");
34 printf("\t--interface - print network interface information for each sandbox.\n\n");
35 printf("\t--list - list all sandboxes.\n\n");
36 printf("\t--name=name - print information only about named sandbox.\n\n");
37 printf("\t--netstats - monitor network statistics for sandboxes creating a new\n");
38 printf("\t\tnetwork namespace.\n\n");
39 printf("\t--route - print route table for each sandbox.\n\n");
40 printf("\t--seccomp - print seccomp configuration for each sandbox.\n\n");
41 printf("\t--tree - print a tree of all sandboxed processes.\n\n");
42 printf("\t--top - monitor the most CPU-intensive sandboxes.\n\n");
43 printf("\t--version - print program version and exit.\n\n");
44
45 printf("Without any options, firemon monitors all fork, exec, id change, and exit events\n");
46 printf("in the sandbox. Monitoring a specific PID is also supported.\n\n");
47
48 printf("Option --list prints a list of all sandboxes. The format for each entry is as\n");
49 printf("follows:\n\n");
50 printf("\tPID:USER:Command\n\n");
51
52 printf("Option --tree prints the tree of processes running in the sandbox. The format\n");
53 printf("for each process entry is as follows:\n\n");
54 printf("\tPID:USER:Command\n\n");
55
56 printf("Option --top is similar to the UNIX top command, however it applies only to\n");
57 printf("sandboxes. Listed below are the available fields (columns) in alphabetical\n");
58 printf("order:\n\n");
59 printf("\tCommand - command used to start the sandbox.\n");
60 printf("\tCPU%% - CPU usage, the sandbox share of the elapsed CPU time since the\n");
61 printf("\t last screen update\n");
62 printf("\tPID - Unique process ID for the task controlling the sandbox.\n");
63 printf("\tPrcs - number of processes running in sandbox, including the controlling\n");
64 printf("\t process.\n");
65 printf("\tRES - Resident Memory Size (KiB), sandbox non-swapped physical memory.\n");
66 printf("\t It is a sum of the RES values for all processes running in the\n");
67 printf("\t sandbox.\n");
68 printf("\tSHR - Shared Memory Size (KiB), it reflects memory shared with other\n");
69 printf("\t processes. It is a sum of the SHR values for all processes running\n");
70 printf("\t in the sandbox, including the controlling process.\n");
71 printf("\tUptime - sandbox running time in hours:minutes:seconds format.\n");
72 printf("\tUser - The owner of the sandbox.\n");
73 printf("\n");
74 printf("License GPL version 2 or later\n");
75 printf("Homepage: http://firejail.sourceforge.net\n");
76 printf("\n");
77}