DTrace: count system calls for any process

May 2, 2009 · Filed Under General Solaris topics · Comment 

One more variation of using DTrace allows to track which system calls are made from a certain process. Or do the same for lots of processes, if you use execname and not PIDs…

Such a command line will show you all system calls made by Xorg in the last 5 seconds:

solaris# dtrace -n 'syscall:::entry /execname == "Xorg"/ {@[probefunc] = count(); } tick-5sec {printa(@); clear(@);}'
dtrace: description 'syscall:::entry ' matched 227 probes
CPU     ID                    FUNCTION:NAME
0  36588                       :tick-5sec
writev                                                           20
lwp_sigmask                                                      38
setcontext                                                       38
setitimer                                                        75
read                                                            422
pollsys                                                         426

pS: some time later I’ll hopefully write more about what DTrace and D language are

Basic usage of DTrace

May 2, 2009 · Filed Under General Solaris topics · 2 Comments 

I’m slowly getting used to seeing and using DTrace in my everyday work…

For example, here’s a start of the most basic analysis.

My setup: The system is constantly busy with something, and our task is to find what’s responsible for this. How? One of the possible solutions is to simply watch the system for a certain period of time (5 seconds in our case) to see what process makes most system calles… And it’s clearly seen now that the most active consumer of system calls is Java VM which happens to run a very complex graphics applet at this very moment.

Read more

What’s new in Solaris 10?

May 2, 2009 · Filed Under General Solaris topics, News · 2 Comments 

Here are just some of the revolutionary changes introduced in Solaris 10:

DTrace – dynamic tracing

DTrace allows you to dynamically trace anything and everything in real time. You can observe processes both in userland and kernel space, watch them as closely as you want and this all with virtually no performance impact. This allows DTrace to be used on a production system being absolutely sure it’s not going to considerably slow the system down or crash it.
I think it’s one of the best Solaris 10 innovations – all the administrators and developers will like it.

ZFS file system (zettabyte file system)

Read more

DTrace: observing PHP

May 1, 2009 · Filed Under General Solaris topics · Comment 

I’ve finally got some spare time to download a PEAR module for DTrace. What a great module! I’ve found a little problem with it, wrote a letter to Wez Furlong, and he immediately changed the source code to make it work even better. Thanks a lot, Wez! :)

So, here it is – my first PHP Dtrace script: php-scripts-snoop.d

Read more

Zones in Solaris 10: part two – types of resources

May 1, 2009 · Filed Under General Solaris topics · 1 Comment 

Now that we know how to create non-global zones in Solaris, it’s probably time to learn some basics of zones configuration. Most work is done with zonecfg which has been mentioned in my Solaris zones: a working example post.

Example of fully configuring a Solaris 10 zone

For starters, let’s have a look at the full configuration of our zone. You’ve probably guessed by now, that we only specified the minimal number of parameters when creating our zone. Now I’ll show you how to get a full view of our zone’s configuration, and I’ll also talk a bit about types of resources you can allocate to a non-global zone.

Read more

Asus A8N-SLI NIC drivers for Solaris

May 1, 2009 · Filed Under General Solaris topics · 2 Comments 

Finally, I’ve found some time to finish off the on-board network adapters configuration in Solaris 10 for my Asus A8N-SLI motherboard.

As I’ve already told before, this motherboard comes equipped with 2 network adapters:nForce4 and Yukon Gigabit Ethernet 10/100/1000Base-T Adapter. Both adapters are based on Marvell chips – they are Marvell 88E8001-LKJ1 (PCI Gigabit Ethernet) and Marvell 88E1111-RCJ (PHY) respectively.

So, the first one of these adapters is properly found and supported in Solaris 10 out of the box. In fact, Solaris 10 even finds and attempts to configure nge0 during the initial OS install.

To make the Yukon Gigabit (Marvell) adapter work, you should go to the SysKonnect website and navigate to the drivers downloads page (skge is there as well). What’s REALLY cool is that there is a 64bit driver already! So I’ve got myself this file: skgesol_x64v8.12.1.3.tar.Z

After you unpack the archive, you should install the SKGEsolx, and that’s it – the pre-install script even allows you to configure skge0 adapter – set its IP and network mask.
This is where my two network adapters are found (taken from /etc/path_to_inst):

"/pci@0,0/pci10de,5c@9/pci1043,811a@c" 0 "skge"
"/pci@0,0/pci1043,8141@a" 0 "nge"

Attention: due to unknown reasons, prtconf -vp clearly shows only one of the adapters – skge. That’s the one represented by the “Ethernet controller” model name. Don’t know why, but nge is called “Bridge device” there.

ZFS: commands emulation

May 1, 2009 · Filed Under General Solaris topics · Comment 

I’m considering getting myself an x86 server with Solaris for home use, and today I’ve decided to play around with ZFS on my old Sparc-box.

I believe those of you who are just getting started with ZFS will really like the -n command line option for zfs and zpool, which allows you to see what result would a certain command yield, while there is nothing actually done to your disks.

So, if you’re thinking of creating a new storage pool, you don’t have to actually create it just to see how it will look – you can use -n option instead:

solaris# zpool create -n mypool raidz /export/vdev/d1 /export/vdev/d2 /export/vdev/d3 /export/vdev/d4
Read more

Solaris 8 Migration Assistant (Project Etude)

May 1, 2009 · Filed Under Solaris How-To · 2 Comments 

I’ve finally completed my first successful experiment with Solaris 8 Migration Assistant (S8MA) today – a new product from Sun which allows you to run Solaris 8 branded zones. It’s a fully and officially supported solution (for an extra price), but you can download the free 90-day trial to play with it and understand how really cool it is.

Why use Solaris 8 zones?

First of all, just a few words about the niche for this product. Many companies are rather conservative about their Solaris upgrades. Most systems are still running Solaris 8, if not something older. Quite often this is also dictated by third-party software dependencies – products which were bought and configured for Solaris 8, which are now so tightly integrated that there isn’t an easy way to migrated them into Solaris 10. Such systems are doomed for slow but very expensive death. Expensive, because with every year the hardware support for  servers capable of running Solaris 8 raises again and again.

Read more

Books on Solaris

May 1, 2009 · Filed Under General Solaris topics · Comment 

Thanks to links I’ve got from Robert Milkowski’s Solaris Internals blog entry, I went to the Pearson Education website and ordered myself a book on Solaris 10, which every active Solaris user or administrator should definitely read: Solaris™ Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris.

You can order another great book – Solaris™ Internals: Solaris 10 and OpenSolaris Kernel Architecture, 2nd edition there as well.

I should mention that the prices are much lower than those of the Amazon. Also, the credit card number checking script of their website is too strict. After none of my credit cards worked, I ended up writing an email to the support team, and they have placed my order manually.

Update: here are direct links to these books on the website of Pearson Education:

SMF: offline or disabled services

May 1, 2009 · Filed Under General Solaris topics · 2 Comments 

When something doesn’t work like expected, one of the first commands to find what’s wrong is svcs -a. But there are other ways to use this command.

For instance, the following command will show only disabled and offline services, which quite often is exactly what we want. Particularly useful is the fact that such a variant of using svcs shows you impact of each offline service – you can quickly see what other things may not be working as the result of it.

solaris# svcs -xv
svc:/application/print/server:default (LP print server)
 State: disabled since Wed Jan 26 11:23:32 2005
Reason: Disabled by an administrator.
   See: http://sun.com/msg/SMF-8000-05
   See: man -M /usr/share/man -s 1M lpsched
Impact: 2 dependent services are not running:
        svc:/application/print/rfc1179:default
        svc:/application/print/ipp-listener:default
svc:/milestone/multi-user-server:default (multi-user plus exports milestone)
 State: offline since Wed Jan 26 11:54:58 2005
Reason: Start method is running.
   See: http://sun.com/msg/SMF-8000-C4
   See: man -M /usr/share/man -s 1M init
   See: /var/svc/log/milestone-multi-user-server:default.log
Impact: 1 dependent service is not running:
        svc:/system/zones:default

As you can see, offline service svc:/application/print/server:default renders two its dependants useless as well, namely they are svc:/application/print/rfc1179:default and svc:/application/print/ipp-listener:default.

« Previous PageNext Page »