Wednesday, September 11, 2024

Different #memories in #free #command in #linux

The free command in Linux is a powerful tool for monitoring memory usage on your system. It provides information about various types of memory and their utilization. Here are the different memory types and their descriptions as shown in the free command output:

Total Memory (Mem)
This represents the total amount of physical RAM (Random Access Memory) available on your system.
Used Memory (Mem)
This shows the amount of physical RAM that is currently being used by running processes and the kernel.
Free Memory (Mem)
This indicates the amount of physical RAM that is currently unused and available for use by running processes.
Shared Memory (Mem)
This represents the amount of memory that is being shared between multiple processes.
Buff/Cache (Mem)
This shows the amount of memory used for file buffers and page cache. The kernel uses this memory to cache frequently accessed files, which can improve system performance.
Available Memory (Mem)
This represents the amount of memory that is available for starting new applications or for when existing applications require more memory. It takes into account the free memory, as well as the memory used for buffers and cache, which can be reclaimed if needed.
Swap Total
This shows the total amount of swap space available on your system. Swap space is used by the kernel to temporarily store pages of memory that are not currently being used, freeing up physical RAM for other purposes.
Swap Used
This indicates the amount of swap space that is currently being used.
Swap Free
This represents the amount of swap space that is currently unused and available for use.By understanding the different memory types and their meanings, you can better interpret the output of the free command and gain insights into the memory usage on your Linux system.

Thursday, August 29, 2024

Replace all text except email address in notepad++

Removing All Text Except Email Addresses in Notepad++

To remove all text except for email addresses in Notepad++, you can use the Find and Replace feature with a regular expression. Here’s how to do it:

1. Open Notepad++ and load your file containing the names and email addresses.

2. Open the Find Dialog:

   __Press "Ctrl + H" to open the Replace tab.

3. Set Up the Regular Expression:

   __In the Find what field, enter the following regex pattern:

     ________________________________

     ^.*?<(.*?)>.*$

     ________________________________

 

   __In the Replace with field, enter:

     ________________________________

     \1

     ________________________________

4. Configure the Search Mode:

   __Make sure to select Regular expression at the bottom of the dialog.

5. Execute the Replacement:

   __Click on Replace All.


 Explanation of the Regex

__"^.*?": Matches any text at the beginning of the line up to the first "<".

__"<(.*?)>": Captures the text (email address) inside the angle brackets.

__".*$": Matches any text after the closing ">" until the end of the line.

__"\1": Refers to the first captured group, which is the email address.


Friday, August 23, 2024

retrieves a list of all listening TCP and UDP connections along with their associated processes, extracts the PIDs of these processes, and for each PID, it prints the PID and the command line arguments used to start the process.

---------------

for i in `sudo netstat -tulpn | awk '{print $7}' | cut -d/ -f1`; do echo "------ $i -------"; ps -p $i -o args=; done

---------------

----> Detailed Explanation

1. sudo netstat -tulpn:

   - sudo: This command is run with superuser privileges, which is necessary to view all network connections and the processes associated with them.

   - netstat: A command-line tool that displays network connections, routing tables, interface statistics, and more.

   - -tulpn: These options specify what information to display:

     - -t: Show TCP connections.

     - -u: Show UDP connections.

     - -l: Show only listening sockets.

     - -p: Show the process ID (PID) and name of the program to which each socket belongs.

     - -n: Show numerical addresses instead of resolving hostnames.

   This command lists all active TCP and UDP connections along with the associated processes.

2. | awk '{print $7}':

   - The output of `netstat` is piped (`|`) into `awk`, a text processing tool.

   - '{print $7}': This command extracts the seventh column from the `netstat` output, which contains the PID and program name in the format `PID/ProgramName`.

3. | cut -d/ -f1:

   - The output from `awk` is further piped into `cut`, which is used to split the string.

   - -d/: Specifies the delimiter as `/`.

   - -f1: Extracts the first field, which is the PID of the process (the part before the `/`).

4. for i in ...; do ...; done:

   - This is a `for` loop that iterates over each PID extracted from the previous commands.

   - $i: Represents the current PID in each iteration of the loop.

5. echo "------ $i -------":

   - This command prints a separator line with the current PID, making the output more readable.

6. ps -p $i -o args=:

   - ps: A command that reports a snapshot of current processes.

   - -p $i: Specifies to show information for the process with the PID stored in `$i`.

   - -o args=: Customizes the output to show only the command line arguments of the process, omitting the header.

----> Summary of Functionality

This command effectively does the following:

- Retrieves a list of all listening TCP and UDP connections along with their associated processes.

- Extracts the PIDs of these processes from the output of `netstat`.

- For each PID**, it prints the PID and the command line arguments used to start the process.

----> Example Output Interpretation

When you run this command, the output might look something like this:

---------------

------ 1234 -------

/usr/bin/python3 /path/to/script.py

------ 5678 -------

/usr/sbin/nginx -g daemon off;

---------------

In this example:

- The first line indicates that the process with PID `1234` is running a Python script.

- The second line shows that the process with PID `5678` is an instance of Nginx.

----> Conclusion

This command is useful for system administrators or users who want to monitor which processes are listening on network ports and what commands were used to start those processes. It combines several powerful command-line tools to provide a comprehensive view of network activity on the system

Thursday, August 22, 2024

How see complete path of a process running on specific port in linux

To find the complete path of a process that is using a specific port in Linux, you can follow these steps:

Step 1: Find the PID of the Process

1. Using `lsof` Command**:

   - Open a terminal and run the following command (replace `PORT_NUMBER` with the actual port number):

     --------------------------------------------------------------------

     sudo lsof -i :PORT_NUMBER

     --------------------------------------------------------------------

   - This command will list all processes using the specified port, along with their PIDs.

2. Using `netstat` Command**:

   - Alternatively, you can use the `netstat` command:

     --------------------------------------------------------------------

     sudo netstat -tulpn | grep :PORT_NUMBER

     --------------------------------------------------------------------

   - This will show you the PID and the program name associated with the port.

Step 2: Get the Complete Path of the Process

Once you have the PID from the previous step, you can find the complete path of the process:

1. Using `ps` Command**:

   - Run the following command (replace `YOUR_PID` with the PID you obtained):

     --------------------------------------------------------------------

     ps -p YOUR_PID -o args=

     --------------------------------------------------------------------

   - This command will display the command line that started the process, including the complete path.

2. Using `/proc` Filesystem**:

   - You can also check the `/proc` filesystem for more details:

     --------------------------------------------------------------------

     ls -l /proc/YOUR_PID/exe

     --------------------------------------------------------------------

   - This will show you a symbolic link to the executable of the process, revealing its complete path.


Monday, August 5, 2024

Components of #Kafka

Apache Kafka is a powerful distributed messaging system designed for handling real-time data streams. Its architecture consists of several key components that work together to facilitate data production, storage, and consumption. Here’s a breakdown of the main components:

  1. Kafka Broker:
    • broker is a server that stores messages and serves client requests. Kafka can have multiple brokers in a cluster, allowing it to handle large volumes of data and provide fault tolerance. Each broker manages a portion of the data and can communicate with other brokers to ensure data availability and reliability.
  2. Kafka Producer:
    • The producer is an application that sends data (messages) to Kafka topics. Producers can publish messages to one or more topics, and they are responsible for deciding which topic to send the data to. They can also choose to send messages to specific partitions within a topic for better load balancing.
  3. Kafka Consumer:
    • The consumer is an application that reads messages from Kafka topics. Consumers subscribe to one or more topics and process the incoming data. They can operate individually or as part of a consumer group, where multiple consumers work together to read data from the same topic, allowing for parallel processing.
  4. Kafka Topic:
    • topic is a category or feed name to which messages are published. Each topic can have multiple partitions, which are segments of the topic that allow for parallel processing and scalability. Messages within a partition are ordered, and each message has a unique identifier called an offset.
  5. Partition:
    • Each topic is divided into partitions to enable scalability and parallelism. Partitions allow Kafka to distribute data across multiple brokers, improving performance and fault tolerance. Each partition is an ordered log of messages.
  6. Zookeeper:
    • Zookeeper is an external service used by Kafka to manage and coordinate the brokers in a cluster. It helps with leader election for partitions, configuration management, and maintaining metadata about the Kafka cluster. While Kafka can function without Zookeeper in some configurations, it is traditionally used for managing cluster state.
  7. Kafka Connect:
    • Kafka Connect is a tool for integrating Kafka with other systems. It allows for the easy import and export of data between Kafka and external data sources or sinks, such as databases, key-value stores, and file systems.
  8. Kafka Streams:
    • Kafka Streams is a client library for building applications and microservices that process and analyze data stored in Kafka. It allows developers to create real-time processing applications that can transform and aggregate data as it flows through Kafka.

Thursday, August 1, 2024

What is #CDC #Ingestion Load?

Change Data Capture (CDC) ingestion is a method used to track and capture changes made to data in a database. Once these changes are identified, they are sent to another system, like a data warehouse or data lake. This process helps keep data up-to-date across different platforms, making it easier to analyze information in real time.

Key Features of CDC Ingestion

  1. Real-Time Data Movement: CDC allows data to be updated almost instantly. This is important for applications that need the latest information without waiting for scheduled updates.
  2. Efficient Data Synchronization: CDC continuously checks for changes in the source database and quickly updates the target systems. This means less strain on the original database and less traffic on the network.
  3. Works with Different Databases: CDC can be used with various types of databases, including popular ones like SQL Server and Oracle, as well as other systems that handle transactions.
  4. Log-Based Tracking: Many CDC systems use transaction logs to monitor changes. This method captures not just the current data but also its history, giving a complete picture of how data has changed over time.
  5. Integration with ETL Tools: CDC often works alongside ETL (Extract, Transform, Load) processes, which help move data from one place to another without causing too much disruption.

Benefits of CDC Ingestion

  • Better Analytics: By keeping data current, CDC helps organizations make informed decisions based on the latest information.
  • Less Delay: Unlike older methods that might take time to sync data, CDC provides updates almost immediately, making data more useful.
  • Scalability: CDC can grow with the organization, handling more data as needed without losing performance.

In summary, CDC ingestion is an effective way to manage changes in data, allowing organizations to use their data for timely insights and better decision-making.

Friday, May 17, 2024

list of free science and technology journals available online:

 

  1. PLOS - Website
  2. eScholarships - Website
  3. Directory of Open Access Journals (DOAJ) - Website
  4. International Journal for Modern Trends in Science and Technology (IJMTST) - Website
  5. AAPS PharmSci - Website
  6. Science and Technology of Advanced Materials (STAM) - Website
  7. PubMed - Website
  8. Sci-Journal - Website
  9. OMICS International - Website
  10. BioMed Central - Website



#PLOS, #eScholarships, #Directory of Open Access Journals (DOAJ), #International Journal for Modern Trends in Science and Technology (IJMTST), #AAPS PharmSci, #Science and Technology of Advanced Materials (STAM), #PubMed, #Sci-Journal, #OMICS International, #BioMed Central,

List of the top 20 #technology #websites that publish the latest #news, #papers, #journals, and #insights on #current and future #technology:

 

  1. Vox - Website
  2. InfoWorld - Website
  3. Wired - Website
  4. Ars Technica - Website
  5. Data Center Knowledge - Website
  6. The New York Times - Website
  7. TechCrunch - Website
  8. The Verge - Website
  9. MIT Technology Review - Website
  10. CNET - Website
  11. Popular Mechanics - Website
  12. TechRadar - Website
  13. Gigaom - Website
  14. The Next Web - Website
  15. VentureBeat - Website
  16. ZDNet - Website
  17. TechRepublic - Website
  18. Engadget - Website
  19. Mashable - Website
  20. Gizmodo - Website

#Vox, #InfoWorld, #Wired, #Ars Technica, #Data Center Knowledge, #The New York Times, #TechCrunch, #The Verge, #MIT Technology Review, #CNET, #Popular Mechanics, #TechRadar, #Gigaom, #The Next Web, #VentureBeat, #ZDNet, #TechRepublic, #Engadget, #Mashable, #Gizmodo

Thursday, May 16, 2024

No /mnt/hgfs in Ubuntu guest under VMWare Fusion

Title: VMware Shared Folder Not Appearing in Ubuntu Guest OS

Description:

I'm having trouble accessing a shared folder from my Windows host machine on my Ubuntu guest OS running in VMware. I've confirmed the following:

  • VMware Tools are installed correctly on the Ubuntu guest.
  • Shared folders are enabled in the VMware settings (VM -> Settings -> Options -> Shared Folders).
  • The desired folder on the Windows host is properly configured for sharing.

Despite this, the shared folder (/mnt/hgfs by default) is not appearing in the Ubuntu guest.

Possible Causes:

  • Missing hgfs mount: The Ubuntu guest might not be automatically mounting the shared folder.
  • Incorrect mount options: The shared folder might require specific options for mounting (e.g., allow_other).
  • Firewall restrictions: Firewalls on either the host or guest OS could be blocking access.

Question:

Can anyone advise on what other troubleshooting steps I can take to identify and resolve the issue of the shared folder not appearing in the Ubuntu guest OS?

Additional Information:

  • Ubuntu version (e.g., 20.04 LTS)
  • VMware Workstation/Player version
  • Any error messages encountered

By including this information, your search will be more likely to find relevant solutions online. People searching for similar issues will also find your question more helpful.


Solution: Run following Command

sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other





#VMwareSharedFolders,
#UbuntuGuestOS,
#WindowsHost,
#hgfsMount,
#VMwareTroubleshooting,
#UbuntuFileSharing,
#WindowsFileSharing,
#VMwareCommunity,
#LinuxGuestOS,
#VirtualMachineSharing

Featured Posts

Different #memories in #free #command in #linux

The   free   command in Linux is a powerful tool for monitoring memory usage on your system. It provides information about various types of ...