This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Monitor MySQL queries | |
| # @author Colin Mollenhour | |
| file=$(mysql -Be 'SHOW VARIABLES LIKE "general_log_file";' | tail -n 1 | awk '{print $2;}') | |
| echo "SET GLOBAL general_log = 'ON';" | mysql | |
| if [ -w "$file" ]; then | |
| >$file | |
| tail -f $file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'abstract.php'; | |
| class Mage_Shell_Pricerules extends Mage_Shell_Abstract | |
| { | |
| public function run() | |
| { | |
| ini_set('memory_limit', '1024M'); | |
| $this->db = Mage::getSingleton('core/resource')->getConnection('core_read'); |
NewerOlder