0

When troubleshooting script ran by Apache, I use the following:

journalctl -f -uhttpd

When executed on the command line, under my normal username I first do:

php testing_new_socket_server.php

and then in another terminal use the following:

journalctl -f

On the machine in question, I have a PHP based server running under a different user than myself and set up using systemctl with unit name phpsocketserver.service which is making a lot of chatter to journalctl and I don't want to see the log associated with it.

How can I just see the log associated with testing_new_socket_server.php?

0

You can restrict the output to lines matching some logged field by adding field=value items to the command, eg to see logs from process 11333 only:

journalctl -f _PID=11333

The fields are listed in man systemd.journal-fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.