cables - Pin assignment on rj45 when using rs232 - Electrical Engineering Stack Exchange
communication - I need pinout help for RS232 - DB9 to RJ45 - for home automation - Internet of Things Stack Exchange
USB to rs485
RS232 to RJ45
Videos
Those plugs are most likely (hard to tell from a picture) Cisco console cable plugs.
They convert a DB-9 serial interface to a RJ45 receptacle , but NOT for use with a regular network cable. (They also exist in a DB-25 version.)
They are intended to use with a Cisco console cable (that has a RJ45 plug on 1 end and a DB-9 on the other) or a roll-over cable (RJ45 plug on both ends, but different pin-out than a network cable).
A Cisco console cable + a plug like yours connected to the other end make together a serial 3-wire null-modem cable.
A roll-over cable with 2 of these plugs (on each end) also makes a 3-wire null-modem cable.
That may be all you need. Provided that your lab-device needs a 3-wire null-modem cable, which is the most common case.
But some require a straight cable and in some (rare) cases you need a 5-wire null-modem (or straight) cable.
As modern computers, especially laptops, typically don't have a DB-9 serial port anymore, you may also need a USB to serial converter plug.
For short: There are a lot of variables here. Without more details about the devices involved and the exact nature of your plugs I can't get any more specific.
As Tonny wrote, that adapter is most likely a Cisco RJ45-to-DB9 converter, which is a purely passive adapter. The RJ45 side is not Ethernet, it's just RS232 on a different type of connector (Cisco devices used to have console ports with an RJ45 connector rather than the more common DB9 or DB25 connectors).
If you have an RS232 port on your laptop, then you just need a cable. While this was extremely common a couple of decades ago, nowadays I believe it's quite rare to find a laptop with an RS232 port.
So what you need instead is more likely an RS232-to-USB (aka serial-to-USB) converter/adapter.
Once you have that, you should have a new character device for the serial port somewhere in /dev (details may vary, but probably some kind of /dev/tty-something).
If you just want to capture the data from the serial port to a file, you can just cat /dev/serial_port_device_name >filename.
If you need to change serial port settings you can use stty but beware that you must keep the port open while you do it, otherwise the settings will reverse to defaults right away.
If you want something more foolproof, you can probably write a short script using the language of your choice, or they may be additional tools to manage that.
Alternatively there are devices with serial ports and Ethernet connections (you would then usually use telnet or netcat to connect to the serial ports and capture the data), but these would be more expensive, and only useful if you need to capture data from a larger distance.