Package: python-sysinformer
python-SysInformerThe python-SysInformer is a system information tool that allows users to retrieve various types of information about their system. It offers functionalities to gather CPU details, memory information, disk space usage, network activity, process status, container information, and system statistics such as OS type, uptime, and hostname.Why another system information tool?Numerous system information tools, likehtop,glances, andneofetch, serve Linux systems. While they're excellent, this tool isn't meant to replace them. Instead, it simplifies retrieving both critical and occasional system details. For instance, to quickly find a host IP, instead of usingip aand potentially addinggrep, you can now utilizepsi run -n. Similarly, to check container ports, the lengthydocker pscommand can be swapped forpsi -ct.Additionally, this project is my venture to enhance my Python capabilities. While not a developer, I frequently script and automate tasks. I've been using Python for a few months now, but I've never really taken the time to learn the language. I've always just learned what I needed to get the job done. I've been wanting to change that and this project is my first attempt at doing so. I'm sure there are many things that could be done better, but I'm happy with the progress I've made and the knowledge I've gained so far.FeaturesThe following gif demonstrates some of the tool's features:Getting StartedPrerequisitesThe tool requires Python 3.11 or higher. Additionally, the tool is inteneded to be used on Linux systems only. It will work on macOS systems, but may not be able to retrieve all information. The tool is not intended to be used on Windows systems.DependenciesThe tool uses the following Python packages:distronetifacesping3psutilPyYAMLtabulateInstallationThe easiest way to install the tool is withpip:pipinstallpython-SysInformerAdditionaly, if you havepoetryinstalled you can install the tool with:gitclone[thisrepo]poetryinstall# ORpoetryaddpython-SysInformerFinally, you can install the tool from source:gitclone[thisrepo]pipinstall-rrequirements.txtUsageThe tool is intended to be used as a command line tool:Usage:psi[OPTIONS]COMMAND[ARGS]...Systeminformationtool.

Options:--helpShowthismessageandexit.

Commands:configTheconfigcommandisusedtocreateadefaultconfigfile.runTheruncommandisthemaincommandforthetool.The most basic usage to retrieve all information is:psirun-aIf you prefer to only retrieve specific information, you can use the following options:Options:-a,--allShowallinformation-s,--systemShowonlysysteminformation-c,--cpuShowonlyCPUinformation-m,--memoryShowonlymemoryinformation-d,--diskShowonlydiskinformation-n,--networkShowonlynetworkandlatencyinformation-ps,--processesShowonlyservicesinformation-ct,--containersShowonlyrunningcontainer(dockerorpodman)informationConfigurationYou can configure the tool using a YAML file. Currently, the configuration options allow you to specify services and ports to monitor for their operational status, and set targets to ping to measure latency.A default configuration file can be created using thepsi config --createcommand. By default, the configuration file is located at~/.config/psi/config.yaml. If you'd like to use a different location, simply provide the path using the--config-pathe.g.psi config --create --config-path /some/path/config.yaml. You can then pass the path to thepsi runcommand using the same option.The config file itself is fairly basic and looks like this:services:-name:FTP Serverport:21host:localhost-name:SSHport:22host:localhost-name:HTTPport:80host:localhost-name:HTTPSport:443host:localhost-name:MySQL Serverport:3306host:localhost-name:PostgreSQL Serverport:5432host:localhostping_hosts:-google.com-timothybryantjr.com-github.comNote:The tool will still run without a config file, but will not be able to check up or down status for services or ping targets for latency information.AcknowledgementsThis tool was inspired byeZ Server Monitor. Specfically, theireSMshfeature which allows users to retrieve system information from the command line via a bash script. In fact, if you want the portability of a bash script, I would recommend using eSMsh. I'm not sure if the script is still being maintained, but it is still available onGithub. But if you don't mind using Python, and want a little more information, then the python-SysInformer tool could be for you.