One-liner of the day

Wednesday, February 20. 2008
Need something like top on a Solaris machine which hasn't installed top?

Try this, most active processes should be at the bottom of the list:

while true; do clear; ps -o pcpu,pid,ppid,user,comm -ef | sort -n | grep -v PPID; echo; date; sleep 2; done


lines are sorted by CPU usage which can be found in the first column. The other columns show process id, parent process id, user and the command running like this:


0.0 26012 686 root /usr/local/openssh/sbin/sshd
0.0 26015 26012 root -sh
0.0 26561 1 root vmstat
0.0 27084 637 root sh
0.0 27085 27084 root /bin/ksh
0.0 27086 27085 root sleep
0.0 27094 26015 root grep
0.0 27095 27094 root ps
0.0 27096 27094 root sort
0.1 1 0 root /etc/init
0.1 479 1 root /opt/VRTSob/bin/vxsvc
0.1 522 1 root /usr/lib/netsvc/yp/ypserv
0.1 623 1 root /usr/lib/autofs/automountd
0.1 17621 1 root /usr/sbin/nscd
0.4 3 0 root fsflush

Wed Feb 20 13:15:01 MET 2008


Not the best way, but good enough for a quick estimation.

Solaris Express 06/06 on a Strato rootserver

Wednesday, July 19. 2006
This article might be useful to people from outside Germany, so I used the chance to write something up in English again.

My old rootserver has gotten a little out of date lately with its 1.2GHz Celeron CPU, 40GB harddrive and, worst of all, only 256MB of RAM, things were getting a little crammed there. It was time to rent a new server and Strato was one of the first providers to include unlimited traffic in their offers and therefore got the deal.

So, having that box set up nicely by Strato was a nice idea(they even mirror the harddisks for you), but I rented this machine with a friend who plans to run some Java applications on it and in my opinion, you can't beat Java on Solaris. It might just be my very subjective impression, but I've always had the feeling, Java applications run a little "smoother" on Solaris machines, especially when there's a SPARC CPU in it.

So, I wanted to try out Solaris on my new rootserver and first of all, I've had a look if someone already did it.. Installing operating systems without the ability to insert or change CDs isn't always easy, but I haven't found any decent guide on how to do this, only someone who started one, but didn't finish or even include the nasty bits.

Then an idea struck me: Why not install Solaris in a virtual machine..

With XEN mentioned everywhere and remote console access, it should even make a nice way to load up CDs, power on and off the Solaris "machine" with a serial administration console to a non-networked XEN installation and the network routed to the Solaris domain.

But that was a no-go, because Solaris cannot handle XEN block devices (yet).
To cut this short: VMware server was just released with the possibility to assign a physical disk to the virtual machine, use ISO images and.. install Solaris(and discard VMWare afterwards).

And this is what I did..


Continue reading "Solaris Express 06/06 on a Strato rootserver"