我正在尝试获取服务器的硬件信息并将其保存到数据库,该怎么办?
I believe it depends on your system, but looks like there is a gem called hardware_information . Maybe it's what you're looking for.
If your server is running Linux, your code can just read files in /proc to get hardware information. For example:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.