GithubHelp home page GithubHelp logo

ocsinventory-ng / unixagent Goto Github PK

View Code? Open in Web Editor NEW
91.0 91.0 82.0 29.96 MB

This is the OCS unified agent for Unix operating systems

Home Page: http://www.ocsinventory-ng.org/en/

License: GNU General Public License v2.0

Perl 85.17% Shell 1.05% C 2.87% Roff 9.08% Objective-C 1.83%
agent deployment ocs ocs-deployment ocs-inventory ocsinventory unix

unixagent's Introduction

Banner

OCS Inventory UnixAgent

Some Links:
Ask question | Source installation | RPM/DEB installation | Website | OCS Professional

Ocsinventory-Agent is an agent for ocsinventory NG. It supports Linux, Solaris and AIX. *BSD support is in progress.

Prerequisites

- Perl 5.8 minimum

The following modules are needed:

- Digest::MD5
- XML::Simple
- Net::IP optional, it is only needed to compute the network information
- LWP
- Mac::SysProfile 0.0.5 : this module is need on MacOSX to collect the device informations.
- To get SSL communications working (for packages deployment or HTTPS communications to OCS server), you need these modules:
  - Crypt::SSLeay if you use LWP prior to version 6
  - LWP::Protocol::https if you use LWP version 6 or more
- Net::CUPS is used to detect the printer
- Net::SNMP to scan network devices using SNMP
- To enhance SNMP feature with custom networks scans, you need these modules:
  - Net::Netmask
  - Net::Ping or Nmap::Parser
- Data::UUID is used to create a unique id for every machine
- Parse::EDID is used to inventory monitor and will replace monitor-edid from Mandriva.

The following commands are needed:

- dmidecode on Linux and *BSD (i386, amd64, ia64) => dmidecode is required to read the BIOS stats.
- lspci on Linux and *BSD (pciutils package) => lspci is required to list PCI devices.
- sneep on Solaris/sparc, you must install sneep and record the Serial Number with it (download it from http://www.sun.com/download/products.xml?id=4304155a)
- To get the serial number of the screen you will need one of these tools:
  - monitor-edid from Mandriva is needed to fetch the monitor. A package is available in Fedora repository. information http://wiki.mandriva.com/en/Tools/monitor-edid
  - get-edid from the read-edid package
- ipmitool if you want to collect information about IPMI
- Nmap (v3.90 or superior) to scan network devices for Ipdiscover

The following PERL modules are optional:

- Proc::Daemon Daemon mode
- Proc::PID::File brings the pid file support if Proc::Daemon is installed
- Compress::Zlib

The following module is needed if you plan to prepare a tarball or install directly from the Bazaar devel branch. (See SOURCES below.):

- Module::Install

Build / Install

Once the archive is unpacked, use these commands:

perl Makefile.PL
make
make install

If you want to turn off the interactive post install script, just do (instead of perl Makefile.PL)

PERL_AUTOINSTALL=1 perl Makefile.PL

You can also run the agent from the tarball directory. In this case, use the --devlib flag to load the library from the local directory.

You need to launch the agent with root privilege. For debugging you can try to launch it with the -l flag:

Ex: ocsinventory-agent -l /tmp --debug

It's also possible to run directly from the tarball directory:

sudo ./ocsinventory-agent --devlib --server http://foo/ocsinventory

Note

Solaris:

  • Sun Studio seems to be needed to build the dependency.
  • The generated Makefile needs gmake to be exectuted
  • The default installation will install the binary in /usr/perl5/5.XXXXX/bin, set your $PATH variable according to that.

Crontab:

  • If you use crontab to launch the agent you'll probably have to redefine the PATH. For example, just add something like: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin At the beginning of the cron file.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add folder/file1.php
  4. Commit your changes: git commit -m 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request !

License

OCS Inventory is GPLv2 licensed

The memconf script is maintained by Tom Schmidt http://www.4schmidts.com/memconf.html Copyright © 1996-2017 Tom Schmidt

memconf 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.

Ocsinventory::Agent::Backend::Virtualization::Vmsystem uses code from imvirt:

Authors: Thomas Liske [email protected]

Copyright Holder: 2008 (C) IBH IT-Service GmbH [http://www.ibh.de/]

License: 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.

Ocsinventory::Agent::Backend::OS::Linux::Storages::Adaptec uses code from Parse-Arcconf:

https://github.com/kumy/Parse-Arcconf

License and Copyright: Copyright (C) 2012 Mathieu Alorent

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.

unixagent's People

Contributors

adadov avatar adambuchbinder avatar boucherjeanfra avatar charleneauger avatar djily90 avatar dliroulet avatar fbomj avatar gillesdubois avatar iamabrantes avatar ivmaks avatar jcpunk avatar jheidinga avatar kapouik avatar lea9250 avatar lhchin avatar luc-junior avatar mickael067 avatar nerijus avatar nicolaseisen avatar nirgal avatar pandrieux avatar pilch-cit avatar remicollet avatar rudylaurent avatar softctrl avatar stweil avatar temperatur avatar wiltonsr avatar xalasys-luc avatar xani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unixagent's Issues

Don't use "route" tool if "ip" is available

General informations

Operating system : Linux
Perl version : -

OCS Inventory informations

Unix agent version : latest master

Problem's description

The Linux backend uses the "route" tool from the outdated net-tools package to gather certain network information. It already checks for the "ip" tool and, if found, uses it in favor of the "ifconfig" tool from the same package, but it still relies on "route". If "ip" is available, "ip route" should be used instead to make it work on systems without the net-tools package.

dmidecode in Memory.pm

Hi,

I have a issue with a server with 32 GB RAM modules. dmidecode in
Agent/Backend/OS/Generic/Dmidecode/Memory.pm does not differ by MB or
GB.

dmidecode Example:

Handle 0x1103, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: FB-DIMM
Set: 4
Locator: PROC 1 DIMM 4A
Bank Locator: Not Specified
Type: DDR3
...

Handle 0x1102, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 32 GB
Form Factor: DIMM
Set: 1
Locator: DIMM_A3
Bank Locator: Not Specified
Type: DDR3
...

resources/ipdiscover/ipdiscover.c:100: poor error checking ?

[resources/ipdiscover/ipdiscover.c:100]: (style) A pointer can not be negative so it is either pointless or an error to check if it is.

Source code is

*sd = socket( PF_PACKET, SOCK_RAW, htons( ETH_P_ARP ) );
// ...
if( sd < 0 ){
    perror("Socket creation problem");
    exit(1);
}

Suggest new code

*sd = socket( PF_PACKET, SOCK_RAW, htons( ETH_P_ARP ) );
// ...
if (*sd < 0 ){
    perror("Socket creation problem");
    exit(1);
}

storages does not support Dell/megaraid

I have a server with four 1 TB drives connected to a megaraid hardware RAID controller. I see that there are modules for various other RAID controllers, but I'm not sure how to integrate support for a new controller nor how to identify that /dev/sda and /dev/sdb are actually the same controller.

# smartctl -i /dev/sda
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-23-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl open device: /dev/sda failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'


# smartctl -i /dev/sda -d megaraid,0 #other connected drives are found on megaraid,1-3
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-23-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

/dev/sda [megaraid_disk_00] [SAT]: Device open changed type from 'megaraid' to 'sat'
=== START OF INFORMATION SECTION ===
Model Family:     Seagate Constellation ES (SATA)
Device Model:     ST31000524NS
Serial Number:    XXXXXXXX
LU WWN Device Id: 5 000c50 01fb34d68
Firmware Version: KA02
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Wed Aug 26 17:32:03 2015 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


# smartctl -i /dev/sdb -d megaraid,0 #this is the same drive as above (same serial)
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-23-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

/dev/sdb [megaraid_disk_00] [SAT]: Device open changed type from 'megaraid' to 'sat'
=== START OF INFORMATION SECTION ===
Model Family:     Seagate Constellation ES (SATA)
Device Model:     ST31000524NS
Serial Number:    XXXXXXXX
LU WWN Device Id: 5 000c50 01fb34d68
Firmware Version: KA02
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Wed Aug 26 17:36:44 2015 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Cannot inventory when usb device plugged in linux machine.

PHP Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/install.php on line 113, referer: https://ocs.andersenlab.com/ocsreports/install.php
[client 127.0.0.1:48899] PHP Warning: Invalid argument supplied for foreach() in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_export/ms_csv.php on line 93, referer: https://ocs.andersenlab.com/ocsreports/?function=visu_repart_tag
PHP Warning: Invalid argument supplied for foreach() in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_export/ms_csv.php on line 93, referer: https://ocs.andersenlab.com/ocsreports/?function=visu_repart_tag
DBD::mysql::st execute failed: Table 'ocs_db.usbdevices' doesn't exist at /usr/local/share/perl/5.18.2/Apache/Ocsinventory/Server/Inventory/Update.pm line 171.
DBD::mysql::db DESTROY failed: MySQL server has gone away at /usr/share/perl5/Apache/DBI.pm line 212.
DBD::mysql::db DESTROY failed: MySQL server has gone away at /usr/share/perl5/Apache/DBI.pm line 212.

commands containing an hyphen cannot be executed by Download module

General informations

Operating system : Ubuntu 16.04.3 LTS
Perl version : 5.22.1-9

OCS Inventory informations

Unix agent version : 2:2.0.5-1 (but analysis of master branch makes me think it is also applicable to all further versions 'til now)

Problem's description

Look at those logs:

debug] [download] Download of 1503329931... Finished.
[debug] [download] Execute orders for package 1503329931.
[info] [download] Building package for 1503329931.
[info] [download] Checking signature for ./1503329931/tmp/build.tar.gz.
[debug] [download] Digest format: Hexadecimal
[debug] [download] Digest algo: MD5
[debug] [download] Digest OK...

=> retrieving tar...
=> tar is at /bin/tar

latest-pure64.a
[debug] [download] Building of 1503329931... Success.
[debug] [download] Launching latest-pure64.a --mode unattended...
[error] [download] Cannot find latest!
[debug] [download] Sending message for 1503329931, code=ERR_EXECUTE.
[info] [download] Cleaning 1503329931 package.

The Download module tries to launch "latest-pure64.a --mode unattended" but says it can't find "latest".

Here's the part of the code concerned (file ./lib/Ocsinventory/Agent/Modules/Download.pm):

                        if($packages->{$id}->{'ACT'} eq 'LAUNCH'){
                                $logger->debug("Launching $packages->{$id}->{'NAME'}...");
                                my $exe_line = $packages->{$id}->{'NAME'};
                                $packages->{$id}->{'NAME'} =~ s/^([^ -]+).*/$1/;
                                # Exec specified file (LAUNCH => NAME)
                                if(-e $packages->{$id}->{'NAME'}){
                                        chmod(0755, $packages->{$id}->{'NAME'}) or die("Cannot chmod: $!");
                                        $exit_code = system( "./".$exe_line );
                                }else{
                                        $logger->error("Cannot find $packages->{$id}->{'NAME'}!");
                                        die();
                                }

command "strings" not available

package Ocsinventory::Agent::Backend::OS::MacOS::Video rely on the "strings" command (at line 34) though this command is only available when xcode is installed.

So, when you run the UnixAgent on Mac OSX where Xcode isn't installed, you get the following error:

The "strings" command requires the command line developer tools. Would you like to install the tools now?
Choose Install to continue. Choose Get Xcode to install xcode and the command line developer tools from the App Store.

Bash sript and exit code / ERR_EXIT_CODE

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : Debian jessie
Perl version : v5.20.2

OCS Inventory informations

Unix agent version : OCS-NG_unified_unix_agent_v2.3

Problem's description

When I try to teledeploy a bash script like:

#! /bin/bash
exit 17

In OCS inventory I see : SUCCESS_4352 and no ERR_EXIT_CODE_17 like should have.
In agent log I see:
[download] Sending message for 1489074110, code=SUCCESS_4352.

Inventory log file ( optional )

Use github cloud or trusted upload website

MacOS :List more network interfaces

Hi,
With the use of thunderbolt display or ethernet adapter, we really need to inventory network interface from en0 to en5.
Thanks.

In file : lib/Ocsinventory/Agent/Backend/OS/MacOS/Networks.pm

-- next unless(/^en(0|3)/); # darwin has a lot of interfaces, for this purpose we only want to deal with eth0 and eth1
++ next unless(/^en(0|5)/); # darwin has a lot of interfaces, but with thunderbolt we need en0 to en5

Improve / Fix the create-darwin-perl-lib_fromCPAN.pl file

General informations

Operating system : Mac OS El Captain And Newer
Perl version : All

OCS Inventory informations

Unix agent version : All

Problem's description

Hi,

Recently, we made a lot of change on the Mac packaging to make it more up to date and work better with newer operating systems. ( Thx to @StCyr which started all the update process )

However, the create-darwin-perl-lib_fromCPAN.pl file has not been updated.
This file's role is to update and install dependencies and package them in a folder so the Mac agent have all the dependencies packaged in the app.

This script need to be updated a lot of things can be simplified, it need a partial rewrite (I think)
It's not an important issue but it could be nice to rewrite the script on the next months.

Regards,
Gilles Dubois.

Generic Packaging Deb with no size

File is : lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm

Goal : the algorithm in this file lists all the packages to add them to the list of softwares. When a packages matches a defined pattern, then it is added to the software list. And if a package does not have a size, then 'Unknown size' is set for the size attribute.

Problem : when a package does not have a size, it does not match the pattern, so it is not added and the 'Unknown size' is never set.

Solution : fix the regex to match packages with no size.

---if (/^(\S+)---(\S+)---(\S+)---(.*)/) {
+++if (/^(\S+)---(\S+)---(\S*)---(.*)/) {

Ajouter des plugins dans la version standelone

Bonjour,

Je voudrais ajouter des plugins dans la version standalone de l'agent OCS pour Unix, mais où faut-il les ajouter ?

J'utilise la version 2.1.1 sous CentOS 6 64Bits

Pour la version "installée" il faut ajouter les fichiers dans /usr/local/share/perl5/Ocsinventory/Agent/Modules puis renseigner le fichier /etc/ocsinventory-agent/modules.conf

Pour la version standalone :

  • Les fichiers .pm sont placés dans le répertoire lib/Ocsinventory/Agent/Modules,
  • Le chemin est renseigné dans le fichier MANIFEST
  • Le fichier etc/ocsinventory-agent/modules.conf est aussi renseigner

Quand je lance la génération de l’exécutable, je vois bien entre autres les modules que j'ai ajouté :
/usr/local/bin/pp: ... adding as lib/Ocsinventory/Agent/Modules/Antivirus.pm

Par contre quand j’exécute le binaire ocsinventory-agent.bin, les modules ne s'executent pas (Ils fonctionnent correctement dans la version installée et je n'utilise pas de module perl additionnel dans mes modules).
Dans le fichier de log en mode debug, je n'ai pas la trace des plugins.

Comment faut-il faire pour ajouter les plugins et de faire en sorte qu'ils s’exécutent avec le binaire ocsinventory-agent.bin ?

Merci par avance

Unable to find devices - AIX 7.1 / OCS Agent 2.3

General informations

Operating system : AIX 7.1
Perl version : 5.10.1.250

OCS Inventory informations

Unix agent version : 2.3

Problem's description

Hi,

We encounter an issue with OCS Unix agent concerning the networks and disks informations.

Below the related log :
-------------8<------------------------------------------
0516-306 : Unable to find 4 in the Device
Configuration Database.
0516-306 : Unable to find 3 in the Device
Configuration Database.
0516-306 : Unable to find 4 in the Device
Configuration Database.
0516-306 : Unable to find 4 in the Device
Configuration Database.
0516-306 lslv: Unable to find 4 in the Device
Configuration Database.
0516-306 lslv: Unable to find 3 in the Device
Configuration Database.
0516-306 lslv: Unable to find 4 in the Device
Configuration Database.
0516-306 lslv: Unable to find 4 in the Device
Configuration Database.
0516-306 : Unable to find volume group 1 in the Device
Configuration Database.
0516-306 : Unable to find volume group 1 in the Device
Configuration Database.
-------------8<------------------------------------------

Can you help me to resolve this stuff ?

P.S : I can provide more logs if you need...

Regards,

Loïc BRONDIN

Setup TAG with Unix Agent

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : Debian jessie
Perl version : v5.20.2

OCS Inventory informations

Unix agent version : OCS-NG_unified_unix_agent_v2.3

Problem's description

When I try to update my tag with:
/usr/local/bin/ocsinventory-agent --tag=TOTO
The tag is not updated.
In /etc/apache2/conf-enabled/z-ocsinventory-server.conf OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT is setup to 1 and apache have bin allready restarted.

Inventory log file ( optional )

[Tue Mar 7 13:45:25 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3
[Tue Mar 7 13:45:25 2017][debug] Log system initialised (File)
[Tue Mar 7 13:45:25 2017][debug] --scan-homedirs missing. Don't scan user directories
[Tue Mar 7 13:45:25 2017][debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__ocsinv.somtest.tld_ocsinventory/ocsinv.adm
[Tue Mar 7 13:45:25 2017][debug] A TAG seems to already exist in the ocsinv.adm file. The -t parameter will be ignored. Don't forget that the TAG value will be ignored by the server unless it has OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT=1.
[Tue Mar 7 13:45:25 2017][debug] OCS Agent initialised

VMware dmidecode memory duplication

Hello,

the memory configuration in VMware virtual machines is listed as both DMI type 6 and type 17.
As the current version of the agent checks for both types, we have a memory duplication in the inventory for all VMware virtual machines.

I don't know if there is a bare metal with both types available and if it is OK to just use one of both (first come first serve) or if it is more save to check if we are in a vm.

Attached is a example output of a vm with 1 GB of memory.
dmidecode_output.txt

Best regards

OS version number missing

If the older OCS-NG_unified_unix_agent_v2.1.1 is used, then OS is displayed as "CentOS Linux release 7.3.1611 (Core)".
If the newest OCS-NG_unified_unix_agent_v2.3 is used, then OS is displayed as "CentOS".
Why is it so?

Unsuccessful stat on filename containing newline at... Common.pm Backend.pm

OCS Inventory informations

Unix agent version : 2.3

Problem's description

For both module, recommend to add perl regex to remove extra CR LF after chomp of the output.

$binpath =~ s/\R//g;

Unsuccessful stat on filename containing newline at .../Ocsinventory/Agent/Common.pm line 1090
Unsuccessful stat on filename containing newline at .../Ocsinventory/Agent/Backend.pm line 33.

    can_run => sub {
        my $binary = shift;

        my $calling_namespace = caller(0);
        chomp(my $binpath=`which $binary 2>/dev/null`);
        $binpath =~ s/\R//g;
        return unless -x $binpath;
        $self->{logger}->debug(" - $binary found");
        1
    },

Unix agent for Mac - Apple mac address not reported

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : OSX 10.12
Perl version : na

OCS Inventory informations

Unix agent version : 2.1.1

Problem's description

When an Apple Macbook is connected to an Apple screen it gets an additional Ethernet adapter added. This adapter is not showing up in the inventory. Only the macbook's Ethernet and WiFi Mac addresses are there. Not the one from the Apple screen.

Does anyone have the same issue?

Inventory log file ( optional )

Use github cloud or trusted upload website

Problème "Taille disque (MB)" reportée

Bonjour,

La taille totale d'un disque dur de 1 To s'inscrit 1 MB dans la base de données "ocsweb" et dans l'affichage "ocsreports" comme le montre le fichier "export.txt" ci-joint.

Est-il possible de corriger ce problème ?

Environnement:

#1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
OCSNG_UNIX_SERVER-2.2.1
Ocsinventory-Unix-Agent-2.1.1

Cordialement.

ssl=1 enforces agent to use client's certificate.

General informations

Operating system : Ubuntu 16.04
Perl version : v5.22.1

OCS Inventory informations

Unix agent version : 2.3

Problem's description

ssl=1 config options enforces agent to use SSL client certificate. If you want to use HTTP basic authentication over HTTPS connection, without SSL client certificate, you have to set ssl option to 0.

If you don't have cacert.pem file, agent is printing following error:

[Wed Feb  8 12:47:11 2017][error] Cannot establish communication : 500 SSL_ca_file /var/lib/ocsinventory-agent/https:__inventory.local_ocsinventory/cacert.pem can't be used: No such file or directory

This creates a security problem, because ssl=0 skips SSL server certificate checking.

Proposed solution

Extend ssl and ca options to options wildly used in other software which is using SSL (X.509 in general) certificates.

Config options which should be exposed:
ssl_verify_peer - to set up the level of verification.
ssl_ca_cert - to be able to use self-signed certificate with local CA certificate.
ssl_client_cert - to specify client certificate used for authentication
ssl_client_key - optional, if client certificate uses key file (recommended)

Also, I think that setting ssl=0 should't be used with server option using HTTPS protocol.

Scan Ip Discover no remonte Seveur OCS

Bonjour,
selon les logs coté Agent le scan de ipdiscover se passe bien mais ne remonte pas au serveur OCS

Serveur:

Nom du système :     Linux x86_64
Version :     3.10.0-693.2.2.el7.x86_64
Distribution :     CentOS Linux 7 (Core)

Logiciel
Version de PHP : 5.4.45
Serveur Web : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.45 mod_perl/2.0.10 Perl/v5.16.3
Serveur SQL : MariaDB Server version 5.5.56-MariaDB
Version OCSReports: 2.3.1

General informations Agent Unix

Operating system : Debian
Perl version : This is perl 5, version 20, subversion 2 (v5.20.2)

OCS Inventory informations

Unix agent version : 2.3.1

Problem's description

Bonjour,
selon les logs coté Agent le scan de ipdiscover se passe bien mais ne remonte pas au serveur OCS

Inventory log file


  <IPDISCOVER>
      <H>
        <I>10.x.x.1</I>
        <M>00:00:5e:00:01:01</M>
        <N>-</N>
      </H>
      <H>
        <I>10.x.x.2</I>
        <M>ec:e5:55:53:ca:23</M>
        <N>-</N>
      </H>
      <H>
        <I>10.x.x.3</I>
        <M>ec:e5:55:53:d0:23</M>
        <N>-</N>
      </H>
      <H>
        <I>10.x.x.16</I>
        <M>ec:e5:55:f3:4d:05</M>
        <N>-</N>
      </H>
      <H>
        <I>10.x.x.18</I>
        <M>ec:e5:55:f3:4c:f0</M>
        <N>-</N>
      </H>


</CONTENT>
  <DEVICEID>AgentOcs-2017-10-17-06-59-22</DEVICEID>
  <QUERY>INVENTORY</QUERY>
</REQUEST>
[Wed Oct 18 10:22:41 2017][debug] =BEGIN=SERVER RET======
[Wed Oct 18 10:22:41 2017][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<REPLY>
  <RESPONSE>NO_ACCOUNT_UPDATE</RESPONSE>
</REPLY>
';
[Wed Oct 18 10:22:41 2017][debug] =END=SERVER RET======
[Wed Oct 18 10:22:41 2017][debug] Calling handlers : `end_handler'
[Wed Oct 18 10:22:41 2017][debug] [download] Calling download_end_handler
[Wed Oct 18 10:22:41 2017][debug] [snmp] Calling snmp_end_handler
[Wed Oct 18 10:22:41 2017][info] [download] Beginning work. I am 2174.
[Wed Oct 18 10:22:41 2017][info] [download] Option turned off. Exiting.
[Wed Oct 18 10:22:41 2017][debug] [download] End of work...

Redundant Argument in sprintf

I'm getting this:
Redundant Argument in sprintf at /usr/share/perl5/site_perl/Ocs.../Agen../Bakc.../OS/Linux/Network/Networks.pm line 29.
Perl version: 5.24.0
Arch Linux.

Questions / Fix on LWP behavior on HTTPS connection

General informations

Operating system :

  • Mac OS El Captain
  • Mac OS High Sierra
    Perl version : 5.18.2
    LWP version : 6.07 (2016)

OCS Inventory informations

Unix agent version : 2.3.1 (unreleased)

Problem's description

In the first place this behavior can be seen on Mac but I think it's more related to the LWP library.

By default, the agent is using LWP library when Crypt::Ssleay is not available but when using LWP the SSL certificate validation is different and can lead to inventory error (SSL Certificate verify failed)

The problem can only be seen when using a self signed certificate.
I made 3 different servers with SSL self signed and try to use the https inventory and each time the inventory fail on the SSL certificate verify failed.

After doing some research I saw that self signed certificate validation with LWP can be a bit tricky. Newer versions of LWP has change how to behave with SSL. (6.0 and newer only)

Here is some sources :

Solution

The solution would be to set theses 2 variables when using LWP :

  • verify_hostname => 1
  • SSL_ca_file => "cert_path"

Inventory log file ( optional )

ocsinventory.log

Unix OCS agent to collect IP details with ip command

Hi Team,

Current Unix OCS agent need "ifconfig" command to be present/installed in system for ocs agent to get IP details but with RedHat7 ifconfig is not a part of network management commands and we can get the IP details with "ip" command. we need to install RPM "net-tools" to have ifconfig command so that OCS agent can collect IP details. Is there a new release or patch to existing agent which use "ip" command instead of ifconfig so that we dont have to install additional RPM. Also ifconfig will not be supported by RedHat.

Thanks,
Jitendra

Deuxième carte réseau non inventoriée

Bonjour,
L'inventaire ne reporte pas la deuxième carte réseau : la carte réseau wifi "wlp4s0" est bien listée dans ocsreports mais la carte réseau filaire "enp5s0f2" ne l'est pas.

Matériel :

sans-fil : wlp4s0 : Intel Corporation Wireless 7260 [8086:08b1](rev 73)
filaire : enp5s0f2 : Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168](rev 0a)

UnixAgent :

OCS-NG_unified_unix_agent_v2.2 (version de l'agent (master) du 17/10/2016 20:01 UTC+2)

Environnement :

Distribution : LinuxMint 18
Kernel : Linux 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Log (debug=2) :

ocsinventory-agent.log.txt

Est-il possible de corriger ce problème ?

Cordialement.

functions can_run, can_load, can_read

OCS Inventory informations

Unix agent version : 2.3

Problem's description

With relation to the following change, Unix agent 2.3 modules should also be updated as below
fe049ff
my $params = shift;
my $common = $params->{common};
$common->can_run();
$common->can_read();
$common->can_load();

[debug] runWithTimeout(): unexpected error: Undefined subroutine &Ocsinventory::Agent::Backend::OS::Solaris::Drives::can_run called at Ocsinventory/Agent/Backend/OS/Solaris/Drives.pm line 12.
[debug] Ocsinventory::Agent::Backend::OS::Solaris::Drives ignored

Example of modules affected

Ocsinventory\Agent\Backend\OS\Solaris\CPU.pm
Line 38: if ( $OSLevel =~ /5.8/ || !can_run("zoneadm")){
Ocsinventory\Agent\Backend\OS\Linux\Domains.pm
Line 9: return 1 if @Domain || can_read ("/etc/resolv.conf");
Ocsinventory\Agent\Backend\OS\Solaris\Drives.pm
Line 12: sub check { can_run ("df") }
Ocsinventory\Agent\Backend\OS\AIX\Videos.pm
Line 7: can_run("lsdev")
Ocsinventory\Agent\Backend\OS\MacOS\Mem.pm
Line 6: return (undef) unless can_load("Mac::SysProfile");
Line 551: # if (can_run("smartctl")){

Linux Agent does not report disk devices (storage)

Linux Agent does not report disk devices and the log at the output file in debug mode, says:

runWithTimeout(): unexpected error: Can't call method "can_run" on an undefined value at /usr/share/perl5/Ocsinventory/Agent/Backend/OS/Linux/Storages.pm line 280.

The problem is solved when adding the $params variable to the argument list, when calling functions at the following lines

foreach my $device (getFromSmartctl($params, $devices)) {
foreach my $device (getFromuDev2($params, $devices)) {
foreach my $device (getFromLshw($params)) {
foreach my $device (getFromLsblk($params)) {
foreach my $device (getFromLsscsi($params)) {

The OS Agent is Ubuntu 16.04, using UnixAgent-2.3

500 Internal Server Error with some unix agents

Hey,

now with two unix agent i get the error above. But what i read out of the logs communication works.
Server activity.log:

Fri Jan 27 09:18:23 2017;3424;103;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;prolog;new_deviceid
Fri Jan 27 09:18:23 2017;3424;104;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;snmp;error: agent must have a deviceid in database !!
Fri Jan 27 09:18:23 2017;3424;100;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;prolog;accepted
Fri Jan 27 09:18:23 2017;3424;311;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;session;started
Fri Jan 27 09:18:25 2017;3424;319;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;session;found
Fri Jan 27 09:18:25 2017;3424;104;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;inventory;incoming
Fri Jan 27 09:18:25 2017;3424;528;ittst-nb096-2017-01-27-09-07-31;10.40.10.73;OCS-NG_unified_unix_agent_v2.3;accountinfos;missing

Apache error.log:

[Fri Jan 27 09:18:25.592592 2017] [perl:error] [pid 3424] [client 10.40.10.73:41836] Not a HASH reference at /usr/local/share/perl/5.22.1/Apache/Ocsinventory/Server/Inventory/Data.pm line 126.\n

Agent log (not debug but i can also post it if you want):
[Fri Jan 27 09:18:25 2017][error] Cannot establish communication : 500 Internal Server Error

We use OCS Server and client 2.3 , also client and server are both Ubuntu 16.04.
We also have working unix clients also with OCS Agent 2,3 and Ubuntu 16.04

Fri Jan 27 09:39:51 2017;31625;100;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;prolog;accepted
Fri Jan 27 09:39:51 2017;31625;311;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;session;started
Fri Jan 27 09:39:53 2017;31625;319;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;session;found
Fri Jan 27 09:39:53 2017;31625;104;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;inventory;incoming
Fri Jan 27 09:39:53 2017;31625;113;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;inventory;u:drives
Fri Jan 27 09:39:53 2017;31625;320;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;session;end
Fri Jan 27 09:39:53 2017;31625;101;rmvm052-2017-01-24-09-38-38;10.10.2.53;OCS-NG_unified_unix_agent_v2.3;inventory;transmitted

Any ideas what went wrong? You need any other information?

UnixAgent 2.0.5 can't download packages from a 2.3.1 OcsInventory server

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : Ubuntu 16.04.2
Perl version : 5.22.1-9

OCS Inventory informations

Unix agent version : 2.0.5-1

Problem's description

None of my ubuntu servers can download packages info files: Server answers with HTTP result 400 "Bad request"

Workaround

Change line my $http_request = "GET $server_dir".$fileid."/info HTTP/1.0\n\n"; to my $http_request = "GET $server_dir".$fileid."/info HTTP/1.1\r\nHost: acme.org\r\nUser-Agent: OCS-NG\r\nAccept: */*\r\n\r\n";

[Agent 2.3.0] SNMP Error from If_Mib.pm

General informations

Operating system : Debian Jessie (8.7)
Perl version : 5.20.2

OCS Inventory informations

Unix agent version : 2.3.0

Problem's description

Error into log file :
Failed to load Ocsinventory::Agent::Modules::Snmp::If_Mib: Missing right curly or square bracket at /usr/local/share/perl/5.20.2/Ocsinventory/Agent/Modules/Snmp/If_Mib.pm line 178, at end of line
syntax error at /usr/local/share/perl/5.20.2/Ocsinventory/Agent/Modules/Snmp/If_Mib.pm line 178, at EOF
Compilation failed in require at (eval 244) line 2.

Indeed it misses a bracket at the end of this file

lspci: Unable to load libkmod resources: error -12

Hey,

i installed the agent in the OCS Server which works. Also inventory work fine so far but everytime i do an inventory i get an error "lspci: Unable to load libkmod resources: error -12".
Inventory is transmittet and i didn´t found any missing data.

you now how to solve this error?

Server is a Ubuntu 16.04 and OCS is 2.3 on erver and agent.

PHP 7.0.13-0ubuntu0.16.04.1 (apache2handler)
WebServer Apache/2.4.18 (Ubuntu)
DatabaseServer (Ubuntu) version 5.7.17-0ubuntu0.16.04.1
OCS Version 2.3

500 SSL_verify_mode must be a number and not a string

General informations

Operating system : Ubuntu 16.04

OCS Inventory informations

Unix agent version : 2.3

Problem's description

Trying to inventory this client with a 2.3 version server. The server uses a wildcard cert, so we have ssl=0 in the config file. We don't use self signed cert, just a username, password and realm. And the server communication is over https.

All requirements are met too:

~/Downloads/Ocsinventory-Unix-Agent-2.3$ perl Makefile.PL
Nvidia::ml is recommended if you want to retrieve memory, speed, bios information for Nvidia cards.
Generating a Unix-style Makefile
Writing Makefile for Ocsinventory::Unix::Agent
Writing MYMETA.yml and MYMETA.json

And I have LWP::Protocol::https > 6 installed.

$ cpan -l | grep LWP::Protocol::https
LWP::Protocol::https	6.06
Can't stat /usr/local/lib/site_perl: No such file or directory
 at /usr/share/perl/5.22/App/Cpan.pm line 1331.

Inventory log file

[Fri Feb 24 15:44:54 2017][debug] OCS Agent initialised
[Fri Feb 24 15:44:54 2017][debug] Turns hooks on for /etc/ocsinventory/modules.conf
[Fri Feb 24 15:44:54 2017][debug] Calling handlers : `start_handler'
[Fri Feb 24 15:44:54 2017][debug] Compress::Zlib is available.
[Fri Feb 24 15:44:54 2017][debug] Calling handlers : `prolog_writer'
[Fri Feb 24 15:44:54 2017][debug] sending XML
[Fri Feb 24 15:44:54 2017][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>labs-044-2017-02-24-14-47-00</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Fri Feb 24 15:44:54 2017][error] Cannot establish communication : 500 SSL_verify_mode must be a number and not a string

Affichage Champ Operating System

Bonjour,
J'ai effectué une mise à jour de l'agent Ocs Unix de la version 2.1RC1 vers la version 2.2RC1.
Maintenant je dispose d'un affichage différent dans le champ operating system, sur mon interface web ocsreports. Auparavant, j'avais le détail de version de ma distribution linux (example: Debian GNU/Linux 7.2 wheezy). Maintenant j'ai juste Debian d'affiché.
Savez-vous comment je peux faire pour revenir avec un affichage correspondant à la version 2.1RC1.
Merci.
capture d ecran 2017-01-09 a 19 20 15

List secondary IPs on Linux

Hi,

Linux agent doesn't discover secondary ip addresses, added using 'ip addr add ...' command, for example
ip a a 100.100.100.100 dev lo
ip -o a s dev lo
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
1: lo inet 100.100.100.100/32 scope global lo\ valid_lft forever preferred_lft forever
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever

I'd be nice if the agent would collect and display all secondary IPs on all interfaces.

Keep up the good work!

Daniel

Version 2.3 for OSX

General informations

Operating system : OSX 10.11 and up
Perl version : 5.18

OCS Inventory informations

Unix agent version : none

Problem's description

No agent 2.3 for OSX. I have seen v 2.1.1 packaged for OSX. Can we get 2.3 packaged and available on github too?

CPU info for i386/x86_64 processors is frequently wrong

The code that parses /proc/cpuinfo and dmidecode is flawed, iterating line by line through file/command output rather than reading CPU by CPU. Mostly this won't be noticeable on a system with only one CPU, or where all CPUs are identical, but some stats for CPU 1 will be taken from CPU 0 (and CPU 0 will be empty) because the record submits prematurely. As well, the core count for dmidecode improperly falls back on /proc/cpuinfo, and reports my dual 12-core Intel Xeon E5-2680 system as having 24 cores on each processor.

I'll fork and attempt a fix myself. It's likely that this problem affects other architectures as well, but I'll leave that code as-is since I have no way of testing it.

Agent see only one monitor

Hi,

I have OCSInventory server 2.1.2 and i use OCS-NG_unified_unix_agent_v2.0.5. Agent see only one monitor Iiyama but i have one more monitor LG and agent can not see this.

I have installed get-edid 3.0.1 and parse-edid

Can i do something to see more?

Problème avec l'agent OCS sous windows

Bonjour,
J'ai récemment installé l'agent OCS pour Windows. La version est la 2.3.0.0 et je ne parviens pas à me connecter au serveur ocs. Les journaux d'événements me donnent l'erreur suivante "Service encounter error <Failed to load/parse last inventory state>". J'ai réinstallé plusieurs fois l'agent mais j'ai pas réussi à corriger le problème. Mon OS c'est Windows 10 et je ne sais où trouver le fichier ocsinventory.ini

Install issue

Hey,
i tried to install the unix client on a ubuntu 16.04. so i downloaded the Ocsinventory-Unix-Agent-2.3RC from Release here.
After some problems with installation in finally got the client work. But the Client is not able to communicate with the OCS Server (Server is OCS 2.3 Ubuntu 16.04).
Output of the client Log:

[Fri Jan  6 14:25:06 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.2
[Fri Jan  6 14:25:06 2017][debug] Log system initialised (File)
[Fri Jan  6 14:25:06 2017][debug] --scan-homedirs missing. Don't scan user directories
[Fri Jan  6 14:25:06 2017][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__ocs_ocsinventory/ocsinv.adm
[Fri Jan  6 14:25:06 2017][debug] OCS Agent initialised
[Fri Jan  6 14:25:06 2017][debug] Turns hooks on for /etc/ocsinventory/modules.conf
[Fri Jan  6 14:25:06 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.2
[Fri Jan  6 14:25:06 2017][debug] Log system initialised (File)
[Fri Jan  6 14:25:06 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.2
[Fri Jan  6 14:25:06 2017][debug] Log system initialised (File)
[Fri Jan  6 14:25:06 2017][debug] Calling handlers : `start_handler'
[Fri Jan  6 14:25:06 2017][debug] [snmp] Calling snmp_start_handler
[Fri Jan  6 14:25:06 2017][debug]  - Net::SNMP loaded
[Fri Jan  6 14:25:06 2017][debug] [download] Calling download_start_handler
[Fri Jan  6 14:25:06 2017][debug]  - LWP loaded
[Fri Jan  6 14:25:06 2017][debug]  - LWP::Protocol::https loaded
[Fri Jan  6 14:25:06 2017][debug] Compress::Zlib is available.
[Fri Jan  6 14:25:06 2017][debug] Calling handlers : `prolog_writer'
[Fri Jan  6 14:25:06 2017][debug] sending XML
[Fri Jan  6 14:25:06 2017][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>pg1042-vm001-38314443-4437-4633-2D44-3639312D3333</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Fri Jan  6 14:25:06 2017][error] Cannot establish communication : 400 Bad Request

Output of Server log:

Fri Jan  6 13:25:07 2017;2018;502;pg1042-vm001-38314443-4437-4633-2D44-3639312D3333;10.30.10.124;OCS-NG_unified_unix_agent_v2.2;inventory;Bad deviceid
Fri Jan  6 13:25:07 2017;2018;515;pg1042-vm001-38314443-4437-4633-2D44-3639312D3333;10.30.10.124;OCS-NG_unified_unix_agent_v2.2;end;bad_request

I´m wondering why there is agent 2.2? I double checked that i downloaded 2.3RC from this link:
https://github.com/OCSInventory-NG/UnixAgent/releases/download/2.3RC/Ocsinventory-Unix-Agent-2.3RC.tar.gz

You have any suggestions what i have to or what i do wrong?

CPU info for i386 Linux.

Bonjour,

Je suis en train de travailler sur la détection de CPU sous linux i386 pour notre parc serveurs (je m'attaquerai à l'avenir peut-être à celle d'AIX et de Solaris, si besoin).

L'objectif premier de mon employeur est d'avoir un décompte de CPU(socket)/Core/Logical_CPU fiable, car ces informations sont stratégiques vis-à-vis des licences facturées par Core (par exemple Oracle).

Pour nous, le reste des infos (voltage, type de socket, etc...) est donc vu comme facultatif, car non utilisé par nos service IT.
Nous avons donc choisi de refondre et simplifier le code lié au CPU (d'abord parce que je n'ai pas fait de Perl depuis 15 ans et aussi que je ne suis pas expert system Unix) avant de l'enrichir en fonctionnalités et converger vers une version qui serait acceptable par l'équipe projet OCS.
Je suis partis de la version de @MikkelPaulson : https://github.com/MikkelPaulson/OCSInventory-NG-UnixAgent/blob/2886b41203ef27e202cf3219fbb649ed64e9364a/lib/Ocsinventory/Agent/Backend/OS/Linux/Archs/i386/CPU.pm

Après l'analyse du code de l'agent, il semble que 2 propriétés gérées par le serveur OCS ne le sont pas pour l'instant par l'agent UNIX :

LOGICAL_CPU et CURRENT_ADDRESS_WIDTH ne sont en effet pas remontés par l'agent Unix.

L'info LOGICAL_CPU correspond, selon ma compréhension des choses, à l'info "siblings" de /proc/cpuinfo

Par contre, je me demande ce qui doit être remonté dans CURRENT_ADDRESS_WIDTH ? Sous Linux i386, est-on toujours avec DATA_WIDTH = CURRENT_ADDRESS_WIDTH, et sinon, où est-on susceptible de trouver cette info ?

Je vous remercie de vos éléments de réponses éventuels, cela me permettra de continuer de travailler sur les fichiers CPU.pm et Common.pm de l'agent Unix et de contribuer plus efficacement.

Mes travaux sont ici : master...Bexounet:master


I'm working on CPU detection on Linux i386. (Next investigation will be Solaris and AIX).

The first aim of my corporation is to have a trustable count of CPU(socket)/Core/Logical_CPU. This information is strategic because of software licence (like Oracle).

For my corporation other information (voltage, Socket type, ...) are optional or irrelevant (because nobody use these information in our IT services).

We choose to simplify the code (because I’m a newbie in Perl and I’m not an expert in Unix System admin) , and then add the functionality to be able to merge our code with the code of the OCS team.

I started with @MikkelPaulson ‘s code. : https://github.com/MikkelPaulson/OCSInventory-NG-UnixAgent/blob/2886b41203ef27e202cf3219fbb649ed64e9364a/lib/Ocsinventory/Agent/Backend/OS/Linux/Archs/i386/CPU.pm
After an analyse of the agent’s code, it seems that 2 property the OCS server manage aren’t managed by the Unix Agent.
LOGICAL_CPU and CURRENT_ADDRESS_WIDTH aren’t managed by the Unix agent
LOGICAL_CPU seems to be the "siblings" information of the /proc/cpuinfo

But, what about CURRENT_ADDRESS_WIDTH ? On Linux i386, is DATA_WIDTH equal to CURRENT_ADDRESS_WIDTH ? And if not, where the information is available ?

Thanks for your answers; they will allow me to contribute and improve the CPU.pm and Common.pm.

My work is here : master...Bexounet:master

Uninitialized value $leasepath

Bonjour,

je rencontre un problème lors du premier lancement de l'agent UNIX à la fin de l'installation et j'obtiens, ces messages d'erreur

Launching OCS Inventory NG Unix Unified agent...
Use of uninitialized value $leasepath in open at /usr/local/share/perl/5.22.1/Ocsinventory/Agent/Backend/OS/Linux/Network/Networks.pm line 55.
Use of uninitialized value $leasepath in concatenation (.) or string at /usr/local/share/perl/5.22.1/Ocsinventory/Agent/Backend/OS/Linux/Network/Networks.pm line 73.
Can't open
-> Failed!

Es ce normal?

Merci

lsusb.pm "unable to initialize libusb: -99"

a) The following module have no exception handling if VM does not setup usb on starting ocs service.
thus getting "unable to initialize libusb: -99" (lsusb.pm, usb.pm)

b) "USBDEVICES" and fields are not found to be setup in latest Server's Map.pm and Table.
common.pm (sub addUsb)

Modification du fichier LSB.pm

Bonjour,
J'ai essayé de modifier le fichier LSB.pm pour faire remonter des valeurs dans le champ "OSVERSION" et mettre plus d'informations dans le champ "OSNAME". J'ai 2 machines Debian sur lesquelles ça a fonctionné. Par contre, pour les autres machines Debian ça ne fonctionne pas. J'ai pourtant renseigné le même fichier LSB.pm.
Sauriez-vous d'où peut venir le problème ?
Merci,

Device type

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system :
Perl version :

OCS Inventory informations

Unix agent version :

Problem's description

Describe your problem here

Inventory log file ( optional )

Use github cloud or trusted upload website

Add plugin TypeMateriel into the agent. http://wiki.ocsinventory-ng.org/index.php?title=Plugins:TypeMateriel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.