show gpu activity from command line in TrueNAS Core/Jail

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
Hi All,

Since this is really a FreeBSD thing I am wonding if there is a HTOP/TOP like cli command that shows GPU activity? I think my GPU is working with ZoneMinder in a jail but really don't "know" as zoneminder will fall back to software decode if your hardware decode is not compatible with your codec stream.

I am running 12.0-U2 and so far everything is flawless.

Thanks,
Joe
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Unless you've played with the devfs_ruleset to allow it (and that graphics card is directly supported by zoneminder somehow), it's extremely unlikely that it is.
 

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
I have looked and my Geforce GT 730 is supported, lspci in the jail shows I can't run the command, from the TrueNAS console I see:
01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 730] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)

so yes I have to look at the devfs_ruleset

for my jail it shows no devfs in the zm .json file, the gui for the plugin shows using ruleset 4 and in the defaults.json it shows using "devfs_releset": "4",

I see how ruleset 1, 2, 3 and 4 are configured(/etc/defaults/devfs.rules), should I edit 4 or create a new ruleset to pass my video card thru to. I am quite sure I have to be booting/using the onboard Intel graphics for a jail to use the whole video card. this lenovo ts140 uses an i3 so not VT-D. :-(

root@freenas[/etc]# devfs rule -s 4 show
100 include 1
200 include 2
300 include 3
400 path fuse unhide
500 path zfs unhide

I

I am seeing that others have had issues in the past with devfs rules :
https://www.truenas.com/community/threads/usb-passthrough-to-iocage-jail.80690/
https://forums.freebsd.org/threads/usb-passthrough-to-iocage-jail.73292/
 
Last edited:

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
I am not sure why I see iocage telling me it is using ruleset 1000

root@freenas[/etc]# iocage restart zm
* Stopping zm
+ Executing prestop OK
+ Stopping services OK
+ Tearing down VNET OK
+ Removing devfs_ruleset: 1000 OK
+ Removing jail process OK
+ Executing poststop OK
No default gateway found for ipv6.
* Starting zm
+ Started OK
+ Using devfs_ruleset: 1000 (iocage generated default)
+ Configuring VNET OK
+ Using IP options: vnet
+ Starting services OK
+ Executing poststart OK
+ DHCP Address: 192.168.251.109/24
root@freenas[/etc]#
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
You have to configure devfs_ruleset in the jail properties when the jail isn't running.

1613741070044.png


Likewise, in the same page, check allow_mount, pull down the allow_mount dialog to select allow_mount_devfs and allow_mount_procfs. Finally, set securelevel to 0.

Then, in System->Tunables, you'll need to set a couple of sysctl parameters:
  • security.jail.enforce_statfs=0
  • security.jail.mount_allowed=1
  • security.jail.mount_devfs_allowed=1
  • security.jail.mount_procfs_allowed=1
Restart your jail after making these changes.
 

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
Thanks Samuel, I did get this to work on FreeNAS 12.0-U3 with a FreeBSD 12.2 jail on a FreeNAS Mini with a SAS HBA and LTO-5 drive so that Bacula-SD can talk to the tape.

I am not happy that the FreeBSD kernel is limited to 128k for block IO and I am not happy my FreeNAS mini does not support VT-d for PCI device passthru(acpidump -t | grep DMAR ). :-(

Even with this "old" LTO-5 drive and a ssd MIRROR I cannot stream :-(
 
Top