1 00:00:06,400 --> 00:00:11,000 In this video we'll talk a little bit more about the systemd UDFD plug and Play manager. 2 00:00:11,679 --> 00:00:16,265 So systemd UDFD is a standard component on Linux distributions and it ensures 3 00:00:16,265 --> 00:00:20,850 that hardware that is plugged in is enabled with the appropriate properties. 4 00:00:21,850 --> 00:00:26,680 In order to do so, it processes rules and you can find these 5 00:00:26,680 --> 00:00:31,510 rules in userlib UDEV rules d and in etcudevrules dash you can define 6 00:00:31,510 --> 00:00:36,340 exactly what you want to happen when hardware device is plugged in. 7 00:00:36,960 --> 00:00:43,369 Now the user lib UDEV directory contains the standard rules which are installed from packages and should not be modified. If ever 8 00:00:43,369 --> 00:00:49,779 you want to modify, you will put your rules in etc UDEV rules D. But for this course, that's a little bit 9 00:00:49,780 --> 00:00:56,189 too advanced, so let's not do that. One thing that I do want to show you is UDEV ADM monitor. 10 00:00:56,729 --> 00:01:03,013 That's actually a very convenient command that helps you to trace what exactly is happening when 11 00:01:03,013 --> 00:01:09,296 you are plugging in a device. So let me show you UDAV ADM monitor I'm starting 12 00:01:09,296 --> 00:01:15,579 with sudo UDEV ADM monitor and that is going to wait. For hardware events to happen. 13 00:01:16,459 --> 00:01:18,799 If nothing is happening, you can wait. For a long time. 14 00:01:19,540 --> 00:01:21,879 Now let me plug in a USB thumb drive. 15 00:01:24,489 --> 00:01:29,500 Here. As I'm using virtualization, I need to tell my virtualization software what to do with it. 16 00:01:30,200 --> 00:01:33,469 I want it to connect to my CentOS machine. There we go. Okay. 17 00:01:34,409 --> 00:01:39,199 There you can see the USB thumb drive being initiated. The interesting thing is 18 00:01:39,199 --> 00:01:43,989 that you can. Trace the entire procedure. Like here for instance, where you can. 19 00:01:44,069 --> 00:01:46,500 See that the exfat module is loaded. 20 00:01:47,319 --> 00:01:53,129 If you scroll up, you can also see that it has initialized the USB thumb drive as a 21 00:01:53,129 --> 00:01:58,939 device. SDA SDA One more interesting if ever you plug in a USB device and nothing is happening, 22 00:01:58,939 --> 00:02:04,750 well, here you can see what has happened and that might help you in the troubleshooting. 23 00:02:05,310 --> 00:02:09,655 So UDEV ADM monitor works for plugging in, but it also works if you 24 00:02:09,655 --> 00:02:14,000 unplug the device. There you can see the different hardware events are happening. 25 00:02:15,139 --> 00:02:19,579 If you are wondering what is this devices PCI000 and so on, 26 00:02:19,579 --> 00:02:24,019 that is the hardware interface that you find in the sysval system. 27 00:02:24,520 --> 00:02:29,254 So if you really want to go deep, all of this relates to files in the 28 00:02:29,254 --> 00:02:33,990 sys file system because in the end sys is what is used for hardware management.