List:General Discussion« Previous MessageNext Message »
From:Prabhat Kumar Date:May 8 2010 1:45pm
Subject:Re: how to find no.of transaction in mysql
View as plain text  
Hi,
I think you can get only no. of transactions happned on the database since
it was started.

By using  command "show status" ;  variable "Questions" will give value of
no. of transactions happened on the database since database was started.

But there is way u can use, as I used to calculate query executed per
second.

> time=10
> orig=`mysql -e "show status" | awk '{if ($1 == "Questions") print $2}'`
> sleep $time
> last=`mysql -e "show status" | awk '{if ($1 == "Questions") print $2}'`
> diff=`expr $last - $orig`
> avg=`expr $diff / $time`
> echo "$avg"
>

Thanks,

On Sat, May 8, 2010 at 6:40 PM, Anand <anand.srm@stripped> wrote:

> Hi ,
>
> Is it possible to find the no.of transactions happened on the database for
> the specified duration of time ? it could be for past 2/3 days.
>
> Thanks
> Anand
>



-- 
Best Regards,

Prabhat Kumar
MySQL DBA
Datavail-India Mumbai
Mobile     : 91-9987681929
www.datavail.com

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat

Thread
how to find no.of transaction in mysqlAnand8 May
  • Re: how to find no.of transaction in mysqlPrabhat Kumar8 May
    • Re: how to find no.of transaction in mysqlPrabhat Kumar8 May