New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update model field and add serial field #8200
base: master
Are you sure you want to change the base?
Conversation
|
@smgrol Thank you for this contribution. Please resolve the EasyCLA issue when you can, as this is required for us to be able to merge code to osquery. |
e9aaa37
to
9638779
Compare
e9aaa37
to
02a6a9c
Compare
@zwass thank you, done |
@Micah-Kolide I know you're in the process of looking at improving this table. Does this fit okay? |
I don't see any issue with including the serial, and updating the model info. I know where these are on sysfs, so I can look at putting those into what I'm working on as well. These just come from the bus host, which is easy enough to follow. |
what a pity that I was not aware that work was underway on the block_devices table |
I still think it's very relevant. The serial is a great addition, and looking at the database model makes sense. The only detractor between this and the work I'm in the middle of is that I was removing libudev completely, which would remove the model database id lookup as well. I'm still working on getting my PR up, but I'd definitely wait to see how others weigh in. |
maybe you can check my PR ? as I understand it, it is not yet known when your changes will be published, so maybe you can check and apply the changes to what is now? |
Hello, everyone! |
Hi @smgrol and @concorde18 As I understand things, this PR does two things. First, it adds the serial number to the the table. Second, it changes how While those seem straight forward, there is a related PR up at #8182 which removes udev from the implementation. The desire to remove udev, is two fold. Foremost, it allows better performance because of how traversing the child/parent relationships works. Second, it removes udev. However, one concern I have, is that while it's easy to grab the serial number in 8182, the model mapping is a bit harder. But I also don't understand what that's adding. What do y'all think? |
Hello @directionless |
Hi @directionless ! Complete information about the model allows you to reveal its properties in more detail (for example, KINGSTON SEDC500 can be either 480GB or 960GB). This information is much easier to transfer without additional processing operations to neighboring teams. I think this data would also be relevant for other users. So, what can I do so that as a result we can see the full name of the disk model? Hi @concorde18! thanks for joining the question |
This PR contain two changes:
Previous version of getting info about model of disk not contain full info about connected disks.
For example, (prev. version)
SELECT name, model FROM block_devices WHERE block_size != '';
For inventarization purpose this info about model is not full, because by this info we can't understand which type of disk or which size available on it. Also we can't collect info about serial numbers of connected disks.
For resolve this situation we created this PR .
For example, (new version)