Thursday, August 25, 2011

MySQL configuration file variables Explained

SkyHi @ Thursday, August 25, 2011
This MySQL server has been running for 0 days, 2 hours, 9 minutes and 22 seconds. It started up on Aug 25, 2011 at 09:34 AM.

Server traffic: These tables show the network traffic statistics of this MySQL server since its startup.

Traffic 1 ø per hour
Received 15 KiB 7,284 B
Sent 43 KiB 20 KiB
Total 59 KiB 27 KiB
Connections ø per hour %
max. concurrent connections 2 --- ---
Failed attempts 0 0.00 0.00%
Aborted 0 0.00 0.00%
Total 87 40.35 100.00%

Query statistics: Since its startup, 284 queries have been sent to the server.

Total ø per hour ø per minute ø per second
284 131.72 2.20 0.04
Query type ø per hour %
select 158 73.280 80.20%
set option 15 6.957 7.61%
show tables 8 3.710 4.06%
show binlogs 3 1.391 1.52%
change db 3 1.391 1.52%
show variables 3 1.391 1.52%
Query type ø per hour %
admin commands 2 0.928 1.02%
show slave status 1 0.464 0.51%
show master status 1 0.464 0.51%
show databases 1 0.464 0.51%
flush 1 0.464 0.51%
show status 1 0.464 0.51%
Query type ø per hour %
show charsets 1 0.464 0.51%
show collations 1 0.464 0.51%
show grants 1 0.464 0.51%
show plugins 1 0.464 0.51%
 
SQL query
Variable Value Description
Flush_commands 1 The number of executed FLUSH statements.
Last_query_cost 0 The total cost of the last compiled query as computed by the query optimizer. Useful for comparing the cost of different query plans for the same query. The default value of 0 means that no query has been compiled yet.
Slow_queries 0 The number of queries that have taken more than long_query_time seconds.Documentation
   
SSL
Variable Value Description
Ssl_accept_renegotiates 0
Ssl_accepts 0
Ssl_callback_cache_hits 0
Ssl_cipher
Ssl_cipher_list
Ssl_client_connects 0
Ssl_connect_renegotiates 0
Ssl_ctx_verify_depth 0
Ssl_ctx_verify_mode 0
Ssl_default_timeout 0
Ssl_finished_accepts 0
Ssl_finished_connects 0
Ssl_session_cache_hits 0
Ssl_session_cache_misses 0
Ssl_session_cache_mode NONE
Ssl_session_cache_overflows 0
Ssl_session_cache_size 0
Ssl_session_cache_timeouts 0
Ssl_sessions_reused 0
Ssl_used_session_cache_entries 0
Ssl_verify_depth 0
Ssl_verify_mode 0
Ssl_version
 
Handler
Variable Value Description
Handler_commit 0 The number of internal COMMIT statements.
Handler_delete 0 The number of times a row was deleted from a table.
Handler_discover 0 The MySQL server can ask the NDB Cluster storage engine if it knows about a table with a given name. This is called discovery. Handler_discover indicates the number of time tables have been discovered.
Handler_prepare 0
Handler_read_first 4 The number of times the first entry was read from an index. If this is high, it suggests that the server is doing a lot of full index scans; for example, SELECT col1 FROM foo, assuming that col1 is indexed.
Handler_read_key 0 The number of requests to read a row based on a key. If this is high, it is a good indication that your queries and tables are properly indexed.
Handler_read_next 0 The number of requests to read the next row in key order. This is incremented if you are querying an index column with a range constraint or if you are doing an index scan.
Handler_read_prev 0 The number of requests to read the previous row in key order. This read method is mainly used to optimize ORDER BY ... DESC.
Handler_read_rnd 0 The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly.
Handler_read_rnd_next 1,878 The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
Handler_rollback 0 The number of internal ROLLBACK statements.
Handler_savepoint 0
Handler_savepoint_rollback 0
Handler_update 0 The number of requests to update a row in a table.
Handler_write 1,819 The number of requests to insert a row in a table.
 
Query cache
Variable Value Description
Flush query cache Documentation
Qcache_free_blocks 1 The number of free memory blocks in query cache.
Qcache_free_memory 17 M The amount of free memory for query cache.
Qcache_hits 0 The number of cache hits.
Qcache_inserts 0 The number of queries added to the cache.
Qcache_lowmem_prunes 0 The number of queries that have been removed from the cache to free up memory for caching new queries. This information can help you tune the query cache size. The query cache uses a least recently used (LRU) strategy to decide which queries to remove from the cache.
Qcache_not_cached 158 The number of non-cached queries (not cachable, or not cached due to the query_cache_type setting).
Qcache_queries_in_cache 0 The number of queries registered in the cache.
Qcache_total_blocks 1 The total number of blocks in the query cache.
 
Threads
Variable Value Description
Show processes Documentation
Slow_launch_threads 0 The number of threads that have taken more than slow_launch_time seconds to create.
Threads_cached 1 The number of threads in the thread cache. The cache hit rate can be calculated as Threads_created/Connections. If this value is red you should raise your thread_cache_size.
Threads_connected 1 The number of currently open connections.
Threads_created 2 The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. (Normally this doesn't give a notable performance improvement if you have a good thread implementation.)
Threads_running 1 The number of threads that are not sleeping.
Threads_cache_hitrate_% 97.70 %
 
Binary log
Variable Value Description
Documentation
Binlog_cache_disk_use 0 The number of transactions that used the temporary binary log cache but that exceeded the value of binlog_cache_size and used a temporary file to store statements from the transaction.
Binlog_cache_use 0 The number of transactions that used the temporary binary log cache.
  
Temporary data
Variable Value Description
Created_tmp_disk_tables 49 The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.
Created_tmp_files 0 How many temporary files mysqld has created.
Created_tmp_tables 165 The number of in-memory temporary tables created automatically by the server while executing statements.
 
Delayed inserts
Variable Value Description
Delayed_errors 0 The number of rows written with INSERT DELAYED for which some error occurred (probably duplicate key).
Delayed_insert_threads 0 The number of INSERT DELAYED handler threads in use. Every different table on which one uses INSERT DELAYED gets its own thread.
Delayed_writes 0 The number of INSERT DELAYED rows written.
Not_flushed_delayed_rows 0 The number of rows waiting to be written in INSERT DELAYED queues.
   
Key cache
Variable Value Description
Key_blocks_not_flushed 0 The number of key blocks in the key cache that have changed but haven't yet been flushed to disk. It used to be known as Not_flushed_key_blocks.
Key_blocks_unused 13 k The number of unused blocks in the key cache. You can use this value to determine how much of the key cache is in use.
Key_blocks_used 0 The number of used blocks in the key cache. This value is a high-water mark that indicates the maximum number of blocks that have ever been in use at one time.
Key_read_requests 0 The number of requests to read a key block from the cache.
Key_reads 0 The number of physical reads of a key block from disk. If Key_reads is big, then your key_buffer_size value is probably too small. The cache miss rate can be calculated as Key_reads/Key_read_requests.
Key_write_requests 0 The number of requests to write a key block to the cache.
Key_writes 0 The number of physical writes of a key block to disk.
Key_buffer_fraction_% 18.24 %
   
Joins
Variable Value Description
Select_full_join 0 The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.
Select_full_range_join 0 The number of joins that used a range search on a reference table.
Select_range 0 The number of joins that used ranges on the first table. (It's normally not critical even if this is big.)
Select_range_check 0 The number of joins without keys that check for key usage after each row. (If this is not 0, you should carefully check the indexes of your tables.)
Select_scan 26 The number of joins that did a full scan of the first table.
  Replication
Variable Value Description
Rpl_status NULL The status of failsafe replication (not yet implemented).
Slave_open_temp_tables 0 The number of temporary tables currently open by the slave SQL thread.
Slave_retried_transactions 0 Total (since startup) number of times the replication slave SQL thread has retried transactions.
Slave_running OFF This is ON if this server is a slave that is connected to a master.
   
 
Sorting
Variable Value Description
Sort_merge_passes 0 The number of merge passes the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable.
Sort_range 0 The number of sorts that were done with ranges.
Sort_rows 0 The number of sorted rows.
Sort_scan 0 The number of sorts that were done by scanning the table.
   
 
Tables
Variable Value Description
Flush (close) all tables Show open tables
Open_tables 64 The number of tables that are open.
Opened_tables 418 The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.
Table_locks_immediate 89 The number of times that a table lock was acquired immediately.
Table_locks_waited 0 The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high, and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.
   
                                    Transaction coordinator
Variable Value Description
Tc_log_max_pages_used 0
Tc_log_page_size 0
Tc_log_page_waits 0
 
Variable Value Description
Compression OFF
Open_files 128 The number of files that are open.
Open_streams 0 The number of streams that are open (used mainly for logging).
Open_table_definitions 69
Opened_files 769
Opened_table_definitions 69
Prepared_stmt_count 0
Queries 284
Uptime_since_flush_status 0 days, 2 hours, 9 minutes and 22 seconds
1 On a busy server, the byte counters may overrun, so those statistics as reported by the MySQL server may be incorrect.

Tuesday, August 23, 2011

imap sync

SkyHi @ Tuesday, August 23, 2011
-email(test.example.net)
   -foldertest (don't sync)
   -Inbox  (sync with webmail)
   -Junk E-mail (don't sync)
   -mail (sync)
          -Drafts( sync)
          -savedemail( sync)
          -Sent (need to specify when first configured)
          -test (sync)

+Update Folder list (to sync webmail)


Imap sync(mark READ for another Imap device), POP3 download(mark UNREAD)

Monday, August 22, 2011

Centos 6 Default networking

SkyHi @ Monday, August 22, 2011
Default GUI Static IP Configuration:
 DEVICE="eth0"
NM_CONTROLLED="no"
ONBOOT="yes"
HWADDR=00:0C:29:44:5B:C2
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.100.183
PREFIX=24
GATEWAY=192.168.100.2
DNS1=192.168.100.2
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03


============================================================================
RHEL/CentOS 6 does not configure network interfaces on default installation. Also, it is configured to use NetworkManager. To enable networking interface and disable NetworkManager please follow instructions below.
The /etc/sysconfig/network-scripts/ifcfg-eth0 content looks as follows on default installation.
DEVICE="eth0"
HWADDR=specifc mac address
NM_CONTROLLED="yes"
ONBOOT="no"

For DHCP, configure the interface as follows.
DEVICE="eth0"
HWADDR=specifc mac address
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="dhcp"

Restart the network after configuration.
/etc/init.d/network restart

For Static ip, configure it as follows

DEVICE="eth0"
HWADDR=specifc mac address
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR=ip address here.
NETMASK=netmask here.

Change the /etc/sysconfig/network to have the GATEWAY.
NETWORKING=yes
HOSTNAME=www1.nixcraft.in
GATEWAY=gateway address here.

Change /etc/resolve.conf
nameserver IP

For example configuration, see Method #3
http://www.cyberciti.biz/faq/rhel-centos-fedoracore-linux-network-card-configuration/
Restart the network after configuration.
/etc/init.d/network restart


NOTE: In order to edit partition, you must use GUI with 512MB RAM. Duh!!

REFERENCES
http://www.convirture.com/ee_wiki/index.php?title=RedHat_6_Networking