1OCSINVENTORY-AGENT(1) User Contributed Perl DocumentationOCSINVENTORY-AGENT(1)
2
3
4
6 ocsinventory-agent - Unified client for OCS-Inventory
7
9 ocsinventory-agent [ -fhilpruw ] [ --server server | --local /tmp ]...
10
12 % ocsinventory-agent --server localhost
13 # send an inventory to the OCS server
14
15 % ocsinventory-agent --server http://localhost/ocsinventory2
16 # send an inventory over http to a server with a non standard
17 # virtual directory
18
19 % ocsinventory-agent --server https://localhost/ocsinventory
20 # send an inventory over https to the OCS server
21
22 % ocsinventory-agent --local /tmp
23 # write an inventory in the /tmp directory
24
25 % ocsinventory-agent --server localhost --user=toto --password=pw --realm="Restricted Area"
26 # send a report to a server protected by a basic authentification
27 % ocsinventory-agent --lazy
28 # send an inventory only if the a random delay between 0 and PROLOG_FREQ had been run over.
29
30 % ocsinventory-agent --delaytime 60 -d
31 # If NO PROLOG_FREQ has been preset, pick a time between execution and --delaytime for the agent to contact the server [default is 3600 seconds]
32
34 ocsinventory-agent creates inventory and send or write them. This agent
35 is the successor of the former linux_agent which was released with OCS
36 1.01 and prior. It also replaces the Solaris/AIX/BSD unofficial agents.
37 The detailed list of supported Operating System is available in the
38 Wiki.
39
40 GNU/Linux
41 Solaris
42 FreeBSD
43 NetBSD
44 OpenBSD
45 AIX
46 MacOSX
47 GNU/kFreeBSD
48
50 Most of the options are available in a short form and a long form. For
51 example, the two lines below are all equivalent:
52
53 % ocsinventory-agent -s localhost
54 % ocsinventory-agent --server localhost
55
56 --backend-collect-timeout=SECONDS_BEFORE_KILL
57 Time before OCS kills modules processing which don't end before the
58 timeout.
59
60 --basevardir=DIR
61 Indicate the place where the agent should store its files.
62
63 -d, --daemon
64 Launch ocsinventory-agent in background. Proc::Daemon is needed.
65
66 --debug
67 Turn the debug mode on.
68
69 --devlib
70 This option is designed for backend module developer. With it
71 enabled, ocsinventry-agent won't try to load the Backend module
72 installed on the system. Instead it will scan the ./lib directory.
73
74 --delaytime=SECONDS_TO_WAIT
75 This option defaults to waiting a random() time between 0 and 3600
76 before initially contacting the server assuming NO PROLOG_FREQ has
77 been set. Once PROLOG_FREQ has been set, it uses that number at the
78 top end of it's random setting. Useful for pre-setting a deployed
79 agent's initial start time (so you don't jam the server all at
80 once, but don't have to wait an hour to make sure the deployment
81 worked).
82
83 -f, --force
84 The agent will first contact the server during the PROLOG period.
85 If the server doesn't know the machine or has outdated
86 informations, it will ask for an inventory. With this option, the
87 agent doesn't run the PROLOG with the server first but directly
88 sends an inventory.
89
90 -i, --info
91 Turn the verbose mode on. The flag is ignored if --debug is enable.
92
93 --lazy
94 Do not contact the server more than one time during the PROLOG_FREQ
95 and do an exit if there is nothing to do. Useful if you want to
96 start the agent script regulary from the crontab but don't want to
97 overload the server.
98
99 -l, --local=DIR
100 Write an inventory in the DIR directory. A new file will be created
101 if needed.
102
103 --logfile=FILE
104 Log message in FILE and turn off STDERR
105
106 -p, --password=PASSWORD
107 Use PASSWORD for an HTTP identification with the server.
108
109 -P, --proxy=PROXY
110 Use PROXY to specify a proxy HTTP server. By default, the agent
111 uses HTTP_PROXY environment variable.
112
113 -r, --realm=REALM
114 Use REALM for an HTTP identification with the server. For example,
115 the value can be 'Restricted Area'. You can find it in the login
116 popup of your Internet browser.
117
118 -s, --server=URI
119 The uri of the server. If URI doesn't start with http:// or
120 https://, the assume the parameter is a hostname and rewrite it
121 like that:
122
123 % http://servername/ocsinventory
124
125 If you want to use https or another virtual directory you need to
126 enter the full path.
127
128 --server is ignored if --local is in use.
129
130 --stdout
131 Print the inventory on stdout.
132
133 % ocsinventory-agent --stdout > /tmp/report.xml
134 # prepare an inventory and write it in the /tmp/report.xml file.
135 # A file will be created.
136
137 --scan-homedirs
138 Authorized OCS to scan home directories to increase the Virtual
139 Machine inventory.
140
141 --tag=TAG
142 Mark the machine with the TAG tag. Once the initial inventory is
143 accepted by the server this value is ignored and you've to change
144 the information directly on the server. The server do so in order
145 to centralize the administration of the machine.
146
147 -u USER, --user=USER
148 Use USER for the server authentification.
149
150 --version=USER
151 Print the version and exit.
152
153 -w DURATION, --wait=DURATION
154 Wait before initializing the connexion with the server. If DURATION
155 equal server the agent will use the PROLOG_FREQ of the server to
156 determine the duration of this periode. Exactly like it would had
157 done if it was in --daemon mode. Else if duration is a numerical
158 value, it will be used directly.
159
160 % ocsinventory-agent --wait 5 --server localhost
161
162 --nosoftware
163 Do not inventory the software installed on the machine. --nosoft
164 also works but is deperecated.
165
167 The agent try to initialize the settings from the
168 ocsinventory-agent.cfg config file.
169
170 It looks for the file in these directories:
171
172 /etc/ocsinventory
173 /usr/local/etc/ocsinventory
174 /etc/ocsinventory-agent
175
177 The maintainer is Goneri LE BOUDER <goneri@rulezlan.org>
178
179 Please read the AUTHORS, Changes and THANKS files to see who is behind
180 OCS Inventory Agent.
181
183 OCS-Inventory website,
184 http://www.ocsinventory-ng.org/
185
186 LaunchPad project page,
187 http://launchpad.net/ocsinventory-unix-agent
188
189 forum,
190 http://forums.ocsinventory-ng.org/
191
192 and wiki
193 http://wiki.ocsinventory-ng.org/
194
196 Please, use the forum as much as possible. You can open your own bug
197 tickets. Patches are welcome. You can also use LaunchPad bugtracker or
198 push your Bazaar branch on LaunchPad and do a merge request.
199
201 Copyright (C) 2006-2009 OCS Inventory contributors
202
203 This program is free software; you can redistribute it and/or modify
204 it under the terms of the GNU General Public License as published by
205 the Free Software Foundation; either version 2 of the License, or
206 (at your option) any later version.
207
208 This program is distributed in the hope that it will be useful,
209 but WITHOUT ANY WARRANTY; without even the implied warranty of
210 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
211 GNU General Public License for more details.
212
213 You should have received a copy of the GNU General Public License
214 along with this program; if not, write to the Free Software
215 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
216
217
218
219perl v5.12.2 2010-10-12 OCSINVENTORY-AGENT(1)