Tag Info

New answers tagged

1

You could check your slow query log. If it's CPU intensive, it may be some heavy hitting queries that take a while to process. Check to make sure your slow query threshold is set to a reasonable amount of time and then look at your log. When your server is in the middle of a CPU spike, log in and do show full processlist to look at the queries that are ...


2

Strictly speaking the calculation of the recommended buffer pool size above is not correct. It assumes InnoDB works actively with all data. In practice, InnoDB could only touch a fraction of the database. Check how Innodb_buffer_pool_reads and Innodb_buffer_pool_read_requests changes over time. mysqladmin -r -i 1 ext | grep -e ...


3

Chances are that the reason your script runs from the command line but fails from cron is that your DB2 environment is already initialized (i.e. via your .profile) for the interactive session, where it is not when called by cron. Here's a suggested modification: #!/bin/bash # # Setup DB2 Environment . $HOME/sqllib/db2profile # Back up Database db2 ...


0

I took some code snippets from a backup script that I use. You can redirect all output with the exec command, then redirect it back. You can also surround everything with braces and redirect that to a log file. Personally I think bash is a better shell to program in, if you don't have bash ksh works too. #!/bin/bash export MY_LOG_FILE=my_log_file.log ...



Top 50 recent answers are included