Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.64 KB

File metadata and controls

59 lines (38 loc) · 1.64 KB

CPU Information Emailer Script

Overview

This shell script is designed to send daily emails containing CPU information to a specified user. It fetches the CPU details and sends them via email using the mail command.

Prerequisites

Usage

  1. Clone the repository:

    git clone https://github.com/maulik4107/CPU-Info-Sender.git
    cd cpu-info-emailer
  2. Configure the script:

    Open the CpuInfo.sh script and update the following variables:

    • uuencode CPUinfo.txt CPUinfo.txt | mail -s "Subject" -r
    • (Optional) Adjust any other settings or customize the email content as needed.
  3. Schedule the script:

    Use crontab -e to open the cron table and add the following line to schedule the script to run daily at a specific time (e.g., 8:00 AM):

    0 8 * * * /path/to/CpuInfo.sh

    Save and exit. You can refer this video for setting the timing in cron tab : https://youtu.be/wtLx8KqASEs?si=8Xgw1Lz7_xrlX7BV

  4. Save and run the script:

    chmod +x CpuInfo.sh
    ./CpuInfo.sh

Example Email Content

The email will contain information such as:

  • Current CPU usage
  • Number of CPU cores
  • CPU temperature (if applicable)

Feel free to customize the script to include additional information or modify the email content based on your needs.

License

This script is licensed under the MIT License.