Code Monkey home page Code Monkey logo

maulik4107 / cpu-info-sender Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

The CPU Information Emailer is a shell script designed for Linux environments to provide daily updates on CPU information to a specified user via email. The script fetches crucial CPU details, such as current usage, the number of cores, and, if applicable, CPU temperature. It utilizes the mail command for sending emails.

License: MIT License

Shell 100.00%
cpu-emulator cpu-monitoring cpu-scheduling crontab-format crontab-syntax email-sender emailsender linux-shell shell-script smtp-server

cpu-info-sender's Introduction

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.

cpu-info-sender's People

Contributors

maulik4107 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.