You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-10-30 19:49:30

hvillanu
Guest
Registered: 2010-11-02
Posts: 16

GLPI not displaying correct OS RAM SIZE on main page

Good day,

I ve en imported computers with OCS-ng witout any issues

When I go to Assets-> Computers -> (Select Computer) -> Components -> Memory. The RAM size looks fine:


Memory                    Type        Frecuency        Size (Mio)        

DDR2 - XMM1 (No ECC) Añadir    DDR2    800            2048
DDR2 - XMM1 (No ECC) Añadir    DDR2    800            2048



BUT on Assets -> Computers Main screen shows wrong RAM size: 4 Mio instead 4096 Mio (or 4Gb)


Name    Entity        Components - Components - Memory

PC        Root entity    4 Mio


I don't mind if shows Mio or Gb, but need to shows right size of Memory RAM


I'm usign:

GLPI 9.3.1
OCS Inventory NG    1.5.4

PHP 7.2.5
mariadb 10.2.15-lp150.2.3.2
Apache 2.4.33-lp150.1.2

Linux openSUSE 15.0 4.12.14-lp150.12.16-default


Any help will be appreciated!


Regards.

Offline

#2 2018-11-02 17:32:01

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,314

Re: GLPI not displaying correct OS RAM SIZE on main page

I don't have this issue with latest stable version: 9.3.2


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Online

#3 2018-11-04 00:51:08

hvillanu
Guest
Registered: 2010-11-02
Posts: 16

Re: GLPI not displaying correct OS RAM SIZE on main page

yllen wrote:

I don't have this issue with latest stable version: 9.3.2

I perform the upgrade, but don't be fixed.

I think the "bug" cloud be on  toolbox.class.php

On this part of code ...


//TRANS: list of unit (o for octet)
      $bytes = [__('o'), __('Kio'), __('Mio'), __('Gio'), __('Tio')];
      foreach ($bytes as $val) {
         if ($size > 1024) {
            $size = $size / 1024;
         } else {
            break;
         }
      }


If I change
      $bytes = [__('o'), __('Kio'), __('Mio'), __('Gio'), __('Tio')];
for
      $bytes = [__('Kio'), __('Mio'), __('Gio'), __('Tio')];


Fix RAM size on main Screen but moves sizes on Volumes and Components computer pages.

Offline

#4 2018-11-06 14:34:06

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,314

Re: GLPI not displaying correct OS RAM SIZE on main page

I do a test with same value as you.
In component of a computer, 2 memories with 2048 Mio size each
In computer main page memory is displayed as 4 Gio.

So all is correct


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Online

#5 2018-11-07 16:09:07

hvillanu
Guest
Registered: 2010-11-02
Posts: 16

Re: GLPI not displaying correct OS RAM SIZE on main page

I still have issue ... Any suggestion about workaround ?

Offline

#6 2018-11-07 18:27:10

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,314

Re: GLPI not displaying correct OS RAM SIZE on main page

I can't correct if i can't reproduce.
Have you some errors in GLPI logs? in Apache logs? in Debug mode?
You device memories and your computer are in same entity?


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Online

#7 2018-11-12 16:52:57

hvillanu
Guest
Registered: 2010-11-02
Posts: 16

Re: GLPI not displaying correct OS RAM SIZE on main page

Thanks for you time...

I try to get some log error, but can't find any... only this one in debug mode (at Computers main screen):

PHP Notice: A non well formed numeric value encountered in /srv/www/htdocs/asset/inc/dropdown.class.php at line 1557


So I add some images to show the issue:

Computers on Main Screen: https://drive.google.com/file/d/193F_Ss … uUNEe/view

Computer Memory Detail: https://drive.google.com/file/d/1aiYizE … 6RLvV/view

Memory Detail: https://drive.google.com/file/d/16GQ8YV … MLRze/view

Memory Items: https://drive.google.com/file/d/1k07GPt … Cod91/view

Offline

#8 2018-11-12 17:35:07

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,314

Re: GLPI not displaying correct OS RAM SIZE on main page

I don't understand, in 9.3.1 you don't have string like MB.
Are you sure of your version number?


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Online

#9 2018-11-12 17:55:34

hvillanu
Guest
Registered: 2010-11-02
Posts: 16

Re: GLPI not displaying correct OS RAM SIZE on main page

Yes, I'm ... MB is because translation.


Information about system installation and configuration

 
GLPI 9.3.2 (/asset => /srv/www/htdocs/asset)
Installation mode: TARBALL

Server
 
Operating system: Linux linux-cich 4.12.14-lp150.12.16-default #1 SMP Tue Aug 14 17:51:27 UTC 2018 (28574e6) x86_64
PHP 7.2.5 apache2handler (Core, PDO, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu, bcmath, bz2, calendar,
	ctype, curl, date, dom, fileinfo, filter, ftp, gd, geoip, gettext, hash, iconv, json, ldap, libxml, mapi, mbstring, mysqli,
	mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, session, snmp, soap, sqlite3, standard, tokenizer, xml, xmlreader, xmlrpc,
	xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
	upload_max_filesize="2M" 
Software: Apache ()
	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Server Software: openSUSE package
	Server Version: 10.2.15-MariaDB
	Server SQL Mode: 
	Parameters: dbaadmin@localhost/asset
	Host info: Localhost via UNIX socket
	
mysqli extension is installed
ctype extension is installed
fileinfo extension is installed
json extension is installed
mbstring extension is installed
zlib extension is installed
curl extension is installed
gd extension is installed
simplexml extension is installed
xml extension is installed
ldap extension is installed
Zend OPcache extension is installed
APCu extension is installed
xmlrpc extension is installed
imap extension is not present
CAS extension is not present
Database version seems correct (10.2.15) - Perfect!Database version seems correct (10.2.15) - Perfect!
OK/srv/www/htdocs/asset/files/_log : OK
OK/srv/www/htdocs/asset/config : OK
OK/srv/www/htdocs/asset/files : OK
OK/srv/www/htdocs/asset/files/_dumps : OK
OK/srv/www/htdocs/asset/files/_sessions : OK
OK/srv/www/htdocs/asset/files/_cron : OK
OK/srv/www/htdocs/asset/files/_graphs : OK
OK/srv/www/htdocs/asset/files/_lock : OK
OK/srv/www/htdocs/asset/files/_plugins : OK
OK/srv/www/htdocs/asset/files/_tmp : OK
OK/srv/www/htdocs/asset/files/_cache : OK
OK/srv/www/htdocs/asset/files/_rss : OK
OK/srv/www/htdocs/asset/files/_uploads : OK
OK/srv/www/htdocs/asset/files/_pictures : OK
Web access to the files directory should not be allowed
Check the .htaccess file and the web server configuration.

Libraries
 
htmLawed version 1.2.4 in (/srv/www/htdocs/asset/lib/htmlawed)
SimplePie version 1.5.2 in (/srv/www/htdocs/asset/vendor/simplepie/simplepie/library)
TCPDF version 6.2.25 in (/srv/www/htdocs/asset/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/srv/www/htdocs/asset/vendor/michelf/php-markdown/Michelf)
true/punycode in (/srv/www/htdocs/asset/vendor/true/punycode/src)
iacaml/autolink in (/srv/www/htdocs/asset/vendor/iamcal/lib_autolink)
sabre/vobject in (/srv/www/htdocs/asset/vendor/sabre/vobject/lib)

LDAP directories
 
Server: 'ldap://x.x.x.x', Port: '389', BaseDN: 'dc=xxxxxxxxx', Connection filter: none, RootDN:
		'CN=xxx,CN=Users,DC=xxxxx', Use TLS: none

SQL replicas
 
Not active

Notifications
 
Way of sending emails: PHP

Mails receivers
 

Plugins list
 
	datainjection        Name: File injection                 Version: 2.6.3      State: Enabled
	fusioninventory      Name: FusionInventory                Version: 9.3+1.1    State: Not activated
	genericobject        Name: Objects management             Version: 2.6.2      State: Enabled
	ocsinventoryng       Name: OCS Inventory NG               Version: 1.5.4      State: Enabled
	reports              Name: Reports                        Version: 1.12.0     State: Enabled

OCS Inventory NG
Host: localhost
Connection: Ok
Use the OCSNG software dictionary: Yes
Host: 150.23.33.52
Connection: Ok
Use the OCSNG software dictionary: No

Offline

#10 2018-11-13 09:37:35

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,314

Re: GLPI not displaying correct OS RAM SIZE on main page

I create a memory like your example and i can't reproduce.
Which language do you use?


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Online

#11 2018-11-13 19:33:02

hvillanu
Guest
Registered: 2010-11-02
Posts: 16

Re: GLPI not displaying correct OS RAM SIZE on main page

I switch language to English

Also I create memory by hand (no Ocs-ng import)

Now I see Mio instead MB ... But on main screen still wrong size (mus be Gb - or Gio)



https://drive.google.com/file/d/1-aNmYa … sp=sharing

https://drive.google.com/file/d/1Gn4K-c … sp=sharing

https://drive.google.com/file/d/1tmp5Nd … sp=sharing


Regards

Offline

#12 2018-11-15 13:12:55

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,314

Re: GLPI not displaying correct OS RAM SIZE on main page

ticket opened if GLPI forge to ask other dev: https://github.com/glpi-project/glpi/issues/4918


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Online

Board footer

Powered by FluxBB