Skip to content

Instantly share code, notes, and snippets.

@jimsander
Last active August 29, 2015 14:08
Show Gist options
  • Save jimsander/89a404463ffc688697cc to your computer and use it in GitHub Desktop.
Save jimsander/89a404463ffc688697cc to your computer and use it in GitHub Desktop.
Frequently Used SQls
## Server Request Report ##
# mysql -uroot -p$mypw provisioning -e "select from_unixtime(r.event_timestamp/1000) as event_timestamp,r.event_type,r.server_id,s.name,r.agent_id,r.agent_name,r.agent_email,r.reason from server_request r, cached_server s where r.server_id in (select server_id from cached_server where name like 'psvrldplcdh%') and r.server_id = s.server_id\G" | awk '{ printf("%-16s %s\n",$1,$2)}' | sed 's/\*//g'
## Quick SW Patch
# tar -czvf /root/pre-patch3.tgz `find /services/ -name "enstratius-backend-server*.jar"`
# p=<patch_file>
# for f in `find /services/ -name "enstratius-backend-server*.jar"`; do ff=`dirname $f`; cp /root/$p $f && mv $f ${ff}/$p; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment