Interfacing with a truck's internal CAN bus system
ELM327 is a factory-programmed PIC microcontroller that supports popular OBD2 protocols. It can also handle raw CAN but I would not count on it being a good CAN analyzer/sniffer or handle large amounts of data.

If your end goal is Linux and SocketCAN - I think it would be best if you just connected a MCP2515 HAT to a Raspberry Pi. You could then use the excellent Wireshark for analysis or write your own scripts. It is a popular and well supported configuration. Just google for countless tutorials.

If you go for a PIC MCU you will have to redevelop much of the drivers before you get into the SocketCAN subsystem.