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