SolarStatus - minimalistic Status-WebInterface for Solaris

hotzen

Limp Gawd
Joined
Jan 29, 2011
Messages
349
Hello [H]s,
I just pushed version 0.10 of SolarStatus ( https://github.com/hotzen/SolarStatus ).

SolarStatus is a Web-Interface for your Solaris Server that aggregates the output of simple shell-scripts and configured commands (e.g. S.M.A.R.T.) and displays them raw or slightly parsed (HTML-Tables).

In contrast to the great napp-it, it does not allow you to configure your server in any way, it is just a simple Web-Interface showing you CLI-output.
Administration is still to be done at the shell, as it should be :D

Everything is configured in an INI-file and dynamically loaded at runtime, so you can totally adapt it to your needs.
Feedback on any new helpful CLI-command is greatly appreciated.

Technology used:
PHP5.x, E_STRICT, no crappy code, secure
jQuery, AJAX
minimalistic, valid HTML5. Standards compliant, even renders/works in your mobile.

Download: https://github.com/hotzen/SolarStatus/tree/master/dist
Please read the install instructions at: https://github.com/hotzen/SolarStatus/tree/master/install
Please see extras for possibly required scripts (e.g. zfs-arc-summary and zfs-arc-stat): https://github.com/hotzen/SolarStatus/tree/master/extra
(if you don't want them, just go into conf.ini.php and comment-out the relevant [PROBE-xxx] sections, that's it)

Cheers
 
Last edited:
Nice. I'll check this out later. Why not use the bundled Apache web server?
 
I think Apache is not installed in my SE11 by default and it is just too much overkill for a Web-Interface visited only by you, so concurrent users is about one ;)
Lighttpd is very stable, lightweight and nice to configure and available in the repos using pkg.

However, there are no dependencies on the webserver whatsoever, so feel free to just use your apache.
 
I really like some parts of the interface hotzen. I'm working on a ZFS snapshot manager at the moment that is primarily intended for ZFS snapshot management (who woulda thought!? :D). I'm still working on the actual nuts and bolts as it were, but when I get around to actually "skinning" it, do you mind if I borrow some parts of your layout code?
 
Feel free, it's the MIT license after all ;)
Keep me posted about the Snapshot-Management, sounds useful
 
This looks interesting. Often you just want to monitor your server. How big is the install? I like small clean installs. Not huge installs putting files everywhere.
 
SolarStatus distribution-zip has about 60k in size and does not install anything. It's just a webdoc-folder. It's quite minimal.
 
SolarStatus distribution-zip has about 60k in size and does not install anything. It's just a webdoc-folder. It's quite minimal.

Bare in mind it does require you install lighttpd and php. That being said, lighttpd sure beats apache :)
 
However you can use any Webserver that supports PHP or (Fast-)CGI...
If you already have a Webserver set up, just copy SolarStatus into the doc-root ...
 
Needs ZIL, ARC, and L2ARC stats :) If you don't already have that on your plate I'll probably take a look at it this weekend.
 
*UPDATE: Integrated & released with 0.6*

nice, integrated for the next release.

download:
Code:
cd /opt
sudo wget http://www.cuddletech.com/arc_summary.pl
sudo chmod 0755 arc_summary.pl

create a new script SolarStatus/scripts/zfs_arc.sh :
Code:
# http://cuddletech.com/arc_summary/
perl /opt/arc_summary.pl
(update: no /scripts/* shipped anymore, commands are directly configured in conf.ini.php. Scripts are still supported though)

insert into SolarStatus/conf.ini.php :
Code:
[probe-zfs_arc]  [B]<- do NOT use "-" after "probe-", by convention probe-ids are separated by underscores[/B]
label  = "ZFS ARC"
class  = probe-zfs
script = zfs_arc
order  = 35

The position in the config-file does not matter. You may append or insert it after line 211("[probe-zfs_snaps]") or whatever suits you.

Now trying to interpret ARC's output ... :D
 
Last edited:
"I want ZFS ARC in a new Category 'ZFS Advanced' in the top bar, right of the existing 'ZFS'"

Change the relevant probes' class (aka category)
Separate multiple classes by space, e.g. "probe-zfs probe-zfs-adv"
Code:
[probe-zfs_arc] <- [B]do NOT use "-" after "probe-", by convention probe-ids are separated by underscores[/B]
label  = "ZFS ARC"
class  = [B]probe-zfs-adv[/B]
script = zfs_arc
order  = 35

Insert a new filter, its order 31 is after ZFS ([filter-30]), so it will be right of it.
The selector of the filter is a CSS-expression.
A probe's class "probe-zfs-adv" in CSS is ".probe-zfs-adv"
A probe's id probe-zfs_arc is "#probe-zfs_arc"
Code:
[filter-[B]31[/B]]
label    = "ZFS Advanced"
selector = ".probe-zfs-adv"

That's it.
 
Last edited:
http://www.richardelling.com/Home/scripts-and-programs-1/zilstat

For a similar ZIL status


http://www.solarisinternals.com/wiki/index.php/Arcstat

gives you a realtime status on what the arc is doing now (the arc_summary is just that - a summary of what it has been doing)


And finally, re: arc_summary and arc_stat I think the versions at
http://code.google.com/p/jhell/source/browse/base/head/scripts/zfs/arc_summary/arc_summary.pl
and
http://code.google.com/p/jhell/source/browse/base/head/scripts/zfs/arcstat/arcstat.pl
should work fine on OI/Solaris systems as well (work for sure on freebsd)

The have been updated - the arc_summary includes L2ARC as well as ARC stats for example
 
Last edited:
Thanks ChrisBenn,
zilstat requires DTrace with superuser privileges, setuid'ing the .ksh file does not work, so I dont think its possible to use :/
Code:
dtrace: failed to initialize dtrace: DTrace requires additional privileges

your zil_summary also does not work under SE11 :/
Code:
------------------------------------------------------------------------
ZFS Subsystem Report				Wed Oct 12 21:18:52 2011
------------------------------------------------------------------------

ZFS Tunable (sysctl):
								Page:  7
------------------------------------------------------------------------
 
Last edited:
Doh, didn't think about the dtrace issue.

I'll check up on the updated summary script when I get home (don't have access to a SE11 system at work).

And thanks again!
 
Okay, got home and checked what I had been running, here's the proper arcstat.pl with support for l2arc
https://github.com/mharsch/arcstat

with this as the arc_stat script

/opt/arcstat.pl -f read,hits,miss,hit%,l2read,l2hits,l2miss,l2hit%,arcsz,l2size 1 3

works like a champ plugged in to your release. I'll follow up on the arc_summary with l2 for SE11 and zilstat.
 
yeah, for zilstat to run as webservd you have to (as root)
usermod -K defaultpriv=basic,dtrace_user,dtrace_proc,dtrace_kernel webservd

which technically gives webservd full readonly kernel access. but it should work after that (well, assuming webservd is what the script runs under)
 
Released 0.6.
Redesigned data-transformation and overview-page hooks (see "transform" and "overview" directories)
Minor code-cleanup and beautifying.
Scripts-directory is now shipped empty since I removed several levels of indirection from conf.ini.php.
Commands are now issued directly from conf.ini.php, however scripts-dir is still supported.

Example of ZFS ARC-Statistics integration:
Code:
[probe-zfs_arc_stat]
label  = "ZFS ARC Stat"
class  = probe-zfs-adv
cmd    = "/opt/arcstat.pl -f read,hits,miss,hit%,l2read,l2hits,l2miss,l2hit%,arcsz,l2size 1 3"
order  = 35

Still possible though:
Code:
[probe-zfs_arc_stat]
label  = "ZFS ARC Stat"
class  = probe-zfs-adv
[B]script = "zfs_arcstat"[/B] (which will call ./scripts/zfs_arcstat.sh")
order  = 35

@ChrisBenn, still working on zil-stats. Your usermod-command works fine, thank you, however zilstat returns RC1 which is currently handled as an error.

Roadmap: lightweight graphing á la jquery-sparklines for overview-page
 
@ChrisBenn, do you have any idea why zilstat returns RC1 when executed via PHP?
I tried all sorts of absolute paths and it won't work.
However executing it via shell as webservd it works flawlessly...

Any hint appreciated
 
I just reworked the actual execution-logic and the reason for the RC 1 is that DTrace still insists on missings rights although the command is properly executed as webservd and I did the
Code:
usermod -K defaultpriv=basic,dtrace_user,dtrace_proc,dtrace_kernel webservd
and executing the zilstats with
Code:
sudo -u webservd zil-trace...
works like a charm.
So, now I am clueless...
 
Yeah, I'm stumped as well - maybe a good one to cross post to the OI mailing list...
 
Pushed Version 0.7, fixing a fatal bug in macro expansion. Shame on me.
 
Pushed 0.7.1 with very minor edits...
Biggest one being: Login is now over HTTP-GET since Lighttpd was sometimes unresponsive with POST
 
How big is the additional software packages I need to install, besides your script? PHP and the web server? I have waited until you iron out most bugs. Are there any graphs over core load, etc?
 
as of yet, there is only the overview-page which shows the current load using a html5-bar. there are no graphs over time. everything is status of the instant moment.

there is no "overhead", only dependency is php5 and a webserver. you can also use napp-it's webserver with php-support over fastcgi, that's it. all scripts/commands are configured over one ini-file, so if you don't want to use smartmon, disable/comment it out.

feedback appreciated, cheers.
 
as of yet, there is only the overview-page which shows the current load using a html5-bar. there are no graphs over time. everything is status of the instant moment.

there is no "overhead", only dependency is php5 and a webserver. you can also use napp-it's webserver with php-support over fastcgi, that's it. all scripts/commands are configured over one ini-file, so if you don't want to use smartmon, disable/comment it out.

feedback appreciated, cheers.

My feed back is that its awesome. Really nice simple and clean interface and very well executed!
 
pushed version 0.7.2 which fixes a problem with displaying the zfs-capacity on the start-/overview-page and different units were output by zfs.
 
pushed version 0.8 with new authentication, updated default config, updated TableTransformer, updated etc.
see new screenshots as well
 
Can this report CPU temps? I assume not since I've yet to find anything that will, at least for x86.
 
Did you already try IPMItool?
http://ipmitool.sourceforge.net/manpage.html

Code:
# /usr/sfw/bin/ipmitool sdr list

CPU 0 Temp       | 39 degrees C      | ok
CPU 1 Temp       | 43 degrees C      | ok
Ambient Temp0    | 32 degrees C      | ok
Ambient Temp1    | 41 degrees C      | ok
Vcc 12V          | 12.35 Volts       | ok
DDRP0 1.8V       | 1.84 Volts        | ok
DDRP1 1.8V       | 1.85 Volts        | ok
Vcc 3.3V         | 3.30 Volts        | ok
Vcc 5V           | 5.06 Volts        | ok
Vcc 3.3V STB     | 3.25 Volts        | ok
Blower Fan 0     | 4429.60 RPM       | ok
Blower Fan 1     | 4429.60 RPM       | ok
Axial Fan 0      | 10579 RPM         | ok
Axial Fan 1      | 10224 RPM         | ok
...


# /usr/sfw/bin/ipmitool sdr list | grep "Ambient Temp0" | cut -c 20-22
32
(http://www.comito-solutions.de/das-...n-sunfire-sun-solaris-10/zeit/2010/11/20.html)
 
Back
Top