Skip to content

Instantly share code, notes, and snippets.

@isurum
Created June 16, 2017 09:56
Show Gist options
  • Save isurum/51f63e308f4e18998b09d10d27660305 to your computer and use it in GitHub Desktop.
Save isurum/51f63e308f4e18998b09d10d27660305 to your computer and use it in GitHub Desktop.
A System Information Gathering Script Using Python
#!/usr/bin/env python
#A System Information Gathering Script
import subprocess
#Command 1
uname = “uname”
uname_arg = “-a”
print "Gathering system information with %s command:\n" % uname
subprocess.call([uname, uname_arg])
#Command 2
diskspace = "df"
diskspace_arg = "-h"
print "Gathering diskspace information %s command:\n" % diskspace
subprocess.call([diskspace, diskspace_arg])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment