OCSINVENTORY-AGENT(1)
π ocsinventory-agent β the unified client for OCS-Inventory β¨
okay so real talk: this is the manual page for ocsinventory-agent, straight out of the User Contributed Perl Documentation collection. it's a perl situation, it's an inventory agent situation, and honestly? it ate. let's get into it π«Ά
πΈ SYNOPSIS πΈ
ocsinventory-agent [ -fhilpruw ] [ --server server | --local /tmp ]...
that's the whole shape of it bestie β some short flags, and then either --server or --local driving the whole vibe π
π EXAMPLES π
these are the canonical little moments, copy them exactly, no cap:
% ocsinventory-agent --server localhost
# send an inventory to the OCS server
% ocsinventory-agent --server http://localhost/ocsinventory2
# send an inventory over http to a server with a non standard
# virtual directory
% ocsinventory-agent --server https://localhost/ocsinventory
# send an inventory over https to the OCS server
% ocsinventory-agent --local /tmp
# write an inventory in the /tmp directory
% ocsinventory-agent --server localhost --user=toto --password=pw --realm="Restricted Area"
# send a report to a server protected by a basic authentication
% ocsinventory-agent --lazy
# send an inventory only if the a random delay between 0 and PROLOG_FREQ had been run over.
% ocsinventory-agent --delaytime 60 -d
# 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]
literally just pick the one that matches your situation and go β¨
π¦ DESCRIPTION π¦
ocsinventory-agent creates inventory and send or write them. yes both. iconic behaviour.
this agent is the successor of the former linux_agent which was released with OCS 1.01 and prior. it also replaces the Solaris/AIX/BSD unofficial agents. the detailed list of supported Operating System is available in the Wiki π
here's the OS lineup, main character energy only:
- GNU/Linux
- Solaris
- FreeBSD
- NetBSD
- OpenBSD
- AIX
- MacOSX
- GNU/kFreeBSD
β¨ OPTIONS β¨
most of the options are available in a short form and a long form. for example, the two lines below are all equivalent (same thing, different font):
% ocsinventory-agent -s localhost
% ocsinventory-agent --server localhost
ok now the full menu, no skips, every single one π
--backend-collect-timeout=SECONDS_BEFORE_KILLβ time before OCS kills modules processing which don't end before the timeout. dramatic but fair π--basevardir=DIRβ indicate the place where the agent should store its files. its little home π-d,--daemonβ launchocsinventory-agentin background.Proc::Daemonis needed for this one, heads up.--debugβ turn the debug mode on. maximum information, maximum chaos.--devlibβ this option is designed for backend module developer. with it enabled,ocsinventry-agentwon't try to load the Backend module installed on the system. instead it will scan the./libdirectory. dev girlies rise π§--delaytime=SECONDS_TO_WAITβ this option defaults to waiting arandom()time between0and3600before 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 it's random setting. useful for pre-setting a deployed agent's initial start time (so you don't jam the server all at once, but don't have to wait an hour to make sure the deployment worked). thoughtful king π-f,--forceβ the agent will first contact the server during the PROLOG period. if the server doesn't know the machine or has outdated information, it will ask for an inventory. with this option, the agent doesn't run the PROLOG with the server first but directly sends an inventory. no small talk, straight to business.-i,--infoβ turn the verbose mode on. the flag is ignored if--debugis enable.--lazyβ 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 don't want to overload the server. the most relatable option on this entire page π-l,--local=DIRβ write an inventory in theDIRdirectory. a new file will be created if needed.--logfile=FILEβ log message inFILEand turn off STDERR.-p,--password=PASSWORDβ usePASSWORDfor an HTTP identification with the server.-P,--proxy=PROXYβ usePROXYto specify a proxy HTTP server. by default, the agent usesHTTP_PROXYenvironment variable.-r,--realm=REALMβ useREALMfor 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 π-s,--server=URIβ the uri of the server. ifURIdoesn't start withhttp://orhttps://, the assume the parameter is a hostname and rewrite it like that:
% http://servername/ocsinventory
if you want to use https or another virtual directory you need to enter the full path.
--server is ignored if --local is in use. π«Ά
--stdoutβ print the inventory onstdout.
% ocsinventory-agent --stdout > /tmp/report.xml
# prepare an inventory and write it in the /tmp/report.xml file.
# A file will be created.
--scan-homedirsβ 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 it's not designed for !). like fr fr, be careful π
--ssl=0|1β check SSL communications using a certificate. set to0if you want to disable certificate check or1to enable (needs CA certificates file path in this case). default is set to1.--ca=FILEβ path to CA certificates file in PEM format, for server SSL certificate validation. set to<your server configuration directory>/cacert.pemby default.--tag=TAGβ mark the machine with theTAGtag. once the initial inventory is accepted by the server this value is ignored and you've to change the information directly on the server. the server do so in order to centralize the administration of the machine. server said "i'll handle it from here" π-u USER,--user=USERβ useUSERfor the server authentication.--version=USERβ print the version and exit.-w DURATION,--wait=DURATIONβ wait before initializing the connexion with the server. ifDURATIONequalserverthe 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--daemonmode. else if duration is a numerical value, it will be used directly.
% ocsinventory-agent --wait 5 --server localhost
--nosoftwareβ do not inventory the software installed on the machine.--nosoftalso works but is deperecated.--nolocalβ deactivate local mode even if it is set in config file or command line. stubborn but valid π
π CONFIG FILE π
the agent try to initialize the settings from the ocsinventory-agent.cfg config file.
it looks for the file in these directories, in this vibe order:
/etc/ocsinventory/usr/local/etc/ocsinventory/etc/ocsinventory-agent
π AUTHORS π
the maintainer is Guillaume PROTET <guillaume.protet@mortheres.info> π
please read the AUTHORS, Changes and THANKS files to see who is behind OCS Inventory Agent. give them their flowers, they earned them πΈ
π SEE ALSO π
the whole friend group:
- OCS-Inventory website,
http://www.ocsinventory-ng.org/ - LaunchPad project page,
http://launchpad.net/ocsinventory-unix-agent - forum,
http://forums.ocsinventory-ng.org/ - and wiki
http://wiki.ocsinventory-ng.org/
π BUGS π
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. contribute bestie, it's giving community π«Ά
π COPYRIGHT π
Copyright (C) 2006-2016 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
ok that's the whole page, and yes you made it to the end, proud of you π quick sign-off so you have the receipts: this was perl v5.32.1, dated 2026-06-05, and it lives in the OCSINVENTORY-AGENT(1) slot of the User Contributed Perl Documentation. slay, go inventory something β¨π
π¦ where this page comes from
- epel 9: ocsinventory-agent 2.10.5-2.el9 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms