Posts

Showing posts from October, 2021

MySQL - To Run Script

 mysqladm-mytrkdb601.tmw.com::/usr/opt/app/mysql/home>mysql -u root -p Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 385100 Server version: 8.0.18-commercial MySQL Enterprise Server - Commercial Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database           | +--------------------+ | information_schema | | mysql              | | performance_schema | | sys                | | trkt_data          | | yue                | +--------------------+ 6 rows in set (0.03...

To find the number of CPUs or Cores

There are three options to find the number of CPUs or cores on a unix server: (1)   cat /proc/cpuinfo (2)  >grep -i "processor" /proc/cpuinfo | sort -u | wc -l (3) egrep -e "core id" -e ^physical /proc/cpuinfo|xargs -l2 echo|sort -u end