Skip to content

Augustwise/sysinfo-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

System Information Script

A lightweight Python script that gathers and displays comprehensive system information in a tabular format. This cross-platform tool provides essential hardware and software details about your computer without requiring external dependencies.

Features

  • Operating System Information: OS name, version, build number, and installation date
  • CPU Details: Both physical and logical core counts
  • Memory Information: Total and available RAM
  • System Uptime
  • GPU Detection: Identifies graphics cards across different vendors
  • Save system information to a timestamped text file
  • Cross-Platform Support: Works on Windows and Linux

Requirements

  • Python 3.8 or higher
  • psutil library for enhanced CPU detection accuracy

Installation

  1. Clone this repo:
git clone https://github.com/augustwise/sysinfo-py.git
cd sysinfo-py
  1. Install psutil for better CPU core detection:
pip install psutil

Usage

Run the script directly:

python script.py

The script will first ask if you want to export the system information to a text file:

Do you want to export the system information to a text file? (y/n):
  • Enter y or yes to save the information to a timestamped file (e.g., pc_info_20250819_0930.txt)
  • Enter n or no to only display the information in the terminal

The exported file includes a header with generation timestamp and the complete system information table.

Sample Output

The script will first prompt for export preference, then display:

Do you want to export the system information to a text file? (y/n): y

Gathering system information...

+------------------+---------------------------------------------+
| Property         | Value                                       |
+-================-+-===========================================-+
| Operating system | Windows 11 Professional (build 26100.4652)  |
| OS install date  | 2025-04-30 12:51:27 FLE Daylight Time       |
| System uptime    | 3 days, 12 hours, 7 minutes, 41 seconds      |
| Physical cores   | 4                                           |
| Logical cores    | 8                                           |
| GPU(s)           | AMD RadeonT RX 640, AMD Radeon(TM) Graphics |
| Total RAM        | 15.35 GB                                    |
| Free RAM         | 8504.98 MB                                  |
+------------------+---------------------------------------------+

System information exported to: C:\Projects\sysinfo-py\pc_info_20250819_0930.txt

Platform Support

Windows

  • OS version and build detection via Windows Registry
  • Install date from Registry
  • CPU core count via PowerShell and WMI
  • Memory information via Windows API
  • GPU detection via PowerShell and WMIC

Linux

  • OS information from /etc/os-release
  • Install date estimation from system directories
  • CPU core count from /proc/cpuinfo and sysfs
  • Memory information from /proc/meminfo
  • GPU detection via lspci, NVIDIA drivers, and DRM subsystem

Known Issues

Performance on Windows Systems

The application may experience slower execution times on weaker Windows PCs due to its reliance on PowerShell and Windows Management Instrumentation (WMI) for hardware detection:

  • Each PowerShell command requires spawning a new process, which can take several seconds on slower machines
  • CIM/WMI Query Performance
  • Multiple System Calls: Hardware detection involves multiple subprocess calls with 5-second timeouts each, potentially causing delays

Linux

  • Linux systems are generally faster as they use efficient /proc and /sys filesystem reads instead of WMI

Screenshots

image image image

About

A lightweight Python script that gathers and displays comprehensive system information in a tabular format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages