From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Monitoring IPC usage

Monitoring IPC usage

- So we talked about IPCs a bit. You can monitor them as well. So how does that work? Well, there is the IPCs command, which is a bit of an old command. It'll give you an overview of System V IPCs, but it's limited because not every process is using System V IPCs. IPCs -L will show current limits on the System V IPCs. You can also use LSOF -P on a process ID. That'll show all the open files. And if your open file is an IPC, it'll list the IPC type. That's actually quite convenient. The alternative would be to see the same from /PROC/PID FD, but LSOF -P is giving a pretty decent interpretation. Then the other way to see IPCs is by using STRASE -P on a PID. So that attaches a STRACE to a currently running process and it'll show you the different IPCs. You will see socket and connect and bind. If it's a socket-oriented, you'll see SHMGET and SHMAT for shared memory access, or message get, a message received, a message sent for message queues. Let me show you. So first IPCs is showing…

Contents