-
-
Save jsilberm/a407a8ca7e744e64a622f207bde70a4b to your computer and use it in GitHub Desktop.
'journalctl portworx' utility script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Here’s a handy BASH/ZSH -shell alias in case you are tired of typing “journalctl ..” to get the PX logs. | |
# By default it’ll display only current/running PX-OCI’s logs, | |
# but the other journalctl-parameters also work (e.g. jp -f for “follow log” or jp --since yesterday). | |
# | |
# Courtesy [email protected] | |
# | |
jp () { | |
local args=${@:-_PID=$(systemctl show --property MainPID portworx | cut -d= -f2)} | |
journalctl --unit portworx $args | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment