The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

FusionInventory::Agent::XML::Query::Inventory - the XML abstraction layer

DESCRIPTION

FusionInventory uses OCS Inventory XML format for the data transmission. This module is the abstraction layer. It's mostly used in the backend module where $inventory is in general called.

new()

The usual constructor.

initialise()

Runs the backend modules to initialise the data.

addController()

Add a controller in the inventory.

addModem()

Add a modem in the inventory.

addDrive()

Add a partition in the inventory.

addStorage()

Add a storage system (hard drive, USB key, SAN volume, etc) in the inventory.

addMemory()

Add a memory module in the inventory.

addPort()

Add a port module in the inventory.

addSlot()

Add a slot in the inventory.

addSoftware()

Register a software in the inventory.

addMonitor()

Add a monitor (screen) in the inventory.

addVideo()

Add a video card in the inventory.

addSound()

Add a sound card in the inventory.

addNetwork()

Register a network interface in the inventory.

setHardware()

Save global information regarding the machine.

The use of setHardware() to update USERID and PROCESSOR* informations is deprecated, please, use addUser() and addCPU() instead.

setOperatingSystem()

Save global information regarding the operating system.

setBios()

Set BIOS informations.

addCPU()

Add a CPU in the inventory.

addUser()

Add an user in the list of logged user.

addPrinter()

Add a printer in the inventory.

addVirtualMachine()

Add a Virtual Machine in the inventory.

addProcess()

Record a running process in the inventory.

addInput()

Add an input device (mouse/keyboard) in the inventory.

addEnv()

Register an environment variable.

addUSBDevice()

USB device

addBattery()

Battery

addRegistry()

Windows Registry key

addAntiVirus()

Registered Anti-Virus on Windows

addLogicalVolume()

Registered LVM Logical Volume

addPhysicalVolume()

Registered LVM Physical Volume

addVolumeGroup()

Registered LVM Volume Group

setAccessLog()

What is that for? :)

addIpDiscoverEntry()

IpDiscover is used to identify network interface on the local network. This is done on the ARP level.

This function adds a network interface in the inventory.

addSoftwareDeploymentPackage()

This function is for software deployment.

Order sent to the agent are recorded on the client side and then send back to the server in the inventory.

getContent()

Return the inventory as a XML string.

printXML()

Only for debugging purpose. Print the inventory on STDOUT.

writeXML()

Save the generated inventory as an XML file. The 'local' key of the config is used to know where the file as to be saved.

writeHTML()

Save the generated inventory as an HTML file. The 'local' key of the config is used to know where the file as to be saved.

processChecksum()

Compute the <CHECKSUM/> field. This information is used by the server to know which parts of the XML have changed since the last inventory.

The is done thanks to the last_file file. It has MD5 prints of the previous inventory.

saveLastState()

At the end of the process IF the inventory was saved correctly, the last_state is saved.

addSection()

A generic way to save a section in the inventory. Please avoid this solution.

feedSection()

Add informations in inventory.

XML STRUCTURE

This section presents the XML structure used by FusionInventory. The schema is based on OCS Inventory XML with various additions.

BIOS

SMODEL
SMANUFACTURER

System manufacturer

SSN
BDATE
BVERSION

The BIOS revision

BMANUFACTURER

BIOS manufacturer

MMANUFACTURER

Motherboard Manufacturer

MSN

Motherboard Serial

MMODEL

Motherboard model

ASSETTAG
ENCLOSURESERIAL
BASEBOARDSERIAL
BIOSSERIAL

The optional asset tag for this machine.

TYPE

depcreated, replace by HARDWARE/CHASSIS_TYPE

CONTROLLERS

CAPTION

Windows CAPTION field or subsystem Name from the pci.ids table

DRIVER
NAME

The device name, the on from the PCIIDs DB

MANUFACTURER

The manifacturer name, the on from the PCIIDs DB

PCICLASS

The PCI class ID

PCIID

The PCI ID, e.g: 8086:2a40 (only for PCI device)

PCISUBSYSTEMID

The PCI subsystem ID, e.g: 8086:2a40 (only for PCI device)

PCISLOT

The PCI slot, e.g: 00:02.1 (only for PCI device)

TYPE

The controller revision, e.g: rev 02. This field may be renamed in the future.

REV

Revision of the device in the XX format (e.g: 04)

MEMORIES

CAPACITY
CAPTION

E.g: Physical Memory

DESCRIPTION
FORMFACTOR

Only available on Windows, See Win32_PhysicalMemory documentation on MSDN.

REMOVABLE
PURPOSE

Only avalaible on Windows, See Win32_PhysicalMemory documentation on MSDN.

SPEED

In Mhz, e.g: 800

TYPE
NUMSLOTS

Eg. 2, start at 1, not 0

SERIALNUMBER

CPUS

CACHESIZE

The total CPU cache size in KB. e.g: 3072

CORE

Number of core.

DESCRIPTION
MANUFACTURER

AMD/Intel/Transmeta/Cyrix/VIA

NAME

The name of the CPU, e.g: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz

THREAD

Number of thread per core.

SERIAL

Serial number

SPEED

Frequency in MHz

ID

The CPU ID: http://en.wikipedia.org/wiki/CPUID

DRIVES

Drive is actually a filesystem. Virtual filesystem like /proc or /sys are ignored.

CREATEDATE

Date of creation of the filesystem in DD/MM/YYYY format.

DESCRIPTION
FREE

Free space (MB)

FILESYSTEM

File system name. e.g: ext3

LABEL

Name of the partition given by the user.

LETTER

Windows driver letter. Windows only

SERIAL

Partition serial number or UUID

SYSTEMDRIVE

Boolean. Is this the system partition?

TOTAL

Total space available (MB)

TYPE

The mount point on UNIX.

VOLUMN

System name of the partition (e.g: /dev/sda1 or server:/directory for NFS)

HARDWARE

USERID

The current user list, '/' is the delimiter. This field is deprecated, you should use the USERS section instead.

OSVERSION

Version number of the operating system. This field will be deprecated in the future, please use OPERATINGSYSTEM/VERSION or OPERATINGSYSTEM/KERNEL_VERSION instead.

PROCESSORN
OSCOMMENTS

Service Pack on Windows, kernel build date on Linux

CHECKSUM

Deprecated, OCS only.

PROCESSORT

Deprecated, OCS only.

NAME
PROCESSORS

The processor speed in MHz, this field is deprecated, see CPUS instead.

SWAP

The swap space in MB.

ETIME

The time needed to run the inventory on the agent side.

TYPE
OSNAME

Full name of the operating system as reported by itself. This field will be deprecated in the future, please use OPERATINGSYSTEM/NAME or OPERATINGSYSTEM/FULL_NAME instead.

IPADDR
WORKGROUP
DESCRIPTION

Computer description (Windows only so far)

MEMORY

Total system memory in MB

UUID
DNS
LASTLOGGEDUSER

The login of the last logged user.

USERDOMAIN

This field is deprecated, you should use the USERS section instead.

DATELASTLOGGEDUSER
DEFAULTGATEWAY
VMSYSTEM

The virtualization technology used if the machine is a virtual machine.

Can be:

Physical: (default)
Xen
VirtualBox
Virtual Machine: Generic if it's not possible to correctly identify the solution
VMware: ESX, ESXi, server, etc
QEMU
SolarisZone
VServer
OpenVZ
BSDJail
Parallels
Hyper-V
WINOWNER
WINPRODID
WINPRODKEY
WINCOMPANY
WINLANG
CHASSIS_TYPE

The computer chassis format (e.g: Notebook, Laptop, Server, etc)

OPERATINGSYSTEM

KERNEL_NAME

The name of the kernel used by this operating system, e.g freebsd, linux, hpux, win32, etc (linux for android).

KERNEL_VERSION

Version of the operating system's kernel, e.g 2.6.32 for Linux, 5.2.x.y on Windows Server 2003, etc.

NAME

Name of the Operating System ("Distributor ID" in LSB terms), e.g Debian, Ubuntu, CentOS, SUSE LINUX, Windows, MacOSX, FreeBSD, AIX, Android, etc.

VERSION

Version of the operating system distribution ("Release" in LSB terms), e.g 11.04 on Ubuntu natty, 5.0.8 on Debian Lenny, 5.4 on CentOS 5.4, 2003 for Windows Server 2003, etc.

FULL_NAME

Full name of the operating system as reported by itself, e.g "Debian GNU/Linux unstable (sid)" or "Microsoft(R) Windows(R) Server 2003, Enterprise Edition x64". This is also contained in the HARDWARE/OSNAME field which will be deprecated in the future.

SERVICE_PACK

The Service Pack level reported by the operating system. This field is only present on systems which use this notion.

MONITORS

BASE64

The uuencoded EDID trame. Optional.

CAPTION
DESCRIPTION
MANUFACTURER

The manufacturer retrieved from the EDID trame.

SERIAL

The serial number retrieved from the EDID trame.

UUENCODE

The uuencoded EDID trame. Optional.

PORTS

Serial, Parallel, SATA, etc

CAPTION
DESCRIPTION
NAME
TYPE

SLOTS

Represents physical connection points including ports, motherboard slots and peripherals, and proprietary connection points.

This information is hardly reliable.

CAPACITY
CAPTION
FORMFACTOR
REMOVABLE
PURPOSE
TYPE
DESCRIPTION

STORAGES

DESCRIPTION

The long name of the device displayed to the user.

DISKSIZE

The disk size in MB.

INTERFACE

INTERFACE can be SCSI/HDC/IDE/USB/1394/Serial-ATA/SAS or empty if unknown

MANUFACTURER
MODEL

The commercial name of the device

NAME

The name of the device as seen by the system. E.g: hda (Linux), \\.\PHYSICALDRIVE0 (Windows)

TYPE

The kind of device. There is no standard for the format of the string in this field.

SERIAL

The harddrive serial number

SERIALNUMBER

Deprecated. The harddrive serial number, same as SERIAL.

FIRMWARE
SCSI_COID
SCSI_CHID
SCSI_UNID
SCSI_LUN
WWN

World Wide Name http://fr.wikipedia.org/wiki/World_Wide_Name

SOFTWARES

COMMENTS
FILESIZE
FOLDER
FROM

Where the information about the software came from, can be: registry, rpm, deb, etc

INSTALLDATE

Installation day in DD/MM/YYYY format. Windows only.

NAME
NO_REMOVE

Can the software be removed.

RELEASE_TYPE

Windows only for now, come from the registry

PUBLISHER
UNINSTALL_STRING

Windows only, come from the registry

URL_INFO_ABOUT
VERSION
VERSION_MINOR

Windows only, come from the registry

VERSION_MAJOR

Windows only, come from the registry

IS64BIT

If the software is in 32 or 64bit, (1/0)

GUID

Windows software GUID

USERS

LOGIN
DOMAIN

The Windows domain of the user, if available.

VIDEOS

CHIPSET
MEMORY

Video card memory in MB

NAME
RESOLUTION

Resolution in pixel. 1024x768.

PCISLOT

The local PCI slot ID if the video card use PCI.

VIRTUALMACHINES

MEMORY

Memory size, in MB.

NAME

The name of the virtual machine.

UUID
STATUS

The VM status: running, idle, paused, shutdown, crashed, dying, off

SUBSYSTEM

The virtualisation software. E.g: VmWare ESX

VMTYPE

The name of the virtualisation system family. The same type found is HARDWARE/VMSYSTEM

VCPU

Number of CPU affected to the virtual machine

VMID

The ID of virtual machine in the virtual managment system.

MAC

The list of the MAC addresses of the virtual machine. The delimiter is '/'. e.g: 00:23:18:91:db:8d/00:23:57:31:sb:8e

COMMENT

a comment

OWNER

SOUNDS

DESCRIPTION
MANUFACTURER
NAME

MODEMS

DESCRIPTION
NAME

ENVS

Environment variables

KEY
VAL

UPDATES

Windows updates

ID

Update Id

KB

List of KB, delimiter is '/'

USBDEVICES

USB Devices

VENDORID

Vendor USB ID. 4 hexa char.

PRODUCTID

Product USB ID. 4 hexa char.

SERIAL
CLASS

USB Class (e.g: 8 for Mass Storage)

SUBCLASS

USB Sub Class

NAME

The name of the device (optional)

NETWORKS

A network configuration.

DESCRIPTION

The name of the interface as seen in the OS settings, e.g: eth0 (Linux) or AMD PCNET Family Ethernet Adapter (Windows)

DRIVER

The name of the driver used by the network interface

IPADDRESS
IPADDRESS6
IPDHCP

The IP address of the DHCP server (optional).

IPGATEWAY
IPMASK
IPSUBNET
MACADDR
MTU
PCISLOT

The PCI slot name.

STATUS

Up or Down

TYPE

Interface type: Ethernet, Wifi

VIRTUALDEV

If the interface exist or not (1 or empty)

SLAVES

Bonded interfaces list in the eth0/eth1/eth2 format (/ is the separator).

MANAGEMENT

Whether or not it is a HP iLO, Sun SC, HP MP or other kind of Remote Management Interface

SPEED

Interface speed in Mb/s

BSSID

Wifi only, Access point MAC Address

SSID

Wifi only, Access point name

BATTERIES

CAPACITY

Battery capacity in mWh

DATE

Manufacture date in DD/MM/YYYY format

NAME

Name of the device

SERIAL

Serial number

MANUFACTURER

Battery manufacturer

VOLTAGE

Voltage in mV

PRINTERS

COMMENT
DESCRIPTION
DRIVER
NAME
NETWORK

Network: True (1) if it's a network printer

PORT
RESOLUTION

Resolution: eg. 600x600

SHARED

Shared: True if the printer is shared (Win32)

STATUS

Status: See Win32_Printer.PrinterStatus

ERRSTATUS

ErrStatus: See Win32_Printer.ExtendedDetectedErrorState

SERVERNAME
SHARENAME
PRINTPROCESSOR

PROCESSES

USER

The process owner

PID

The process Id

CPUUSAGE

The CPU usage.

MEM

The memory.

VIRTUALMEMORY
TTY
STARTED

When the process has been started in YYYY/MM/DD HH:MM format

CMD

The command.

ANTIVIRUS

COMPANY

Comapny name

NAME
GUID

Unique ID

ENABLED

1 if the antivirus is enabled.

UPTODATE

1 if the antivirus is up to date.

VERSION

LOGICAL_VOLUMES

A LVM Logical Volume

LV_NAME

The logical volume name.

LV_UUID

The logical volume UUID.

ATTR

The special attribue used on this volume (e.g: a-)

SIZE

The size of the volume on MB.

VG_UUID

The volume group UUID.

PHYSICAL_VOLUMES

DEVICE

The device name. Eg.: /dev/sda1 on Linux.

PV_NAME

The physical device name.

FORMAT

The format. E.g: lvm2.

ATTR

The LVM attribue in use for this phyisical device.

SIZE

The size in MB.

PV_UUID

The UUID.

PV_PE_COUNT

Item PV_PE_COUNT

PE_SIZE

Item PE_SIZE

VOLUME_GROUPS

A LVM Volume group.

VG_NAME

The name of the volume group.

PV_COUNT
LV_COUNT
ATTR

The volume group LVM attribue.

SIZE

The size.

FREE

The free space.

VG_UUID

The volume group UUID

VG_EXTENT_SIZE

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 1831:

You forgot a '=back' before '=head2'

Around line 2483:

=over without closing =back