Code Monkey home page Code Monkey logo

systeminfocollector's Introduction

Project: SystemInfoCollector

Overview

Project consists of two Python scripts: First.py and Second.py. These scripts are designed to gather system information, such as machine name, user and group details, processor information, and services status on both Linux and Windows operating systems. The gathered data is then stored in a JSON file named Project_2.json. The second script, Second.py, reads and prints the information from the JSON file.

Table of Contents

First.py

This script collects system information and writes it to a JSON file.

Functions

get_machine_name()

  • Description: Returns the machine name.
  • Parameters: None
  • Returns: Machine name as a string.

get_users_and_groups()

  • Description: Returns a list of dictionaries containing user and group information.
  • Parameters: None
  • Returns: List of dictionaries with keys "username" and "group".

get_processor_info()

  • Description: Returns processor information.
  • Parameters: None
  • Returns: Dictionary containing processor information.

get_services_status()

  • Description: Returns a list of strings containing services status.
  • Parameters: None
  • Returns: List of strings representing services status.

write_to_json()

  • Description: Gathers system information using the above functions and writes it to Project_2.json.
  • Parameters: None
  • Returns: None

Second.py

This script reads the information from the JSON file generated by First.py and prints it.

Functions

print_data()

  • Description: Reads Project_2.json and prints machine name, users and groups, processor information, and services status.
  • Parameters: None
  • Returns: None

Usage

  1. Run First.py to collect and store system information in Project_2.json.

    python First.py
  2. Run Second.py to read and print the collected information from Project_2.json.

    python Second.py

Note: Ensure that Project_2.json is present before running Second.py.

Dependencies

  • Python 3.x

Compatibility

  • Linux
  • Windows

License

This project is licensed under the MIT License.

systeminfocollector's People

Contributors

xaksx 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.