I recently came across HP Universal Discovery software but it's very complicated, requires a separate server and database and is far from complete when it comes to gathering data from the UNIX and Linux systems.
So I sat one day and thought what information about a system you need to tell that you know enough about it and that you can take responsibility for its uptime... and of course how to gather that information fast end efficiently from a running system.
After several hours I already had a prototype that gathers information about UNIX and Linux systems, without an idea for a better name I end up with gatherinfo. It's a simple script gatherinfo.sh with dependency on POSIX sh(1) and echo/cat/sed, all other commands are used to gather information from the running system. The result of the script is a report-like HTML file named gatherinfo.sh.$( hostname ).htm with outputs of the desired commands.
As the script is running it shows which command is now being processed, so you know why it may take that much time, usually its work is done in less than a minute. And yes, it does need to run as root.
And the end result looks like that one below. You can expand/collapse each command so its not several kilometers long
Of course it's far from complete after two days of messing with it, but I will add more and more useful commands.
Currently it gathers information from FreeBSD and Linux but my personal TODO contains operating systems like AIX, Solaris, HP-UX and of course other BSDs. On the other side I will also add cluster and/or HA software like FreeBSD's HAST/CARP, Linux RHCS, Oracle Clusterware, Sun Cluster, HP Serviceguard and AIX PowerHA. Also various Veritas storage and HA solutions are on my TODO list.
I have created the https://github.com/vermaden/gatherinfo repository for the development.
Feel free to submit your favorite commands
So I sat one day and thought what information about a system you need to tell that you know enough about it and that you can take responsibility for its uptime... and of course how to gather that information fast end efficiently from a running system.
After several hours I already had a prototype that gathers information about UNIX and Linux systems, without an idea for a better name I end up with gatherinfo. It's a simple script gatherinfo.sh with dependency on POSIX sh(1) and echo/cat/sed, all other commands are used to gather information from the running system. The result of the script is a report-like HTML file named gatherinfo.sh.$( hostname ).htm with outputs of the desired commands.
As the script is running it shows which command is now being processed, so you know why it may take that much time, usually its work is done in less than a minute. And yes, it does need to run as root.
Code:
# [color="Blue"]gatherinfo.sh[/color]
top -d 1
sockstat
ps ax
ps aux
ps auxwww
ps auxefw
pstree -A
pstree -A -a
lsof
cat /etc/hostid
cat /etc/freebsd-update.conf
grep enable /etc/rc.conf
kldstat
kldstat -v
jls
vmstat 1 5
(...)
And the end result looks like that one below. You can expand/collapse each command so its not several kilometers long
Of course it's far from complete after two days of messing with it, but I will add more and more useful commands.
Currently it gathers information from FreeBSD and Linux but my personal TODO contains operating systems like AIX, Solaris, HP-UX and of course other BSDs. On the other side I will also add cluster and/or HA software like FreeBSD's HAST/CARP, Linux RHCS, Oracle Clusterware, Sun Cluster, HP Serviceguard and AIX PowerHA. Also various Veritas storage and HA solutions are on my TODO list.
I have created the https://github.com/vermaden/gatherinfo repository for the development.
Feel free to submit your favorite commands
Last edited by a moderator: