charklie / rsftch

Lightning fast hardware fetch written in rust for Linux and NetBSD!
GNU General Public License v3.0
29 stars 3 forks source link

GPU readout empty on NetBSD #15

Closed 0323pin closed 1 month ago

0323pin commented 1 month ago

Hi @charklie

v0.7.1 Massive rework! Release notes: [...] Switched to be using the sensors command and regex for CPU temperature, now no longer over reporting

This is bad, as far as I understand this is a Linux only tool. Depending on lm_sensors kills support for non-Linux systems.

Thoughts?! Regards

charklie commented 1 month ago

Hi @charklie

v0.7.1 Massive rework!

Release notes:

[...]

Switched to be using the sensors command and regex for CPU temperature, now no longer over reporting

This is bad, as far as I understand this is a Linux only tool. Depending on lm_sensors kills support for non-Linux systems.

Thoughts?!

Regards

Oh right! I didn't even think of that, assuming the program still works as expected on NetBSD, I'll fix the README. Thanks!

0323pin commented 1 month ago

Yes, it still builds and works. Although, ...

2024-08-18-151009_937x519_scrot

The GPU read-out is empty again and the package count is wrong by "+1". These things were fixed earlier but, I'd guess they slipped through during re-write?!

charklie commented 1 month ago

Yes, it still builds and works. Although, ...

2024-08-18-151009_937x519_scrot

The GPU read-out is empty again and the package count is wrong by "+1". These things were fixed earlier but, I'd guess they slipped through during re-write?!

Thats really odd, nothing in the function changed apart from some renaming? The package count should be easy to fix though.

0323pin commented 1 month ago

Thats really odd, nothing in the function changed apart from some renaming? The package count should be easy to fix though.

I wounder ... is it picking packages manually installed? Or, did you forget to subtract "1" as ~> ls /usr/pkg/pkgdb | wc -l 191

But one entry is the database itself.

I seems to remember there was an issue with integrated gpu readout earlier.

charklie commented 1 month ago

Thats really odd, nothing in the function changed apart from some renaming? The package count should be easy to fix though.

I wounder ... is it picking packages manually installed? Or, did you forget to subtract "1" as

~> ls /usr/pkg/pkgdb | wc -l

191

But one entry is the database itself.

I seems to remember there was an issue with integrated gpu readout earlier.

I should just be able to minus one and its fine, could you run lspci -nnk and screenshot the output correlated to your GPU?

0323pin commented 1 month ago

Sure, I'll get this later today. Just realized memory is also wrong 😞

Used and total show the same value.

OT, unless you are using a VPN (I'm not) we are in the same city đŸ€Ł

Hej pÄ dig!

charklie commented 1 month ago

Vad roligt!

0323pin commented 1 month ago

VarsÄgod,

~> lspci -nnk
Usage: lspci [<switches>]

Basic display modes:
-mm     Produce machine-readable output (single -m for an obsolete format)
-t      Show bus tree

Display options:
-v      Be verbose (-vv or -vvv for higher verbosity)
-x      Show hex-dump of the standard part of the config space
-xxx        Show hex-dump of the whole config space (dangerous; root only)
-xxxx       Show hex-dump of the 4096-byte extended config space (root only)
-b      Bus-centric view (addresses and IRQ's as seen by the bus)
-D      Always show domain numbers
-P      Display bridge path in addition to bus and device number
-PP     Display bus path in addition to bus and device number

Resolving of device ID's to names:
-n      Show numeric ID's
-nn     Show both textual and numeric ID's (names & numbers)
-q      Query the PCI ID database for unknown ID's via DNS
-qq     As above, but re-query locally cached entries
-Q      Query the PCI ID database for all ID's via DNS

Selection of devices:
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]   Show only devices in selected slots
-d [<vendor>]:[<device>][:<class>]      Show only devices with specified ID's

Other options:
-i <file>   Use specified ID database instead of /usr/pkg/share/pciutils/pci.ids
-M      Enable `bus mapping' mode (dangerous; root only)

PCI access options:
-A <method> Use the specified PCI access method (see `-A help' for a list)
-O <par>=<val>  Set PCI access parameter (see `-O help' for a list)
-G      Enable PCI access debugging
-F <file>   Read PCI configuration dump from a given file

Bonus :)

~> pcictl pci0 list
000:00:0: Intel Core 4G (mobile) Host Bridge, DRAM (host bridge, revision 0x0b)
000:02:0: Intel HD Graphics (GT2) (VGA display, revision 0x0b)
000:03:0: Intel Core 4G (mobile) Mini HD audio (mixed mode multimedia, HD Audio 1.0, revision 0x0b)
000:20:0: Intel Core 4G (mobile) USB xHCI (USB serial bus, xHCI, revision 0x04)
000:22:0: Intel Core 4G (mobile) MEI (miscellaneous communications, revision 0x04)
000:25:0: Intel I218-LM Ethernet Connection (ethernet network, revision 0x04)
000:27:0: Intel Core 4G (mobile) HD Audio (mixed mode multimedia, HD Audio 1.0, revision 0x04)
000:28:0: Intel Core 4G (mobile) PCIe (PCI bridge, revision 0xe4)
000:28:3: Intel Core 4G (mobile) PCIe (PCI bridge, revision 0xe4)
000:29:0: Intel Core 4G (mobile) USB EHCI (USB serial bus, EHCI, revision 0x04)
000:31:0: Intel Core 4G (mobile) LPC (ISA bridge, revision 0x04)
000:31:2: Intel Core 4G (mobile) SATA Controller (AHCI) (SATA mass storage, AHCI 1.0, revision 0x04)
000:31:3: Intel Core 4G (mobile) SMBus (SMBus serial bus, revision 0x04)
002:00:0: Intel Centrino Advanced-N 6205 WiFi (miscellaneous network, revision 0x34)
charklie commented 1 month ago

DĂ„ vet vi problemet! Är pcictl förinstallerat pĂ„ NetBSD eller Ă€r den en del av pciutils?

0323pin commented 1 month ago

DĂ„ vet vi problemet! Är pcictl förinstallerat pĂ„ NetBSD eller Ă€r den en del av pciutils?

Det Àr en del av basen. SÄ, ja den finns i alla NetBSD system, Àven i servrar.

~> which pcictl
/usr/sbin/pcictl
charklie commented 1 month ago

@0323pin Borde nu funka, bytte till pcictl istÀllet för lspci.

0323pin commented 1 month ago

@0323pin Borde nu funka, bytte till pcictl istÀllet för lspci.

Tack!

Till vÀnster 0.6.6, till höger 0.7.2

2024-08-19-053826_1366x768_scrot

warning: function gpu_temp is never used --> src/info.rs:91:4 91 fn gpu_temp() -> String { ^^^^^^^^

= note: #[warn(dead_code)] on by default

warning: rsftch (bin "rsftch") generated 2 warnings (run cargo fix --bin "rsftch" to apply 1 suggestion) Finished release profile [optimized] target(s) in 1m 00s



Men detta kanske kommer frÄn "dead code" i NetBSD och syns inte i Linux. Har inte testat i Linux.
charklie commented 1 month ago

Pushade ny version till git, alla problem ska vara fixade. VĂ€ntar att publicera till cargo tills jag vet att allting funkar som det ska.

charklie commented 1 month ago

Kan du skicka en skÀrmavbild nÀr du kör cat /dev/kmem? Tack.

0323pin commented 1 month ago

Ge mig ett par minuter bara :)

0323pin commented 1 month ago

2024-08-19-143253_1366x768_scrot

charklie commented 1 month ago

Skulle du kunna visa rsftch, cat /proc/meminfo's MemAvailable variabel och top? DÄ borde jag kunna se vad jag ska anvÀnda för att visa minne.

0323pin commented 1 month ago

Japp ... 2024-08-19-144336_1366x768_scrot

0323pin commented 1 month ago

SÀg bara till om du behöver nÄgot annat oxÄ :)

charklie commented 1 month ago

Det dÀr borde vara allt som behövs. Vet redan hur jag ska göra!

charklie commented 1 month ago

Nu ja! "02:0:" i början av GPU infot ska ha försvunnit, och minne ska inte visa 9.12/9.12 SÀg till om det funkar sÄ jag kan publicera till cargo.

0323pin commented 1 month ago

git pull -r & building :)

charklie commented 1 month ago

Vad hÀnde? Fungerar det?

0323pin commented 1 month ago

Sorry, nÄgot dök upp hÀr pÄ jobbet.

NĂ€stan ...

2024-08-19-154715_1366x768_scrot

charklie commented 1 month ago

Ingen fara! Pushade ny version till git nu och publicerar till cargo.

0323pin commented 1 month ago

Tack! Fixar paketet senare idag eller imorgon.

Har dock en frÄga ... I Linux, om jag inte har lm_sensors installerade, kommer det att bygga eller Àr det bara sÄ att en readout inte finns?

charklie commented 1 month ago

Har dock en frÄga ... I Linux, om jag inte har lm_sensors installerade, kommer det att bygga eller Àr det bara sÄ att en readout inte finns?

Provade nyss, verkar som att den kommer att panikera pÄ en unwrap, kanske borde fixa detta nÀsta uppdatering dock.

image

charklie commented 1 month ago

@0323pin Den bygger dock!

0323pin commented 1 month ago

Ok! Tack. SÄ den bygger med spottar ut en panic nÀr den körs.

Tack för testet