aboutsummaryrefslogtreecommitdiff
path: root/modules/devices.c
AgeCommit message (Collapse)Author
2018-11-04devices: get_motherboard() fixesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-11-04devices: get_motherboard() refinementsBurt P
As discussed in #289: "Maybe instead of falling back separately it could try for the best from the board group and the best from the product/system group and always give <board> (<system>), perhaps with any duplicates removed." Signed-off-by: Burt P <pburt0@gmail.com>
2018-11-04devices: Remove product-version from string returned by getMotherboard()Burt P
This reverts a change 2db563687071c099851c59396bdde29a00dba156. It seems to me that using product version in this way gives inconsistent values. The recent benchmark result submitted demonstrates the problem: `2.0 / X370 SLI PLUS (MS-7A33) (Micro-Star International Co., Ltd.)` The product version `2.0` is put in front, but without the product name or product vendor for context, it doesn't really add anything. The board vendor, which otherwise would be in front, is now in () at the end. When the product version is not defined, then the motherboard is reported as `<board vendor> <board name>`. The only time it is `<board name> (<board vendor>)` is when product version is defined. If this change is applied, that same motherboard would be reported `Micro-Star International Co., Ltd. X370 SLI PLUS (MS-7A33)` which, to me, makes more sense for getMotherboard(). I have no idea what "product" this is version 2.0 of. Signed-off-by: Burt P <pburt0@gmail.com>
2018-09-08pci, gpu: fix for duplicate sections when not using EnglishBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-04-24[new] devices/gpu: graphics processorsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-03-12usb_util.cBurt P
A set of functions for getting information for a single USB device, or a list of all devices. The only implemented method is using `lsusb`, which is slow. A method using sysfs would be much better. The existing sysfs and procfs methods in devices/usb.c do not appear to work, so it would have to be something new. devices/usb.c modified to use usb_util, but all the old code is still there. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27Show motherboard version again after DMI refactoringLeandro Pereira
2017-08-27devices: tweak get_motherboard() to only use one translated stringBurt P
Also, simplify now that an empty DMI string is returned as null. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27devices: get_motherboard() fallbacks for board_name and board_vendorBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27devices: use dmi_get_str() in get_motherboard()Burt P
Now that group names are translatable, this seems a better way. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14device: minor tweaksBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14Use product version information in device::getMotherboardLeandro Pereira
This will return something like: ThinkPad X220 / 42917J10 (LENOVO) As opposed to just: 42917J10 LENOVO
2017-08-11CPU Frequency Desc and benchmark result re-formatBurt P
Current CPU configurations aren't properly represented in Hardinfo. For SMT, each hardware thread is still reported as a CPU. Clusters with different CPU clock rates are not reported. It is common for ARM to pair a cluster of fast cores with a cluster of slower, but more power-efficient cores. These changes attempt to address this. The getProcessorFrequency method now returns the processor's max frequency for all its cores. While the new getProcessorFrequencyDesc lists each unique frequency with a prefix Nx with the count of cores at that freqency. Benchmark results have been reformated to use the de-prefixed getProcessorName and getProcessorFrequencyDesc. As an example from benchmark.conf: 4x AMD Phenom(tm) II X4 940 Processor | 800 MHz becomes: AMD Phenom(tm) II X4 940 Processor | 4x 800 MHz Which, I think, makes much more sense, as it works well with this kind of thing: Qualcomm Snapdragon 691 | 4x 1400 MHz + 4x 800 MHz Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-11Make procs/cores/threads description string translatable with plural formsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-11Separate processor name and description + count cores and threadsBurt P
* add cpu_procs_cores_threads() function to get counts from sysfs/topology * each platform must now provide processor_name() and processor_describe() * processor_name_default(): returns a list of unique processor->model_name * processor_describe_default(): returns "N physical; M cores; L threads" * processor_describe_by_counting_names(): returns a list of unique processor->model_name with Nx prefix (ex: "4x ARM Cortex A53 + 4x ARM Cortex A33") * x86: _name and _describe use defaults * arm: _name returns name of SOC, if available, _describe returns processor_describe_by_counting_names() * all other platforms: _name and _describe use defaults * Computer module summary now shows both name and description for CPU Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-09Declare proc_cmp() as staticLeandro Pereira
2017-08-09arm: Try to lookup the SOC name from dt/compatibleBurt P
Just ARM for now, but maybe this will become more generic and it will be possible to have the processor package name and description seperate, even for x86 and whatnot. Also perhaps work in Sockets/Threads/Cores information. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-09Handle mixed cores in get_processor_name(), ex: big.LITTLE or TegraBurt P
In the future, I think a processor will need a name and a description. Name as the straight name of the processor or SOC, and description as what name is now, with 4x and whatnot. x86 description might be "8 cores, 16 threads" or similar. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-30devices.c: printf with no format stringBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: reworked and cleaned upBurt P
* Moved device tree functions to modules/devices/devicetree/dt_util.c * The dtr_* functions usable from outside devicetree.c, for example in get_motherboard(). Must #include "dt_util.h" * Now possible to use an alternate device tree root for testing -DOVRDTRROOT=\"/some/path\" * Alternately, pass dtr_new() an alternate base path. * Abandoned the tuple grouping and inherited properties stuff for now. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Expand device tree supportBurt P
The complete tree is now available to view. There are some bugs, mostly to do with hardinfo protocol quirks. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19All module entries must have name != NULLBurt P
Hack a way to skip unavailable entries. Now "Resources" is avaialbe outside of x86 when it wasn't before. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Move Device Tree up in the listBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Move Raspberry Pi detection stuff into Device Tree sectionBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Begin support for device treeBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12Add column for localized field descriptions to Devices->MemoryBurt P
To get around the earlier problems with localized labels in the memory view, add a column "Description" that uses the localized labels. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12Fix Computer -> Summary -> RAM for non-EnglishBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-04Use load graph (used in memory view) to graph sensor dataLeandro Pereira
Writing this I realized why I stopped working on HardInfo. While there are some good ideas in the architecture, it's API is beyond salvation. It's buggy, quirky, and not intuitive at all.
2017-07-04Ungroup sensor valuesLeandro Pereira
This is a step in adding sensor graphing support.
2017-06-02Requested changes in re rpi board nameBurt P
* dt_get_model() replaced by the simpler g_file_get_contents() * rpi_get_boardname() declared static Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02Get "model" from device tree for board nameBurt P
Uses /proc/device-tree/model for get_motherboard() when not x86. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02rpi board data editsBurt P
Minor edits to the Raspberry Pi board data table. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02Get board information for Raspberry PisBurt P
get_motherboard() will now return something for Raspberry Pi boards. example: "Raspberry Pi 3 (Q1 2016) pcb-rev:1.2 soc:BCM2835 mem:1GB mfg-by:Sony" Signed-off-by: Burt P <pburt0@gmail.com>
2017-04-10Update devices.cTotalCaesar659
2016-07-30If reading from /proc/{ioports,iomem,dma} requires root, warnLeandro Pereira
2015-10-25ARM fixes.jamesbond
2015-10-25revert commit [d5afcb6851]; fix the real cause of missing RAM display (use ↵jamesbond
moreinfo_lookup rather than hi_more_info); fix usb display crashing (util.c now looks for lsusb in /usr/sbin first); fix glibc version not showing (glibc located in /lib64/libc.so.6); initial support for DDR3 spd-decoding (incomplete, the manufacturer is not shown yet).
2015-10-25fix missing RAM memory due to functions of the same name being exported in ↵jamesbond
different shared libraries (fix: make the functions private).
2014-01-03Add initial translation support (patch from rodin.s)Julien Lavergne
2012-05-30Split x86 and x86_64 archeshasufell
lib suffix in hardinfo/binreloc.c is already supported and will be respected now
2012-01-27Remove "lib" prefix from modulesLeandro Pereira
2012-01-26Better manage moreinfo hashesLeandro Pereira
Have only one for the whole program and use per-module namespaces/prefixes so that each module can clear its own information easily.
2012-01-15Allocate/deallocate sensor labels/compute hash table only onceLeandro Pereira
2012-01-07Show moterboard information in the new summary screenLeandro Pereira
2012-01-07Display memory size in the new computer summary screenLeandro Pereira
2010-08-15Fix crash on module unloadLeandro Pereira
2010-05-09Add support to read memory SPD (memory type, speed, timings, etc).Leandro A. F. Pereira
2010-05-08ARCH_i386 and ARCH_x86_64 are not defined anymore; use ARCH_x86 insteadLeandro A. F. Pereira
2010-05-03Move files from hardinfo2 to root.Leandro A. F. Pereira