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.
This script collects system information and writes it to a JSON file.
- Description: Returns the machine name.
- Parameters: None
- Returns: Machine name as a string.
- Description: Returns a list of dictionaries containing user and group information.
- Parameters: None
- Returns: List of dictionaries with keys "username" and "group".
- Description: Returns processor information.
- Parameters: None
- Returns: Dictionary containing processor information.
- Description: Returns a list of strings containing services status.
- Parameters: None
- Returns: List of strings representing services status.
- Description: Gathers system information using the above functions and writes it to
Project_2.json
. - Parameters: None
- Returns: None
This script reads the information from the JSON file generated by First.py
and prints it.
- Description: Reads
Project_2.json
and prints machine name, users and groups, processor information, and services status. - Parameters: None
- Returns: None
-
Run
First.py
to collect and store system information inProject_2.json
.python First.py
-
Run
Second.py
to read and print the collected information fromProject_2.json
.python Second.py
Note: Ensure that Project_2.json
is present before running Second.py
.
- Python 3.x
- Linux
- Windows
This project is licensed under the MIT License.