Wednesday, 27 August 2014
Monday, 4 August 2014
thread pooling in mysql
| Notes |
| |||
| Hello, >i will generate given new SR for server monitoring.thanks for help. > Thanks for this. >can i download all conversation ? > Yes, there is a "printable view" that shows you the whole SR text in one page. You can get it by clicking the small printer icon on the right hand side of the SR title. Kind Regards, Leandro Morgado Senior MySQL Support Engineer Oracle Corporation http://www.mysql.com/ ------------ Attend MySQL Central @ OpenWorld, Sept 28 - Oct 2, San Francisco. Learn about the latest developments directly from Oracle's MySQL engineers, boost your skills & share experiences with your peers. Register Now! www.oracle.com/openworld/mysql ------------ | ||||
| Update from Customer |
| |||
| OK, i will generate given new SR for server monitoring.thanks for help. can i download all conversation ? thanks | ||||
| Notes |
| |||
| Hi, >i want to do one more thing related to MySQL server monitoring tool , how we will install that tool? > The install instructions are here: http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-installing.html Note however, that this Service Request is already pretty long and deals with a different problem than MySQL Enterprise Monitor (MEM) install. We typically try to handle different problems on different SRs. This approach gives both you and us several advantages; for instance, by having a new SR, we can concentrate better on the new issue and it also helps us in speeding up the review time (and hence the response time) needed in case a new engineer take ownership of a SR, should the previous owner be not available. Keeping one problem per SR thus leads to shorter, easier to read tickets which are easier to classify and refer back to. For this reason, can I request that you open a new Service Request in case you need further assistance with MEM installation? Kind Regards, Leandro Morgado Senior MySQL Support Engineer Oracle Corporation http://www.mysql.com/ ------------ Attend MySQL Central @ OpenWorld, Sept 28 - Oct 2, San Francisco. Learn about the latest developments directly from Oracle's MySQL engineers, boost your skills & share experiences with your peers. Register Now! www.oracle.com/openworld/mysql ------------ | ||||
| Update from Customer |
| |||
| Hi, Ok,Thanks for help . i want to do one more thing related to MySQL server monitoring tool , how we will install that tool? Thanks | ||||
| Notes |
| |||
| Hi, > can i increase or decease digit which is provide above MySQL variables? You can modify those default values in the my.cnf to make them permanent or some of those variables are dynamic so they can be changed while the server is running. It is important you have some way to measure that you are getting better performance from your application when making changes. http://dev.mysql.com/doc/refman/5.6/en/thread-pool-tuning.html > above parameters will be use whole database OR only Innodb table type? Overall configuration of the thread pool, so the whole database, all database engines, MyISAM or Innodb or others. Regards, -- Roger Nay MySQL - Senior Technical Support Engineer Oracle Italy ------------ Attend MySQL Central @ OpenWorld, Sept 28 - Oct 2, San Francisco. Learn about the latest developments directly from Oracle's MySQL engineers, boost your skills & share experiences with your peers. Register Now! www.oracle.com/openworld/mysql ------------ | ||||
| Update from Customer |
| |||
| Hi, ok, Thread pool plugin started successfully with parameters: thread_pool_size = 16, thread_pool_algorithm = Low Concurrency Algorithm thread_pool_stall_limit = 6 thread_pool_prio_kickup_timer = 1000 thread_pool_max_unused_threads = 0 thread_pool_high_priority_connection = 0 can i increase or decease digit which is provide above MySQL variables? above parameters will be use whole database OR only Innodb table type? Thanks | ||||
| Notes |
| |||
| Hi, To set buffer pool in my.cnf, edit the my.cnf and under the [mysqld] section add this: innodb_buffer_pool_size=128M The size is currently 128M which is the default value. Change it as necessary, depending on how much memory you have free and how much innodb data there is. Restart of mysqld is required for the change to take effect. regards, -- Shane Bester, MySQL Principle Technical Support Engineer Oracle Corporation http://dev.mysql.com/ | ||||
| Update from Customer |
| |||
| Hi, How i can set buffer pool size in my.cnf. buffer pool install in MySQL server or not ? i already sent MySQL log file. Thanks | ||||
| Update from Customer |
| |||
| Upload to TDS successful for the file mysqld_3aug_14.log. | ||||
| Notes |
| |||
| Recommended steps (require MySQL resttart): 1. add following parameter to [mysqld_safe] section of my.cnf : plugin-dir=/usr/lib64/mysql/plugin 2. add following parameter to [mysqld] section of my.cnf : plugin-dir=/usr/lib64/mysql/plugin 3. Restart MySQL Server, observe output of "show plugins;" . If still no luck - send us error log and modified my.cnf | ||||
| Update from Customer |
| |||
| Hi, Using of commands which is provided by you result is below:- MySQL-shared-compat-advanced-5.6.18-1.el6.x86_64 MySQL-embedded-advanced-5.6.18-1.el6.x86_64 MySQL-server-advanced-5.6.18-1.el6.x86_64 MySQL-devel-advanced-5.6.18-1.el6.x86_64 php-mysql-5.3.3-27.el6_5.x86_64 MySQL-client-advanced-5.6.18-1.el6.x86_64 mysql-community-release-el6-5.noarch MySQL-test-advanced-5.6.18-1.el6.x86_64 MySQL-shared-advanced-5.6.18-1.el6.x86_64 [root@INDB-05 ~]# cat /etc/*release CentOS release 6.3 (Final) CentOS release 6.3 (Final) CentOS release 6.3 (Final) [root@INDB-05 ~]# find / 2> /dev/null |grep thread_pool.so /usr/lib64/mysql/plugin/debug/thread_pool.so /usr/lib64/mysql/plugin/thread_pool.so [root@INDB-05 ~]# Thanks | ||||
| Notes |
| |||
| > I searched in MySQL server but there is no thread_pool.so file available . In order to assist with exact folder where thread_pool.so should be located, we need to know what exact packages you did install. E.g. could you execute following Linux shell commands: rpm -qa |grep -i mysql cat /etc/*release Or consider searching for file on all disks using command below (may take some time): find / 2> /dev/null |grep thread_pool.so | ||||
| Update from Customer |
| |||
| Hi, I am waiting for your response. Thanks | ||||
| Update from Customer |
| |||
| Hi, I searched in MySQL server but there is no thread_pool.so file available . please suggest me where i can find particular file? Thanks | ||||
| Notes |
| |||
| Hi Manoj, And this is the error which stops the thread pool plugin from starting. 2014-08-01 12:36:11 19801 [ERROR] Can't open shared library '/var/lib/mysql/plugin/thread_pool.so' (errno: 0 /var/lib/mysql/plugin/thread_pool.so: cannot open shared object file: No such file or directory) seems the thread_pool.so file is not present in the plugin_dir /var/lib/mysql/plugin , please search the file on the server and point the plugin_dir to the directory where the .so file resides. Else, copy the .so file to the /var/lib/mysql/plugin dir. Thanks Anand MySQL Support Engineer. ------------ Attend MySQL Central @ OpenWorld, Sept 28 - Oct 2, San Francisco. Learn about the latest developments directly from Oracle's MySQL engineers, boost your skills & share experiences with your peers. Register Now! www.oracle.com/openworld/mysql ------------ | ||||
| Update from Customer |
| |||
| Upload to TDS successful for the file mysqld_1august_14.log. | ||||
| Notes |
| |||
| Hello Manoj - Please send us the latest mysql error log to check further. Thanks Anand MySQL Support Engineer. ------------ Attend MySQL Central @ OpenWorld, Sept 28 - Oct 2, San Francisco. Learn about the latest developments directly from Oracle's MySQL engineers, boost your skills & share experiences with your peers. Register Now! www.oracle.com/openworld/mysql ------------ | ||||
| Update from Customer |
| |||
| show plugins; +----------------------------+----------+--------------------+---------+-------------+ | Name | Status | Type | Library | License | +----------------------------+----------+--------------------+---------+-------------+ | binlog | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | mysql_native_password | ACTIVE | AUTHENTICATION | NULL | PROPRIETARY | | mysql_old_password | ACTIVE | AUTHENTICATION | NULL | PROPRIETARY | | sha256_password | ACTIVE | AUTHENTICATION | NULL | PROPRIETARY | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | CSV | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | FEDERATED | DISABLED | STORAGE ENGINE | NULL | PROPRIETARY | | InnoDB | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP_PER_INDEX | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP_PER_INDEX_RESET | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_DEFAULT_STOPWORD | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_BEING_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_CONFIG | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_INDEX_CACHE | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_INDEX_TABLE | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_DATAFILES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | partition | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | +----------------------------+----------+--------------------+---------+-------------+ 42 rows in set (0.00 sec) comment which is suggest by you above stat showing. | ||||
| Notes |
| |||
| Hello Manoj - May I ask you to comment the below line from config file, and restart the service. plugin-load=thread_pool=thread_pool.so;tp_thread_state=thread_pool.so;tp_thread_group_state=thread_pool.so;tp_thread_group_stats=thread_pool.so after restart, get us the output of "show plugins;" Thanks Anand MySQL Support Engineer. ------------ Attend MySQL Central @ OpenWorld, Sept 28 - Oct 2, San Francisco. Learn about the latest developments directly from Oracle's MySQL engineers, boost your skills & share experiences with your peers. Register Now! www.oracle.com/openworld/mysql ------------ | ||||
| Update from Customer |
| |||
| Upload to TDS successful for the file my.cnf. | ||||
| Notes |
| |||
| Hi Manoj To install Thread Pool plugin ,you just need put "plugin-load=thread_pool.so" under "[mysqld]" in your my.cnf file,usually MySQL option file location will be /etc/my.cnf : So you need edit this file like below : [mysqld] #any other options #any other options plugin-load=thread_pool.so Which is equivalent to loading all thread pool plugins by naming them individually: [mysqld] plugin-load=thread_pool.so plugin-load=thread_pool=thread_pool.so;tp_thread_state=thread_pool.so;tp_thread_group_state=thread_pool.so;tp_thread_group_stats=thread_pool.so Then restart MySQL server and check plugins status with "show plugins" Please have a look below link for details : 8.11.6.1 Thread Pool Components and Installation http://dev.mysql.com/doc/refman/5.5/en/thread-pool-installation.html And let us know if you have any questions . Regards, Dachao Gao | ||||
| Update from Customer |
| |||
| SHOW PLUGINS; +----------------------------+----------+--------------------+---------+-------------+ | Name | Status | Type | Library | License | +----------------------------+----------+--------------------+---------+-------------+ | binlog | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | mysql_native_password | ACTIVE | AUTHENTICATION | NULL | PROPRIETARY | | mysql_old_password | ACTIVE | AUTHENTICATION | NULL | PROPRIETARY | | sha256_password | ACTIVE | AUTHENTICATION | NULL | PROPRIETARY | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | CSV | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | FEDERATED | DISABLED | STORAGE ENGINE | NULL | PROPRIETARY | | InnoDB | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP_PER_INDEX | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_CMP_PER_INDEX_RESET | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_DEFAULT_STOPWORD | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_BEING_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_CONFIG | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_INDEX_CACHE | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_FT_INDEX_TABLE | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | INNODB_SYS_DATAFILES | ACTIVE | INFORMATION SCHEMA | NULL | PROPRIETARY | | ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | | partition | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY | +----------------------------+----------+--------------------+---------+-------------+ 42 rows in set (0.00 sec) Hi, i want to instal thread buffer pool.how i will? | ||||
| ODM Action Plan |
| |||
| Hi Manoj, So after reviewing the mysqld.log file you uploaded, it shows the following: ..... 2014-07-30 18:25:35 14709 [Note] Event Scheduler: Loaded 0 events 2014-07-30 18:25:35 14709 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.6.18-enterprise-commercial-advanced' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Enterprise Server - Advanced Edition (Commercial) Which seems to indicate that you are back up and running again. Can you confirm what plugins are being used at this time by running the following command: mysql> SHOW PLUGINS; Kind regards Jonathon | ||||
| Update from Customer |
| |||
| Upload to TDS successful for the file mysqld.log. | ||||
| Notes |
| |||
| Hi, Message "[ERROR] InnoDB: Unable to lock ./ibdata1, error: 11" most often indicates that MySQL Server wasn't shutdown properly. Could you try following steps: 1. shutdown MySQL Server 2. Make sure that mysqld process doesn't appear in output of top : top -b -n 1 |grep mysqld 3. Start MySQL Server and send us error log If at step #2 you see that mysqld process is still hanging around, please collect several outputs of command below and send us for review: gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $(pidof mysqld) gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $(pidof mysqld) gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $(pidof mysqld) gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $(pidof mysqld) gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $(pidof mysqld) Regards, Andrii Nikitin MySQL Support | ||||
| Update from Customer |
| |||
| Upload to TDS successful for the file poolthreaderror.txt. | ||||
| ODM Action Plan |
| |||
| Hi Manoj, Thank you for contacting MySQL Support regarding your questions on the MySQL Thread Pool feature and monitoring the threads. The installation instructions are located in the manual at: http://dev.mysql.com/doc/refman/5.6/en/thread-pool-installation.html The simplest method is to change your my.cnf configuration with the lines: [mysqld] plugin-load=thread_pool.so plugin-load=thread_pool=thread_pool.so;tp_thread_state=thread_pool.so;tp_thread_group_state=thread_pool.so;tp_thread_group_stats=thread_pool.so Once the above changes are made, please restart the mysqld service. Note that the second line loads all the plugins required to have the thread information in the information_schema tables. Kind regards Jonathon Coombes MySQL Principal Technical Support Engineer | ||||
| Customer Problem Description |
| |||
| Customer Problem Description --------------------------------------------------- Problem Summary --------------------------------------------------- How to install MySQL Enterprise version with thread pooling with server monitoring ? Problem Description --------------------------------------------------- Hi, I want to install MySQL Enterprise version with thread pooling , server monitoring tool ?please help me. i am sending my LINUX server configuration. Linux version 2.6.32-279.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012 Error Codes --------------------------------------------------- Problem Category/Subcategory --------------------------------------------------- MySQL Server General Issues/MySQL Server Installation and Upgrading Uploaded Files --------------------------------------------------- Template Question Responses --------------------------------------------------- 1) Operating System Linux version 2.6.32-279.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012 2) Architecture processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU E5506 @ 2.13GHz stepping : 5 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid bogomips : 4266.88 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU E5506 @ 2.13GHz stepping : 5 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 4 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid bogomips : 4266.88 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU E5506 @ 2.13GHz stepping : 5 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 4 apicid : 4 initial apicid : 4 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid bogomips : 4266.88 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU E5506 @ 2.13GHz stepping : 5 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 4 core id : 3 cpu cores : 4 apicid : 6 initial apicid : 6 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid bogomips : 4266.88 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: 3) MySQL Server version MySQL 5.6 | ||||
Friday, 25 July 2014
Linux question
1. Give an example of set of shell commands that will give you the number of files in a directory
ls -l | grep ^- | wc -l
2. How do you tell what process has a TCP port open in Linux
netstat -a | grep tcp
3. On a Red Hat Linux Variant how do you control whether a service starts when the system boots
/etc/init.d, /etc/rc[0-6].d/K, S
4. How do you tell the amount of free disk space left on a volume
df -kh
5. Give an example of a set of shell commands to tell how many times “bob” has logged on to the system this month
6. Give an example of a recursively copying a directory from one location to another.
cp -r abc/* ../bak/
7. How do you modify the IP and Net mask of a system running a Red Hat Variant of Linux
/sbin/ifconfig
8. Give an example of a set of shell commands that will give you the number of “httpd” processes running on a Linux box.
ps -ef | grep httpd | grep -v grep | wc -l
1. How do you list the files in an UNIX directory while also showing hidden files?
ls -a
2. How do you execute a UNIX command in the background?
command &
3. What UNIX command will control the default file permissions when files are created?
chmod
4. Explain the read, write, and execute permissions on a UNIX directory.
drwxrwxr-x
5. What is the difference between a soft link and a hard link?
default ln (hard link); ln -s
6. Give the command to display space usage on the UNIX file system.
df -k
7. Explain iostat, vmstat and netstat.
vmstat: virtual memory statistics
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
8. How would you change all occurrences of a value using VI?
:1,$s/value/str/g
9. Give two UNIX kernel parameters that effect an Oracle install
10. Briefly, how do you install Oracle software on UNIX.
-------------- Linux application programming questions ------------------------------
1. Explain the difference between a static library and a dynamic library?
- Static library is linked into the executable, while a dynamic library (or shared object) is loaded while the executable has started.
2. How do you create a static library?
- If you have a collection of object (.o) files, you can do it by running ar command. Generally a static library has a .a extension,
you can link it into an executable by providing -l libraryname to gcc.
3. Where should the developed libraries be installed on the system?
- GNU recommends /usr/local/bin for binaries and /usr/local/lib for libraries.
4. What’s LD_LIBRARY_PATH?
- It’s an environment variable that lists all the directories which should be searches for libraries before the standard directories are searched.
5. How do you create a shared library?
- Create the object file with -fPIC for position-independent code, then run gcc with -shared option.
6. How do you install a shared library?
- Run ldconfig in the standard directory that it’s installed in.
7. What does ldd do?
- It shows a list of installed shared libraries.
8. How do you dynamically load a library in your app?
- Use dlopen()
9. What does nm command do?
- It reports the list of symbols in a given library.
----------------------- MySQL management interview questions --------------------------------
1. How do you show the currently running queries?
- SHOW FULL PROCESSLIST;
2. How do you kill a MySQL query?
- See the ID of it from the question above, then KILL id. You can separate multiple IDs by space.
3. I need to find out how many client connections were aborted by MySQL server.
- It’s displayed in SHOW STATUS query, alternatively accessible via mysqladmin extended-status.
4. What does SET SQL_AUTO_IS_NULL = 1 do?
- you can find the last inserted row for a table that contains an AUTO_INCREMENT column by issuing WHERE auto_increment_column IS NULL
------------------------ Apache ---------------------------
Apache interview questions
1. On a fresh install, why does Apache have three config files - srm.conf, access.conf and httpd.conf?
- The first two are remnants from the NCSA times, and generally you should be ok if you delete the first two, and stick with httpd.conf.
2. What’s the command to stop Apache?
- kill the specific process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop.
3. What does apachectl graceful do?
- It sends a SIGUSR1 for a restart, and starts the apache server if it’s not running.
4. How do you check for the httpd.conf consistency and any errors in it?
- apachectl configtest
----------------------------------------------------------------------------------------------------------------------------------------
9. On CentOS or Fedora based system using the package management application, how do you tell what package provided the file “libnss_ldap.so”
10. What is the difference between VTP client, server, and transparent
11. What is the maximum length of CAT6
12. How does one set up a layer two link to share VLANs
13. How does one implement redundant links at Layer 2
Use Port Channel
14. What is the difference between a hub, switch, and a router? What are the security advantages of switch vs. hub?
hub = bigger collision and broadcast domain
switch = collisions are now limited to the switched port, and broadcasts are limited generally to the same device and vlan.
router = Terminates the 2 above layer 2 issues because it's handling layer 3 (In most cases).
a. What are the security advantages of switch vs. hub
Switches that are capable of Vlans can host several networks independent of each other if properly configured.
15. Show an example of using telnet to learn the headers of an http server.
telnet agencyhomeport.com 80
16. In what OSI layer does PPP exist
2/3
17. What’s the difference between TCP and UDP
UDP: broadcase, TCP: p2p
18. Given a DNS server that has just started (with an empty cache) and host contacting this DNS server (using it’s OS setting)
to learn an address for google.com, list the steps the DNS server will take to learn it with IP addresses (each step will have
multiple possible IP addresses – you need choose only one per step).
19. Why are layer 2 loops bad, and what protocol was designed to prevent them
20. Given a radius server at 10.0.0.2 and a shared key of ‘abc123′ show the IOS commands necessary to authenticate switch users
against the radius server, while still allowing the use of local username / password pairs
----------------------------------
. An until loop ends with done (until – do – done)
. A while loop ends with done (while – do – done)
. The –f option is used to see if a file exists and is a regular file.
. The declare command is used to proclaim what type of variable it is so it can be handled accordingly.
. The variable $* can be used to see the arguments given when the shell script was invoked. 不是 $#.
. The value of $# can be checked to see how many positional parameters were used to call a script.
39. Which of the following should be used to test if the value of two integers is the same?
A. integer1 = integer2
B. integer1 –eq integer2
C. integer1 –a integer2
D. integer1 –o integer2
A test can be done to see if the values of two integers are the same using the –eq parameter. Answer: B.
To test and see if two string values are the same, the equal sign (=) is used.
正好和perl相反.
17. You want to perform a test on a string to make sure that the length of it is not zero before using it.
Which test should be done to accomplish this?
A. [[ string ]]
B. [[ -z string ]]
C. [[ -n string ]]
D. [[ -a string ]]
. The syntax [[ -n string ]] is used to see if the string has a length greater than zero
. The test [[ -z string ]] will verify that the length of the string is zero.
. The expression [[:space:]] can be used to find any white space, including spaces and tabs.
.Which of the following should be used to find "Sam" and "Samantha" in a file?
A. Sam(antha)*
B. Sam[antaha]
C. Sam|antha
D. Sam\(antha\)\?
Using the expression Sam\(antha\)\? will always match "Sam" and it can be followed by zero or one (?)
occurrences of "antha" . Answer: D.
To check the current runlevel: who -r
What file contains the list of drives that are mounted at boot?
/etc/fstab - Linux / Other UNIX version
/etc/vfstab - Solaris UNIX
Explain the usage of the fourth field in /etc/fstab?
It is formatted as a comma separated list of options. Read mount command man page for all the option.
What is /etc/inittab file? In what file is the default run level defined?
System V init examines the '/etc/inittab' file for an 'initdefault' entry, which tells init whether there is a default runlevel.
init is the program on Unix that spawns all other processes. It runs as a daemon and typically has PID 1.
. What command is used to list the top 10 files / directories size wise?
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done
Wednesday, 4 June 2014
MYSQL Global stat
(reports from MySQL)
TEE mysql_stats.txt
show global variables;
show full processlist;
show engine innodb status\G
show global status;
SELECT 'Pausing 5 minutes to allow this' as 'Run the OS statistics reports, now.';
SELECT sleep(300);
show full processlist;
show engine innodb status\G
show global status;
NOTEE
(reports from the operating system. execute these while the MySQL reports are paused)
script os_stats.txt
set -x
vmstat 3 30
iostat -xcd 3 30
cat /proc/meminfo
df -h
mount
pvdisplay
vgdisplay
lvdisplay
top -b -n 3 -d 30
exit
-------------------------------------------------------------------------
mysqldump -u yourlogin -p --no-data --routines --triggers --events database_name_here > schema.txt
SHOW TABLE STATUS
TEE mysql_stats.txt
show global variables;
show full processlist;
show engine innodb status\G
show global status;
SELECT 'Pausing 5 minutes to allow this' as 'Run the OS statistics reports, now.';
SELECT sleep(300);
show full processlist;
show engine innodb status\G
show global status;
NOTEE
(reports from the operating system. execute these while the MySQL reports are paused)
script os_stats.txt
set -x
vmstat 3 30
iostat -xcd 3 30
cat /proc/meminfo
df -h
mount
pvdisplay
vgdisplay
lvdisplay
top -b -n 3 -d 30
exit
-------------------------------------------------------------------------
mysqldump -u yourlogin -p --no-data --routines --triggers --events database_name_here > schema.txt
SHOW TABLE STATUS
Subscribe to:
Posts (Atom)
