random musings from a twisted mind
SMF
Solaris 10 is definitely getting there, had to play around with smf a little to understand it, reminds me of a smarter version of ”’service”’ under redhat linux.
So, here’s some XML and method files to start tomcat and apache (with apache only starting if tomcat is running):-
Following XML manifest files should be dropped into /var/svc/manifest/site/, the method files should be dropped into /lib/svc/method/.
* Apache 2 – Manifest
* Tomcat – Manifest
* Apache 2 – Method
* Tomcat – Method
They define the location of the method files (basically old RC style scripts) plus any dependancies. Once written, the XML files need to be validated and then imported to
the SMF system:
# cd /var/svc/manifest
# svccfg -v validate network/apache2.xml
# svccfg -v import network/apache2.xml
# svccfg -v validate site/tomcat.xml
# svccfg -v import site/tomcat.xml
Then, we set them to enabled using ‘svcadm’:
# svcadm enable tomcat
# svcadm enable apache2
O’Reilly have a nice long tutorial on how the manifest files work etc.
No comments yet.
No trackbacks yet.
interesting benefits of solaris
about 1 year ago - 1 comment
well this is slightly surprising, but in a very good way, and does lead to some interesting suggestions on how to best to improve matters, but look at the following graph of FAST ESP query latency: Notice that the average latency drops as we use the server more . . . but WHY? Well that’s
playing with tcptrace and xplot
about 1 year ago - No comments
# tcpdump -ni en0 port 80 -w output.trace # tcptrace -G output.trace # xplot *tput.xpl From the online manpage: Yellow: instantaneous packets Red: Throughput for the last few packets Blue: Throughput since the start of the stream/connection Other useful graphs: _owin.xpl – outstanding data/congestion _rtt.xpl – round trip time/time _ssize.xpl – segment size/time _tput.xpl –
argh, SNMP can really chafe!
about 1 year ago - No comments
Using version 1: % snmpget -c COMMSTRING -M /usr/local/share/snmp/mibs -v 1 -m USAGE-MIB:PROXY-MIB:REDLINE-STATS-MIB:REDLINE-STATS-MIB:REDLINE-CONFIG-M IB hostname REDLINE-STATS-MIB::sessActive.0 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: REDLINE-STATS-MIB::sessActive.0 Using version 2 (2c): % snmpget -c COMMSTRING -M /usr/local/share/snmp/mibs -v 2c -m USAGE-MIB:PROXY-MIB:REDLINE-STATS-MIB:REDLINE-STATS-MIB:REDLINE-CONFIG-M IB hostname REDLINE-STATS-MIB::sessActive.0 REDLINE-STATS-MIB::sessActive.0 = Counter64: 12247 Slightly
solaris zone utilisation via SNMP
about 1 year ago - No comments
It’s been a bug-bear for a long time for me that the CPU metrics when querying a Solaris 10 host are global and not zone specific (which of course makes sense, just makes it harder to track zone utilisation). So finally wrote a basic perl script that will provide that information via a SNMP mib,
scaling web apps
about 2 years ago - No comments
A little video, thin on detail of course, but hints at some home truths on building/designing scale-able applications (and i’d go so far to say that they are applicable to ALL applications not just webapps)
http://joyent.vo.llnwd.net/o25/videos/LinkedIn-Bumpersticker-LED-Scaling-Rails.m4v
Of course, I know Ben Rockwood like’s his solaris and F5′s – but that’s not going to surprise many (and I just LOVE f5s)
And here’s a blog entry with the details on /how/ that’s done:-
http://www.joyeur.com/2008/04/18/the-wonders-of-fbref-and-irules-serving-pages-from-facebooks-cache
. . . basically as simple as:-
when HTTP_REQUEST {
if { [HTTP::uri] contains "/popular_something/list"} {
HTTP::respond 200 content "<fb:ref handle='[HTTP::uri]'/>"
} else {
pool facebook.application_server_pool
}
}
recent applications window
about 2 years ago - No comments
This little snippet will give you a new little window for all those recent applications you launch – I seem to have picked up a habit for closing applications down when I stop working with them for an hour or two (pages etc.)
defaults write com.apple.dock persistent-others -array-add \
'{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'
killall Dock
rss browsing on macos
about 2 years ago - No comments
Hmm, so far in the last month or so I’ve been slowly running into issues with Mail.App just deciding not to download/refresh RSS feeds until I explicitly tell it to (which is annoying to say the least). So first had a play with Endo which is pretty good – apart from the annoyance that I have enough busy RSS feeds (blogs.sun.com and java.sun.com for instance) that the only real way to keep on top is to use Apple + 9 to only show unread posts.
The does have the little drawback that I then lose sight of the ones I’ve tagged – and it is a global option across all groups – yuck. So having just exported my feed list into OPML and then imported into NetNewsWire and it just worked (also looks a lot more like a mail client which i prefer)
Will have to see how it goes . . .
the leopard has it’s cafine!
about 2 years ago - No comments
Hopefully I wont get into trouble from apple for even mentioning that they posted a new preview for java 6 on http://developer.apple.com/ on 18th Dec 2007
I’ll have to install and see how well it runs!
Memcached in Solaris
about 2 years ago - No comments
Oh, so OpenSolaris is going to come with memcached pre-configured/installed – which is pretty nice; now just for the integration into other things . . .
helping hands with puppets
about 3 years ago - No comments
Will have to have a good look at [http://puppet.reductivelabs.com/ puppet], looks like a re-invention of cfengine, just using ruby instead (which is a good thing). Some of the recipes look really useful, though might have to write a few for solaris zfs/zones etc.
Just a big shame that the trac pages look so very broken within the theme (does kind of put you off)