"Tokamachi": Troubleshooting a Named Pipe
Scenario: "Tokamachi": Troubleshooting a Named Pipe
Level: Easy
Type: Fix
Tags: bash
Access: Email
Description: There's a process reading from the named pipe /home/admin/namedpipe.
If you run this command that writes to that pipe:
/bin/bash -c 'while true; do echo "this is a test message being sent to the pipe" > /home/admin/namedpipe; done' &
And check the reader log with tail -f reader.log
You'll see that after a minute or so it works for a while (the reader receives some messages) and then it stops working (no more received messages are printed to the reader log or it takes a long time to process one). Troubleshoot and fix (for example changing the writer command) so that the writer keeps sending the messages and the reader is able to read all of them.
Root (sudo) Access: False
Test: There should be a writer process sending messages to the pipe with a delay between writes (so the reader can keep up), and reader.log should still be receiving messages.
The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Time to Solve: 15 minutes.