Skip to content

Instantly share code, notes, and snippets.

@sidusnare
Created May 12, 2022 22:42
Show Gist options
  • Save sidusnare/8bc8968c024b87e7e53d8b32b71fe022 to your computer and use it in GitHub Desktop.
Save sidusnare/8bc8968c024b87e7e53d8b32b71fe022 to your computer and use it in GitHub Desktop.
uses systemctl's ability to show status of a pid to display status of a service that's been updated, can easily be adjusted to restart those updated services
for pid in $( lsof -n | grep -w deleted | grep -E -v ' /dev/shm/| /proc/| /tmp/| /home/| /memfd' | awk '{print($2)}' );do
systemctl status "${pid}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment