{"id":26477477,"url":"https://github.com/thekugelblitz/wits","last_synced_at":"2025-10-28T07:37:18.260Z","repository":{"id":283352486,"uuid":"852444589","full_name":"thekugelblitz/wits","owner":"thekugelblitz","description":"What is this server? into small all-weather Server \u0026 Hardware Information Extractor Script ;)","archived":false,"fork":false,"pushed_at":"2025-03-19T19:23:28.000Z","size":61,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-04T10:59:19.668Z","etag":null,"topics":["bare-metal","basic-programming","dedicated-server","gameserver","hardware-checkout","hardwarecheck","hosting","hostingspell","linux","linux-hardware","linux-info","linuxshell","server","server-hardware","serverchecker","shell","shell-script","shellscript","virtual-machine","webhosting"],"latest_commit_sha":null,"homepage":"http://hostingspell.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thekugelblitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-04T20:18:24.000Z","updated_at":"2025-03-19T19:23:31.000Z","dependencies_parsed_at":"2025-03-21T03:45:12.440Z","dependency_job_id":null,"html_url":"https://github.com/thekugelblitz/wits","commit_stats":null,"previous_names":["thekugelblitz/wits"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thekugelblitz/wits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekugelblitz%2Fwits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekugelblitz%2Fwits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekugelblitz%2Fwits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekugelblitz%2Fwits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thekugelblitz","download_url":"https://codeload.github.com/thekugelblitz/wits/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekugelblitz%2Fwits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281403401,"owners_count":26495042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bare-metal","basic-programming","dedicated-server","gameserver","hardware-checkout","hardwarecheck","hosting","hostingspell","linux","linux-hardware","linux-info","linuxshell","server","server-hardware","serverchecker","shell","shell-script","shellscript","virtual-machine","webhosting"],"created_at":"2025-03-20T00:47:09.361Z","updated_at":"2025-10-28T07:37:18.243Z","avatar_url":"https://github.com/thekugelblitz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n---\n\n# wits v2 (What Is This Server?)\n\nWhy this thing exists? As a sysadmin, there are times when we receive a new server from a data centre or ship a server for colocation. Once the server is prepared, we want to check if everything is as expected in terms of specifications. Going through packages and software to get hardware details is fun, but it can be time-consuming and sometimes painful. That's why I created this shell script!\n\n**wits v2** is a comprehensive Bash script designed to gather detailed hardware and system information from Linux servers. It provides essential insights into the server's CPU, RAM, storage, RAID configuration, network interfaces, public IP addresses, operating system details, and more. This script is particularly useful for system administrators and IT professionals who need a quick overview of the server's specifications and health status.\n\n## Super Features: Package Manager Compatibility\n\nDifferent Linux distributions use different package managers. For example:\n\n- **Debian-based (Ubuntu, Debian):** `apt-get`\n- **Red Hat-based (CentOS, RHEL, Fedora):** `yum` or `dnf`\n- **SUSE-based (openSUSE, SLES):** `zypper`\n\nTo make script more versatile, I considered adding checks for the available package manager and adjust the package installation commands accordingly. This will allow the script to run on a wider range of Linux distributions without manual modifications.\n\n## Command Compatibility\n\nEnsure all commands used in the script (like `dmidecode`, `lshw`, `smartctl`, etc.) are installed or available across different distributions. Some commands may have different names or might not be installed by default. To address this:\n\n- Include checks in your script to verify the presence of required commands.\n- Provide instructions for installing these commands if they are missing.\n- Consider adding conditional logic to handle different command names or paths that might vary by distribution.\n\n\n## Detailed Features\n\n- **CPU Information**: Displays details about CPU threads, cores, sockets, model name, and clock speeds.\n- **RAM Information**: Provides information about installed memory, including size, type, speed, manufacturer, and voltage.\n- **Storage Drives Information**: Lists all storage drives and their configurations.\n- **RAID Information**: Checks for RAID configurations and details.\n- **Network Card Information**: Retrieves information about installed network interfaces.\n- **Public IP Addresses**: Displays the server's public IP addresses.\n- **OS and Kernel Information**: Shows details about the operating system and kernel version.\n- **Disk Health Status**: Performs a SMART health check on all disks.\n- **Power Supply and Motherboard Information**: Displays information about the motherboard and power supply.\n- **Network Configuration**: Provides details about the default gateway and DNS servers.\n- **Routing Table**: Shows the current kernel IP routing table.\n- **Automatic Package Management**: Checks for necessary packages and installs them if missing.\n\n## Requirements: Linux Distro :)\n\nThe script will automatically check for these packages and prompt the user to install any missing ones on the user's behalf. (As I said, it's painless)\n\n- `redhat-lsb-core`\n- `smartmontools`\n- `dmidecode`\n- `lshw`\n\n\n## Usage \u0026 Guidelines:\n\n- It is highly recommended to run this on a new/fresh server rather than a server running in production. I created and tested the script on the cPanel/WHM server based on CloudLinux OS 8 with active test websites running in the background. Though I recommend running it a little carefully.\n- This script uses lots of small commands via many packages, overtime these all will start to stop running effectively. So consider updating the script manually or using AI like ChatGPT. I created v1 back in the college in 2018. Version 2 was needed for the same reason, I used copilot and some part of ChatGPT 4o to make it awesome again! \n\n### Clone the Repository to RUN!\n\nTo get started, clone the repository to your local machine:\n\n```bash\nwget https://raw.githubusercontent.com/thekugelblitz/wits/main/witsV2.sh\nchmod +x witsV2.sh\n./witsV2.sh\n```\n\n### Script Output\n\nThe script outputs detailed system information to the console and also logs the information in two files:\n\n1. **Summary File**: `server_info_\u003ctimestamp\u003e.txt` - Contains a summary of the server's hardware and system information.\n2. **Raw Log File**: `wits_execution_\u003ctimestamp\u003e-raw-output.log` - Contains raw command outputs for detailed logs and troubleshooting.\n\nThe `\u003ctimestamp\u003e` is generated based on the date and time when the script is run, ensuring unique filenames for each execution.\n\n### Removing Installed Packages\n\nAt the end of the script execution, you will be prompted whether to remove the packages installed by the script. This helps keep your system clean if those packages are not needed anymore:\n\n```bash\nWould you like to remove the installed packages? (Y/N): n\n```\n\nType `Y` to remove or `N` to keep the packages.\n\n---\n\n## Example Output\n\nBelow is a full example output of the `wits v2` script. The serial numbers have been masked for privacy.\n\n```plaintext\nCPU Information\n------------------------------------\nThread(s) per core:  2\nCore(s) per socket:  16\nSocket(s):           1\nModel name:          AMD EPYC 7282 16-Core Processor\nBIOS Model name:     AMD EPYC 7282 16-Core Processor\nCPU MHz:             3195.016\nCPU max MHz:         2800.0000\nCPU min MHz:         1500.0000\n\nRAM Information\n------------------------------------\nSize: 64 GB\nLocator: DIMM_P0_A1\nBank Locator: BANK\nType: DDR4\nSpeed: 3200 MT/s\nManufacturer: Micron Technology\nSerial Number: XXX\nPart Number: 36ASF8G72PZ-3G2E1\nConfigured Memory Speed: Unknown\nVoltage: Unknown\n\nSize: 64 GB\nLocator: DIMM_P0_B1\nBank Locator: BANK\nType: DDR4\nSpeed: 3200 MT/s\nManufacturer: Micron Technology\nSerial Number: XXX\nPart Number: 36ASF8G72PZ-3G2E1\nConfigured Memory Speed: 3200 MT/s\nVoltage: 1.2 V\n\nStorage Drives Information\n------------------------------------\nNAME                 SIZE TYPE  MODEL\nsda                447.1G disk  INTEL SSDSC2BB48\n├─sda1               501M part\n│ └─md127            500M raid1\n└─sda2             446.7G part\n  └─md126          446.5G raid1\n    └─Storage-root 446.5G lvm\nsdb                447.1G disk  INTEL SSDSC2BB48\n├─sdb1               501M part\n│ └─md127            500M raid1\n└─sdb2             446.7G part\n  └─md126          446.5G raid1\n    └─Storage-root 446.5G lvm\nnvme0n1              5.8T disk  WUS4CB064XXXP3E3\nnvme1n1              5.8T disk  WUS4CB064XXXP3E3\n└─nvme1n1p1          5.8T part\n  └─md2              5.8T raid1\n\nRAID Information\n------------------------------------\nARRAY /dev/md/boot metadata=1.2 name=NMNE-303:boot UUID=da9f7fc4:10ac3853:4fc1c0e0:15d54a67\nARRAY /dev/md/pv00 metadata=1.2 name=NMNE-303:pv00 UUID=9a9c1336:7839ffd3:fa3fa1a4:0fa7f580\nARRAY /dev/md/2 metadata=1.2 name=NMNE-303:2 UUID=6715722d:14b780d1:43af2ac7:499008c0\n/dev/md126:\n           Version : 1.2\n     Creation Time : Fri Jan  1 23:06:02 2021\n        Raid Level : raid1\n        Array Size : 4682XX544 (446.51 GiB 479.44 GB)\n     Used Dev Size : 4682XX544 (446.51 GiB 479.44 GB)\n      Raid Devices : 2\n     Total Devices : 2\n       Persistence : Superblock is persistent\n\n     Intent Bitmap : Internal\n\n       Update Time : Thu Sep  5 04:11:14 2024\n             State : active\n    Active Devices : 2\n   Working Devices : 2\n    Failed Devices : 0\n     Spare Devices : 0\n\nConsistency Policy : bitmap\n\n              Name : NMNE-303:pv00\n              UUID : 9a9c1XXXXX:7839fXXXX:fa3fXXXX:0fa7XXXX\n            Events : 29790\n\n    Number   Major   Minor   RaidDevice State\n       0       8        2        0      active sync   /dev/sda2\n       1       8       18        1      active sync   /dev/sdb2\n/dev/md127:\n           Version : 1.2\n     Creation Time : Fri Jan  1 23:05:57 2021\n        Raid Level : raid1\n        Array Size : 512000 (500.00 MiB 524.29 MB)\n     Used Dev Size : 512000 (500.00 MiB 524.29 MB)\n      Raid Devices : 2\n     Total Devices : 2\n       Persistence : Superblock is persistent\n\n     Intent Bitmap : Internal\n\n       Update Time : Thu Sep  5 03:42:59 2024\n             State : clean\n    Active Devices : 2\n   Working Devices : 2\n    Failed Devices : 0\n     Spare Devices : 0\n\nConsistency Policy : bitmap\n\n              Name : NMNE-303:boot\n              UUID : da9fXXXXX:10acXXXXX:4fc1XXXXX:15dXXXXX\n            Events : 203\n\n    Number   Major   Minor   RaidDevice State\n       0       8        1        0      active sync   /dev/sda1\n       1       8       17        1      active sync   /dev/sdb1\n/dev/md2:\n           Version : 1.2\n     Creation Time : Sun Jun 25 16:42:04 2023\n        Raid Level : raid1\n        Array Size : 6251091200 (5.82 TiB 6.40 TB)\n     Used Dev Size : 6251091200 (5.82 TiB 6.40 TB)\n      Raid Devices : 2\n     Total Devices : 1\n       Persistence : Superblock is persistent\n\n     Intent Bitmap : Internal\n\n       Update Time : Thu Sep  5 04:11:17 2024\n             State : clean, degraded\n    Active Devices : 1\n   Working Devices : 1\n    Failed Devices : 0\n     Spare Devices : 0\n\nConsistency Policy : bitmap\n\n              Name : NMNE-303:2\n              UUID : 671XXXXX:14b78XXXX:43aXXXX:4990XXXXX\n            Events : 26860361\n\n    Number   Major   Minor   RaidDevice State\n       -       0        0        0      removed\n       1     259        2        1      active sync   /dev/nvme1n1p1\n\nNetwork Card Information\n------------------------------------\n       product: I350 Gigabit Network Connection\n       vendor: Intel Corporation\n       serial: XXXX\n       size: 100Mbit/s\n       capacity: 1Gbit/s\n       resources: irq:123 memory:a2520000-XXXX...\n       product: I350 Gigabit Network Connection\n       vendor: Intel Corporation\n       serial: XXXX\n       size: 1Gbit/s\n       capacity: 1Gbit/s\n       resources: irq:192 memory:a2500000-XXXX...\n\nPublic IP Addresses\n------------------------------------\n104.17.110.184\n\nOS and Kernel Information\n------------------------------------\nLinux hsplshelltestServer02 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\nNAME=\"CloudLinux\"\nVERSION=\"8.10 (Vladimir Aksyonov)\"\nID=\"cloudlinux\"\nID_LIKE=\"rhel fedora centos\"\nVERSION_ID=\"8.10\"\nPLATFORM_ID=\"platform:el8\"\nPRETTY_NAME=\"CloudLinux 8.10 (Vladimir Aksyonov)\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:cloudlinux:cloudlinux:8.10:GA:server\"\nHOME_URL=\"https://www.cloudlinux.com/\"\nBUG_REPORT_URL=\"https://www.cloudlinux.com/support\"\nVARIANT_ID=\"cloudlinux\"\n\nDisk Health Status\n------------------------------------\n\nChecking health of /dev/sda\nSMART overall-health self-assessment test result: PASSED\n\nChecking health of /dev/sdb\nSMART overall-health self-assessment test result: PASSED\n\nChecking health of /dev/nvme0n1\nSMART overall-health self-assessment test result: PASSED\n\nChecking health of /dev/nvme1n1\nSMART overall-health self-assessment test result: PASSED\n\nPower Supply and Motherboard Information\n------------------------------------\n        Manufacturer: GIGABYTE\n        Product\n\n Name: MZ91-FS0-00\n\nNetwork Configuration\n------------------------------------\nDefault Gateway:\ndefault via 104.17.110.184 dev eno1\n\nDNS Servers\n------------------------------------\nNetworkManager is not running. Cannot retrieve DNS server information.\nAttempting to retrieve DNS information from /etc/resolv.conf:\n8.8.8.8\n8.8.4.4\n\nRouting Table\n------------------------------------\nKernel IP routing table\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface\n0.0.0.0         104.17.11.18    0.0.0.0         UG    0      0        0 eno1\n104.17.111.11   0.0.0.0         255.255.255.0   U     0      0        0 eno1\n104.17.11.18    0.0.0.0         255.255.0.0     U     1002   0        0 eno1\n\nSee detailed logs in wits_execution_05-09-2024--04-11-17-raw-output.log for more information.\n\nSee summary in server_info_05-09-2024--04-11-17.txt for quick server information.\n```\n\n\n## Customization\n\nYou can customize the script further based on your requirements. Feel free to modify the functions or add new sections to capture additional information specific to your use case. Use GitHub to update me on the new stuff related to this script :)\n\n## Troubleshooting\n\n- Ensure the script is run with sufficient permissions (e.g., `sudo`) to access hardware and system information.\n- If a package fails to install, you may need to install it manually using your system's package manager.\n- The script is designed for RedHat-based systems using `yum` as the package manager. It has cross-compatibility with logic but still, if you face the issue then be sure to check for Debian-based systems, and modify the package management commands accordingly (`apt-get`).\n\n## Contributing\n\nFeel free to fork the repository and submit pull requests for any improvements or additional features. Contributions are always welcome!\n\n## License\n\nThis project is licensed under the **GNU GENERAL PUBLIC LICENSE Version 3**.\n\n## Author\n\nDeveloped by **Dhruval Joshi from [HostingSpell.com](https://hostingspell.com/)**. | Personal: [TheDhruval.com](https://thedhruval.com/)\n\nUpdated here on 5th Sept 2024, 4.48 AM IST.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekugelblitz%2Fwits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthekugelblitz%2Fwits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekugelblitz%2Fwits/lists"}