[Fusioninventory-user] Some doubts about FusionInventory Agent command line options

Guillaume Rousse guillomovitch at gmail.com
Mon Jun 18 08:01:38 UTC 2012

Le 18/06/2012 01:50, Tomás Abad a écrit :
>     Hello,
>     I'm trying to write a new FusionInventory Agent installer for
> Microsoft Windows and, when I was writing its online help, some doubts
> have arisen me regarding the FusionInventory Agent command line options.
> Are the following:
>     a) The term 'target' is only regarding the contact with a server
> (--server=url1,url2,...) or is it also used for local destination
> (--local=absolute_path)? In other words, the options --server and
> --local indicate both 'targets'?
Yes. As well as --stdout. Hence the man page or --help output:

     fusioninventory-agent [options] [--server server|--local

       Target definition options
         -s --server=URI     send tasks result to a server
         -l --local=DIR      write tasks results in a directory
         --stdout            write tasks result on STDOUT

>     b) Regarding with options --delaytime, --wait and --lazy
>        b.1) All of them have sense only whether FusionInventory Agent
>             runs in Server Mode, isn't it?
No. Actually, --wait and --lazy are only used in the other execution 
mode (explicit name still needed), as explicitely said for the last one 
in description. I guess the main purpose of --lazy is to run the agent 
manually alongside an already running agent daemon, without sending 
additional reports to the server.

The internal scheduler is a nasty mess of poorly documented ad-hoc options..

>        b.2) Does --wait come into play with local targets (option
>             --local) or only with remote targets (option --server)?
Any target.

>        b.3) If b.1 is true then there is an error in the official
>             FusionInventory Agent documentation (http://search.cpan.org
>             /~fusinv/FusionInventory-Agent-2.2.2/fusioninventory-agent).
>             Regarding with option --lazy, its second paragraph said:
>             "This option is only available when the agent is *NOT* run
>              as a server."
>             and I think it should said:
>             "This option is only available when the agent runs as a
>              server."
>             Really I think this last sentence should be below each one
>             of these options (--delaytime, --wait and --lazy).
Wrong. See code in case of doubt: getNextTarget method, in Scheduler class.

However, --wait description should have the same mention as --lazy.

>     c) Regarding with option --backend-collect-timeout
>        c.1) What are exactly the 'inventory modules'? I know there are
>             tasks (Inventory, WakeOnLan, ESX, NetDiscovery, NetInventory
>             and Deploy) but I don't know what are 'inventory modules'.
The inventory task is implemented as a set of independant piece of 
codes, which are called modules in Perl world. Indeed, that's a poor 

>        c.2) Are 'inventory modules' the same than 'tasks'?
No, rather task sub-components (sub tasks ?)

>        c.3) Is backend-collect-timeout the timeout for all 'inventory
>             modules' or only for some of them?
For all.

Documenting the agent is quite difficult, especially because of its 
versatility and its gazillion options. As part of the 2.2.x development, 
an important effort has been made to reduce the amount of duplication 
(the --help output is now generated from the man page), and to use a 
consistent vocabulary between each occurence of the option list 
(comments in the default configuration file, for instance). Any 
additional contribution in this direction is welcome.

BTW, Walid also manifested its interest about those issues:
BOFH excuse #141:

disks spinning backwards - toggle the hemisphere jumper.

More information about the Fusioninventory-user mailing list