Skip to content

Instantly share code, notes, and snippets.

@jsilberm
Created May 24, 2018 03:56
Show Gist options
  • Save jsilberm/a407a8ca7e744e64a622f207bde70a4b to your computer and use it in GitHub Desktop.
Save jsilberm/a407a8ca7e744e64a622f207bde70a4b to your computer and use it in GitHub Desktop.
'journalctl portworx' utility script
#!/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