Last active
August 29, 2015 13:57
-
-
Save r-sal/9360213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| # | |
| # Rick Salaverria | |
| # 2014-03-04 | |
| # | |
| # Inline CSS styles | |
| style=" style=\"border:1px solid;background:#EEE;padding:10px;margin:5px 10px\"" | |
| # Date | |
| d=`date` | |
| # Network information | |
| tcp=`netstat -tn | wc -l` | |
| netInterfaces=`netstat --interfaces` | |
| # Processes information | |
| numPs=`ps -e | wc -l` | |
| tree=`pstree` | |
| # Create HTML markup | |
| html="<h1>System Report</h1>" | |
| html="$html $d<br><hr><br><br>" | |
| html="$html <h2>Networking</h2>" | |
| html="$html <b>TCP Connections</b>: $tcp<br>" | |
| html="$html <b>Network Interfaces:</b><br>" | |
| html="$html <pre$style>$netInterfaces</pre>" | |
| html="$html <h2>Processes</h2>" | |
| html="$html <b>Num. Processes</b>: $numPs<br>" | |
| html="$html <b>Process Tree:</b><br>" | |
| html="$html <pre$style>$tree</pre>" | |
| echo "$html" > report.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>System Report</h1> Tue Mar 4 21:24:05 EST 2014<br><hr><br><br> <h2>Networking</h2> <b>TCP Connections</b>: 5<br> <b>Network Interfaces:</b><br> <pre style="border:1px solid;background:#EEE;padding:10px;margin:5px 10px">Kernel Interface table | |
| Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg | |
| eth1 1500 0 5450 0 0 0 2689 0 0 0 BMRU | |
| lo 16436 0 8 0 0 0 8 0 0 0 LRU</pre> <h2>Processes</h2> <b>Num. Processes</b>: 148<br> <b>Process Tree:</b><br> <pre style="border:1px solid;background:#EEE;padding:10px;margin:5px 10px">init-+-NetworkManager-+-dhclient | |
| | `-{NetworkManager} | |
| |-abrtd | |
| |-acpid | |
| |-anacron | |
| |-atd | |
| |-auditd-+-audispd-+-sedispatch | |
| | | `-{audispd} | |
| | `-{auditd} | |
| |-avahi-daemon---avahi-daemon | |
| |-bonobo-activati---{bonobo-activat} | |
| |-clock-applet | |
| |-console-kit-dae---63*[{console-kit-da}] | |
| |-crond | |
| |-cupsd | |
| |-2*[dbus-daemon---{dbus-daemon}] | |
| |-2*[dbus-launch] | |
| |-gconf-im-settin | |
| |-gconfd-2 | |
| |-gdm-binary-+-gdm-simple-slav-+-Xorg | |
| | | |-gdm-session-wor-+-gnome-session-+-abrt-applet | |
| | | | | |-bluetooth-apple | |
| | | | | |-deja-dup-monito | |
| | | | | |-evolution-alarm | |
| | | | | |-gdu-notificatio | |
| | | | | |-gnome-panel | |
| | | | | |-gnome-power-man | |
| | | | | |-gnome-volume-co | |
| | | | | |-gpk-update-icon | |
| | | | | |-metacity---{metacity} | |
| | | | | |-nautilus---{nautilus} | |
| | | | | |-nm-applet | |
| | | | | |-polkit-gnome-au | |
| | | | | |-python | |
| | | | | |-restorecond | |
| | | | | |-seapplet | |
| | | | | `-{gnome-session} | |
| | | | `-{gdm-session-wo} | |
| | | `-{gdm-simple-sla} | |
| | `-{gdm-binary} | |
| |-gdm-user-switch | |
| |-gedit---{gedit} | |
| |-gnome-keyring-d---2*[{gnome-keyring-}] | |
| |-gnome-screensav | |
| |-gnome-settings- | |
| |-gnome-terminal-+-bash---script---script---bash---bash---pstree | |
| | |-gnome-pty-helpe | |
| | `-{gnome-terminal} | |
| |-gnote | |
| |-gvfs-afc-volume---{gvfs-afc-volum} | |
| |-gvfs-fuse-daemo---3*[{gvfs-fuse-daem}] | |
| |-gvfs-gdu-volume | |
| |-gvfs-gphoto2-vo | |
| |-gvfsd | |
| |-gvfsd-burn | |
| |-gvfsd-metadata | |
| |-gvfsd-trash | |
| |-hald-+-hald-runner-+-hald-addon-acpi | |
| | | `-hald-addon-inpu | |
| | `-{hald} | |
| |-im-settings-dae | |
| |-mdadm | |
| |-5*[mingetty] | |
| |-modem-manager | |
| |-notification-ar | |
| |-notification-da | |
| |-ntpd | |
| |-packagekitd | |
| |-plymouth-log-vi | |
| |-polkit-gnome-au | |
| |-polkitd | |
| |-pulseaudio-+-gconf-helper | |
| | `-2*[{pulseaudio}] | |
| |-rsyslogd---2*[{rsyslogd}] | |
| |-rtkit-daemon---2*[{rtkit-daemon}] | |
| |-run-mozilla.sh---firefox---10*[{firefox}] | |
| |-2*[sendmail] | |
| |-system-setup-ke | |
| |-trashapplet | |
| |-udevd---2*[udevd] | |
| |-udisks-daemon-+-udisks-daemon | |
| | `-{udisks-daemon} | |
| |-upowerd | |
| |-wnck-applet | |
| `-wpa_supplicant</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment