Socket
Socket
Sign inDemoInstall

raspberrypi-sys-info

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raspberrypi-sys-info

A Node.js library to retrieve system information (temperature, memory usage, disk activity, etc.) from a Raspberry Pi. This library wraps system calls in Node.js using Typescript for easy access to Raspberry Pi's hardware stats


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Raspberry PI System Info

This project is an npm library for extracting various metrics from Raspberry Pi.

Table of Contents

  • Installation
  • Usage
  • Functions
  • Contributing
  • License

Installation

To use this library in your project, you need to install it via npm. Make sure you have Node.js and npm installed.

npm i raspberrypi-sys-info

Usage

Below is an example of how to use the library to fetch and display various metrics from a Raspberry Pi.

Example Code

import { getCpuTemperature, getGpuTemperature } from 'raspberrypi-sys-info';

async function displaySystemInfo() {
    try {
        const cpuTemp = await getCpuTemperature();
        console.log(`CPU Temperature: ${cpuTemp}°C`);

        const gpuTemp = await getGpuTemperature();
        console.log(`GPU Temperature: ${gpuTemp}°C`);

    } catch (error) {
        console.error(error.message);
    }
}

displaySystemInfo();

Functions

getCPUTemperature()

Returns the CPU temperature in degrees Celsius.

getGpuTemperature()

Returns the GPU temperature in degrees Celsius.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 15 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc