]> git.proxmox.com Git - mirror_ifupdown2.git/blob - man.rst/ifquery.8.rst
remove native ifupdown support from bridge-utils, vlan, ifenslave and
[mirror_ifupdown2.git] / man.rst / ifquery.8.rst
1 =======
2 ifquery
3 =======
4
5 -------------------------------------
6 query network interface configuration
7 -------------------------------------
8
9 :Author: roopa@cumulusnetworks.com
10 :Date: 2014-02-05
11 :Copyright: Copyright 2014 Cumulus Networks, Inc. All rights reserved.
12 :Version: 0.1
13 :Manual section: 8
14
15 NAME
16 ====
17 **ifquery** - query interface configuration
18
19 SYNOPSIS
20 ========
21
22 **ifquery [-v] [--allow CLASS] [--with-depends] -a|IFACE...**
23
24 **ifquery [-v] [-r|--running] [--allow CLASS] [--with-depends] -a|IFACE...**
25
26 **ifquery [-v] [-c|--check] [--allow CLASS] [--with-depends] -a|IFACE...**
27
28 **ifquery [-v] [-p|--print-dependency {list,dot}] [--allow CLASS] [--with-depends] -a|IFACE...**
29
30 **ifquery [-v] -s|--syntax-help**
31
32 DESCRIPTION
33 ===========
34 **ifquery** can be used to parse interface configuration file, query
35 running state or check running state of the interface with configuration
36 in **/etc/network/interfaces** file.
37
38 **ifquery** always works on the current **interfaces(5)** file
39 **/etc/network/interfaces**.
40
41 OPTIONS
42 =======
43 positional arguments:
44
45 **IFACE** interface list separated by spaces. **IFACE** list and **'-a'** argument are mutually exclusive.
46
47 optional arguments:
48
49 -h, --help show this help message and exit
50
51 -a, --all process all interfaces marked "auto"
52
53 -v, --verbose verbose
54
55 -d, --debug output debug info
56
57 -l, --allow CLASS ignore non-"allow-CLASS" interfaces
58
59 -w, --with-depends run with all dependent interfaces. This option
60 is redundant when -a is specified. When '-a' is
61 specified, interfaces are always executed in
62 dependency order.
63
64 -X EXCLUDEPATS, --exclude EXCLUDEPATS
65 Exclude interfaces from the list of interfaces to
66 operate on. Can be specified multiple times
67
68 -r, --running print raw interfaces file entries
69
70 -c, --check check interface file contents against running state
71 of an interface. Returns exit code 0 on success and
72 1 on error
73
74 -p, --print-dependency {list,dot} print iface dependency in list or dot format
75
76 -s, --syntax-help print supported interface config syntax. Scans all
77 addon modules and dumps supported syntax from them
78 if provided by the module.
79
80 EXAMPLES
81 ========
82 # dump all or some interfaces config file entries
83 # (pretty prints user provided entries)
84
85 **ifquery -a**
86
87 **ifquery br0**
88
89 # Same as above but dump with dependencies
90
91 **ifquery br0 --with-depends**
92
93 # Check running state with the config in /etc/network/interfaces
94
95 **ifquery --check br0**
96
97 **ifquery --check --with-depends br0**
98
99 **ifquery --check -a**
100
101 # dump running state of all interfaces in /etc/network/interfaces format
102
103 **ifquery --running br0**
104
105 **ifquery --running --with-depends br0**
106
107 **ifquery --running -a**
108
109 # print dependency info in list format
110
111 **ifquery --print-dependency=list -a**
112
113 **ifquery --print-dependency=list br2000**
114
115 # print dependency info in dot format
116
117 **ifquery --print-dependency=dot -a**
118
119 **ifquery --print-dependency=dot br2000**
120
121 # Create an image (png) from the dot format
122
123 **ifquery --print-dependency=dot -a > interfaces.dot**
124
125 **dot -Tpng interfaces.dot > interfaces.png**
126
127 (The above command only works on a system with dot installed)
128
129
130 SEE ALSO
131 ========
132 ifup(8),
133 ifdown(8),
134 ifreload(8),
135 interfaces(5),
136 ifupdown-addons-interfaces(5)