Open shadow7412 opened 2 years ago
@shadow7412 Can you get me the result of nvidia-smi
while Frigate is actively using your GPU? I need to see what process it runs to trigger the app detection.
Tue Nov 8 23:28:17 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.76 Driver Version: 515.76 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:41:00.0 Off | N/A |
| 20% 67C P2 51W / 180W | 592MiB / 8192MiB | 5% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 44160 C ffmpeg 323MiB |
| 0 N/A N/A 125423 C ffmpeg 267MiB |
+-----------------------------------------------------------------------------+
Hmm. You might not have a great deal to work with here...
(both of those are frigate, by the way)
You're right about that. I have a second method of detection though but is an extra step. Again, while Frigate is using your GPU, take the PID from nvidia-smi for each process and execute the following for each process and paste it to me:
cat /proc/<pid>/cmdline
ffmpeg-hide_banner-loglevelwarning-c:vh264_cuvid-avoid_negative_tsmake_zero-fflags+genpts+discardcorrupt-rtsp_transporttcp-stimeout5000000-use_wallclock_as_timestamps1-irtsp://[URL_REDACTED]-fsegment-segment_time10-segment_formatmp4-reset_timestamps1-strftime1-c:vcopy-c:aaac/tmp/cache/front-%Y%m%d%H%M%S.mp4-ccopy-fflvrtmp://127.0.0.1/live/front-r5-s1280x720-frawvideo-pix_fmtyuv420ppipe
Poking around in there for anything useful, I did come across /proc/44160/cwd
which contains a folder called frigate... but that's the best I could see. Perhaps you know of something in there that might be more useful (like, getting the parent pid?)
Ok.
So, the following steps seem to work.
nvidia-smi
(to get the pid)cat /proc/53892/task/53892/status | grep PPid
(where 53892 is the pid found in the previous step. Note it's present twice in this command)cat /proc/91204/cmdline
to get the command line of the parent process, which is python3-u-mfrigate
.@shadow7412 Does the plugin detect Frigate now?
Looks like there's been a regression :(
Are there any logs I could attach to help you diagnose what's wrong? (There's no related javascript errors coming up in the console)
@shadow7412 Can you update your plugin and test again? Thanks.
I just updated - the plugin is no longer broken, but I'm not seeing frigate in the active apps.
Here is a screenshot of me going through the process I outlined in the ticket above, in case that helps you in any way.
Hmm, I'll have to look at my code again, but my initial impression is that it should be working with the parent process detection I added.
I had a poke around - and have raised a PR with a change I think will do the trick.
Let me know when I can test the release.
@shadow7412 You should be able to update and try now
Hmm. Still no dice...
For what it's worth, upgrading unraid to 6.11.5 didn't seem to make an impact.
Can we add https://frigate.video to the list of detected applications? It's the only one I have running 24/7.