Most of the options are available in a short form and a long form. For example, the two lines below are all equivalent:
% ocsinventory-agent -s localhost % ocsinventory-agent --server localhost
<B>--backend-collect-timeout=SECONDS_BEFORE_KILLB> Time before OCS kills modules processing which dont end before the timeout. <B>--basevardirB>=DIR Indicate the place where the agent should store its files. <B>-dB>, <B>--daemonB> Launch ocsinventory-agent in background. Proc::Daemon is needed. <B>--debugB> Turn the debug mode on. <B>--devlibB> This option is designed for backend module developer. With it enabled, ocsinventry-agent wont try to load the Backend module installed on the system. Instead it will scan the ./lib directory. <B>--delaytime=SECONDS_TO_WAITB> This option defaults to waiting a random() time between 0 and 3600 before initially contacting the server assuming NO PROLOG_FREQ has been set. Once PROLOG_FREQ has been set, it uses that number at the top end of its random setting. Useful for pre-setting a deployed agents initial start time (so you dont jam the server all at once, but dont have to wait an hour to make sure the deployment worked). <B>-fB>, <B>--forceB> The agent will first contact the server during the PROLOG period. If the server doesnt know the machine or has outdated informations, it will ask for an inventory. With this option, the agent doesnt run the PROLOG with the server first but directly sends an inventory. <B>-iB>, <B>--infoB> Turn the verbose mode on. The flag is ignored if <B>--debugB> is enable. <B>--lazyB> Do not contact the server more than one time during the PROLOG_FREQ and do an exit if there is nothing to do. Useful if you want to start the agent script regulary from the crontab but dont want to overload the server. <B>-lB>, <B>--localB>=DIR Write an inventory in the DIR directory. A new file will be created if needed. <B>--logfileB>=FILE Log message in FILE and turn off STDERR <B>-pB>, <B>--passwordB>=PASSWORD Use PASSWORD for an HTTP identification with the server. <B>-PB>, <B>--proxyB>=PROXY Use PROXY to specify a proxy HTTP server. By default, the agent uses HTTP_PROXY environment variable. <B>-rB>, <B>--realmB>=REALM Use REALM for an HTTP identification with the server. For example, the value can be Restricted Area. You can find it in the login popup of your Internet browser. <B>-sB>, <B>--serverB>=URI The uri of the server. If URI doesnt start with http:// or https://, the assume the parameter is a hostname and rewrite it like that:
If you want to use https or another virtual directory you need to enter the full path.
<B>--stdoutB> Print the inventory on stdout.
% ocsinventory-agent --stdout > /tmp/report.xml # prepare an inventory and write it in the /tmp/report.xml file. # A file will be created.
<B>--scan-homedirsB> Authorized OCS to scan home directories to increase the Virtual Machine inventory. WARNING: beware with user privacy by using this option because it may encounter private data scans (even if its not designed for !). <B>--sslB>=0|1 Check SSL communications using a certificate. Set to 0 if you want to disable certificate check or 1 to enable (needs CA certificate path in this case) . Default is set to 1. <B>--caB>=FILE Path to CA certificate chain file in PEM format, for server SSL certificate validation. Set to <your server configuration directory>/cacert.pem by default. <B>--tagB>=TAG Mark the machine with the TAG tag. Once the initial inventory is accepted by the server this value is ignored and youve to change the information directly on the server. The server do so in order to centralize the administration of the machine. <B>-uB> USER, <B>--userB>=USER Use USER for the server authentication. <B>--versionB>=USER Print the version and exit. <B>-wB> DURATION, <B>--waitB>=DURATION Wait before initializing the connexion with the server. If DURATION equal server the agent will use the PROLOG_FREQ of the server to determine the duration of this periode. Exactly like it would had done if it was in --daemon mode. Else if duration is a numerical value, it will be used directly.
% ocsinventory-agent --wait 5 --server localhost
<B>--nosoftwareB> Do not inventory the software installed on the machine. <B>--nosoftB> also works but is deperecated. <B>--nolocalB> Desactivate local mode even if it is set in config file or command line
The agent try to initialize the settings from the <B>ocsinventory-agent.cfgB> config file.
It looks for the file in these directories:
/etc/ocsinventory /usr/local/etc/ocsinventory /etc/ocsinventory-agent
The maintainer is Guillaume PROTET <firstname.lastname@example.org>
Please read the AUTHORS, Changes and THANKS files to see who is behind OCS Inventory Agent.
OCS-Inventory website, LaunchPad project page, forum, and wiki
Please, use the forum as much as possible. You can open your own bug tickets. Patches are welcome. You can also use LaunchPad bugtracker or push your Bazaar branch on LaunchPad and do a merge request.
Copyright (C) 2006-2011 OCS Inventory contributors
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|perl v5.20.3||OCSINVENTORY-AGENT (1)||2014-05-19|