Monitoring OpenSolaris from an iTouch
By Karim Berrah on Apr 22, 2010
I just acquired an Apple iTouch, and discovered an interesting application called iStat, which allows to show basic iTouch/iPhone infos, remote display iStat Menu info of a Mac, and, this is the more interesting part, do the same remote display from other OS by running an OpenSourced daemon on your favorite OS.
For Linux, BSD and Solaris, only the source code is provided. So you have to compile it by yourself with Gcc. The Gcc environment is available from the /release of /dev IPS server. I recommend to compile on the latest build (like b134). The standard procedure for Linux is documented in the README file. For OpenSolaris, this can be done in three steps.
Thanks to Mo McRoberts who helped in porting the SW to BSD/Solaris, and helped me to compile:
1) Get the compiler environment, in one single command:
pfexec pkg install SUNWgcc SUNWaconf SUNWgnu-automake-110 SUNWlibtool
2) Set some required variables for the previous packages
ACLOCAL110=aclocal-1.10 export ACLOCAL110 AUTOMAKE110=automake-1.10 export AUTOMAKE110 AUTOCONF26=autoconf export AUTOCONF26 AUTOHEADER26=autoheader export AUTOHEADER26 LIBTOOLIZE15=libtoolize export LIBTOOLIZE15
3) Configure and compile with the two commands:
How it works
After the make, you should find a binary istatd, and a configuration file istat.conf. Configuration is also done in 3 steps:
1) The binary needs the istatd user and group that can be added as following:
pfexec useradd istat; pfexec groupadd istat
2) Give access to the istat user to the /var/cache/istat directory:
pfexec chown istat:istat /var/cache/istat/
3) Edit istat.conf to set the correct NIC interface name, and change the server code which is a simple 5 digit number that has to be entered on on iPhone/iTouch as a basic check-in. Move this file to /usr/local/etc
pfexec cp istat.conf /usr/local/etc
And now, fire it up (-h for help):
pfexec ./istatd -d
You'll then be able to connect from your iTouch/iPhone if wifi is giving you connectivity to your OSOL box, by specifying its IP address. Other possible arguments for the binary can be displayed with the -h argument.
Well, basic but enough for me, like:
- system updatime
- system load
- CPU usage
- memory usage status (cached/active and free)
- Pages In and Pages Out
- Swap size
- network traffic (for inly one interface, due to client limitation on the iPhone/iTouch)
- disk usage (on Solaris 10 only, might be a bug)
It's not for production yet, it's not secured, but it gives you basic info of your OSOL box without having to connect to a desktop/laptop. It even runs on Solaris 10/x86 systems (still not for production).
Good to know
The iTouch application also provide you a ping and a traceroute function to help you debug any subnet or IP address error.
So, here is what we have (here average CPU infos on two cores):
And the same info on OpenSolaris with the Gnome "System Monitor" tool:
What next ?
Well, this is just an idea: we do have a nice Sun Storage portfolio, based on the OpenSolaris kernel, showing some nice graphics with the web based Analytics tool. I was wondering is such graphical informations, as shown on Mika's blog, can be also accessed from an iPod/iTouch/iPad, as this CRM application does on an iPad.