Agnus Dei (jackal) wrote,
Agnus Dei
jackal

Convert mysql timestamp to human readable date

tail -10000 mysql-slow.log |awk -F'SET timestamp=' 'NF > 1{ system("date -d @" $2) }{print $_}' > foo.log


That will insert a line before the "SET timestamp=" line of the actual date for the query.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments