Skip to main content

Posts

Load test Monitor script

 #!/bin/bash # Define logfile and other variables LOGFILE="/path/to/mongod.log"    # Path to MongoDB log file OUTPUT_FILE="/path/to/output.log" # Path where the output will be saved # Record the date echo "===== Date: $(date) =====" >> $OUTPUT_FILE # Record just the first line of w output (system uptime, users, and load average) echo "===== System Uptime, Users, and Load Average (w command) =====" >> $OUTPUT_FILE w | head -n 1 >> $OUTPUT_FILE # Record only the %user value from iostat echo "===== I/O Statistics (%user from iostat command) =====" >> $OUTPUT_FILE iostat | awk '/^ / {getline; print "User CPU: " $1 "%"}' >> $OUTPUT_FILE # Capture top processes, filtering for MongoDB (mongod) echo "===== Top Processes (top command) - Filter for mongod =====" >> $OUTPUT_FILE top -b -n 1 | grep mongod >> $OUTPUT_FILE # Filter MongoDB log for specific information (e....
Recent posts

Mongodb online Training course Agenda

  Goal:   In this module, you will get an understanding of NoSQL databases, design goals, requirement of NoSQL database/ MongoDB, MongoDB® architecture and introduction to JSON and BSON among others. This module will also cover the installation of MongoDB® and associated tools. Skills Understand NoSQL databases and  advantages Install MongoDB on Windows and Linux platform Security Enable and high availability Objectives After completing this module, you will  be able knowledge ed on SQL and noSQL Database usages and difference between these MongoDB design and architecture  MongoDB GUI tools Describe JSON and BSON Install MongoDB on Windows, Linux, MAC OS etc.  Setup MongoDB environment Topics • Understanding the basic concepts of a Database • Database categories: What is NoSQL? Why NoSQL? Benefit over RDBMS  • Types of NoSQL Database, and NoSQL vs. SQL Comparison, ACID & Base Property • CAP Theorem, implementing NoSQL and what is MongoDB?  • O...

Linux Commands With Examples for Database Admins

Frequently Used Linux Commands With Examples 1. tar command examples Create a new tar archive. $ tar cvf archive_name.tar dirname/ Extract from an existing tar archive. $ tar xvf archive_name.tar View an existing tar archive. $ tar tvf archive_name.tar More tar examples: The Ultimate Tar Command Tutorial with 10 Practical Examples 2. grep command examples Search for a given string in a file (case in-sensitive search).  $ grep -i "the" demo_file Print the matched line, along with the 3 lines after it. $ grep -A 3 -i "example" demo_text Search for a given string in all files recursively $ grep -r "ramesh" * More grep examples: Get a Grip on the Grep! – 15 Practical Grep Command Examples 3. find command examples Find files using file-name ( case in-sensitve find) # find -iname "MyCProgram.c" Execute commands on files found by the find command $ find -iname "MyCProgram.c" -exec md5sum {} \; Find all empty...

Mysql Server Installation on Windows

Pre Requisite s : Microsoft .NET Framework 4.5.2 MySQL 8.0 Server requires the Microsoft Visual C++ 2015 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before installing the server. The package is available at the Microsoft Download Center.   Additionally, MySQL debug binaries require Visual Studio 2015 to be installed. URL : MySQL Downloads @ https://dev.mysql.com/downloads/mysql/                    @ http://dev.mysql.com/downloads/installer/ Microsoft Visual C++ 2015 @ https://www.microsoft.com/en-us/download/default.aspx Installing Mysql on windows are two types           1. Using MySQL Installer           2. Using MySQL Binaries Method -1 : Using MySQL Installer           MySQL installer is the easiest way. MySQL installer provides you with an easy-to-...

Introduction to Database & Database Administrator roles

Database: A database is an organized collection of data, generally stored and accessed electronically from a computer system.  Where databases are more complex they are often developed using formal design and modeling techniques. The database management system (DBMS) is the software that interacts with end users, applications,  and the database itself to capture and analyze the data. The DBMS software additionally encompasses  the core facilities provided to administer the database. The sum total of the database, the DBMS and  the associated applications can be referred to as a "database system". Often the term "database"  is also used to loosely refer to any of the DBMS, the database system or an application associated with the database. Database Admin:  A database administrator (DBA) is a specialized computer systems administrator who maintains a successful database environment by directing or performing all related activities to keep...

About MySQL - Database history Support and Versioning

About MySQL: MySQL was created by a Swedish company. David Axmark (left) and Michael "Monty" Widenius,  MySQL AB, founded by David Axmark, Allan Larsson and Michael "Monty" Widenius. Original development of MySQL by Widenius and Axmark began in 1994. The first version of MySQL appeared on 23 May 1995. It was initially created for personal usage from mSQL based on the low-level language ISAM, which the creators considered too slow and inflexible. They created a new SQL interface, while keeping the same API as mSQL. By keeping the API consistent with the mSQL system, many developers were able to use MySQL instead of the (proprietarily licensed) mSQL antecedent. Support: The MySQL server software itself and the client libraries use dual-licensing distribution. They are offered under GPL version 2, or a proprietary license. MySQL AB owns the copyright to the MySQL source code. This means that MySQL AB can distribute MySQL under several different l...

MySQL Architecture -Client Server Architecture

Client/Server Overview The MySQL database system operates using a client/server architecture. The server is a central program that manages database contents, and client programs connect to the server to retrieve or modify the data. MySQL also includes non-client utility programs and scripts. MySQL Server:   This is the mysqld program that manages database and tables. Most users choose binary MySQL distribution that includes a server ready to run with the capabilities they need, but it's also possible to compile MySQL from source. Client Programs:  These are programs that communicate with the server by sending requests to it over a network connection. The server acts on each request and returns a response to the client. For example you can use the mysql client to send queries to the server, and the server returns the query results. A client program can connect locally to a server running on the same machine or remotely to a server running on a different mac...