Last active
December 6, 2016 07:16
-
-
Save mikemackintosh/e657c44a82b10ea49d3e to your computer and use it in GitHub Desktop.
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
PID=$(ps aux |\ | |
grep `w | \ | |
grep -E "\s(tty.*?|console.*?)\s" | \ | |
awk '{print $2}'` | \ | |
grep -v "grep" | \ | |
awk '{print $2}') |
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
sudo strace -p$PID -s9999 -e write,read |
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
sudo script /dev/console | |
# sudo script -f /dev/console |
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
→ w | |
15:18 up 11 days, 22:53, 4 users, load averages: 1.61 1.62 1.51 | |
USER TTY FROM LOGIN@ IDLE WHAT | |
root console - 31Jan15 111days -bash | |
splug pts/1 - Fri10 16:47 ruby /Users/splug/workspace/git/titan-cronus/vendor/bundle/ruby/2.1.0/bin/shotgun | |
splug pts/2 - 05Feb15 6:18 -bash | |
splug pts/3 - 10:33 - w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment