Re: [SQL] Monitor what command is executing at the backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>    Is there a way to see from the log files on what sql statement is 
> currently by which user?  In other words, I want to monitor 
> the DB activity.

for a current snapshot you don't need the logs, try:

  select * from pg_stat_activity;

(command string needs to be enabled for your database.)


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux