Skip to content

Instantly share code, notes, and snippets.

@tmuth
Created July 12, 2016 20:48
Show Gist options
  • Save tmuth/4c2f189aabaef7a074fe070da512a0e3 to your computer and use it in GitHub Desktop.
Save tmuth/4c2f189aabaef7a074fe070da512a0e3 to your computer and use it in GitHub Desktop.
Capture prstat CPU data for Oracle user on Solaris and write to a file
#!/bin/bash
# parameter 1 is the name of the test
prstat -m -s cpu -u oracle | nawk '$1=="PID" { "date" | getline d ; close("date") } { print d,$0 }' | tee $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment