Short documentation for JWM

Last Update: 10.02.2014/bs for SPARC version 1.0.12 and x86 version 1.0.12


Contents


  1. Short documentation for JWM
    1. Contents
    2. Introduction
    3. Author
    4. History
    5. Installation
      1. Requirements for the server running JWM
      2. Requirements for the client
      3. Creating your own tar archive
    6. Tools installed in JWM
      1. General tools
      2. General Solaris Tools
      3. Hardware tools
      4. General Monitoring tools
      5. Process tools
      6. Network tools
      7. I/O tools
        1. General I/O
        2. UFS
        3. ZFS
        4. VxVM / VxFS
        5. SVM
      8. CPU tools
      9. Memory tools
    7. Internals
      1. Using tools from JWM in a ssh or telnet session
      2. Adding java to the PATH
      3. Adding static menu entries
      4. Using an ssh tunnel for JWM
      5. Stopping and Removing a JWM session
      6. Removing JWM
      7. Temporary files and directories used by JWM
      8. Using a persistent home directory for JWM
      9. Sample script to automatically start JWM after a reboot
      10. Using a persistent data directory for darkstat
      11. Using a persistent data directory for ntop3
      12. swat internals
      13. Environment variables used by JWM
    8. Additional information
      1. Trouble Shooting
        1. Solaris commands complain about wrong libraries
      2. Links to other resources


Introduction

JWM  is a collection of various performance and analyze tools for Solaris (Hardware, System, CPU, Memory, Storage, Network, etc) . JWM is distributed via tar.gz file so that it can be used by every user on the system (but some tools only work with root access). JWM also contains an VNC server for the tools with GUI.

JWM is available for Solaris/SPARC and Solaris/x86.

see also the README



Author


Bernd Schemmer
email: Bernd.Schemmer@gmx.de

Homepage: http://bnsmb.de


back to top

History


Version
Date
Notes
1.0.12 sparc 01.02.2014
1.0.12 x86 01.02.2014
01.02.2014
updated various tools
added some tools, see the README file
1.0.11 sparc 10.09.2013
1.0.11 x86 10.09.2013
10.09.2013
updated various tools
added some tools, see the README file
1.0.10 sparc 01.04.2013
1.0.10 x86 01.04.2013

01.04.2013
updated various tools
added some tools, see the README file
1.0.9 sparc 31.12.2012
1.0.9 x86 31.12.2012
31.12.2012
updated various tools;
added some new tools, see the README file
enhanced the script to use JWM via an ssh tunnel
1.0.8 sparc 06.10.2012
1.0.8 x86  06.10.2012
06.10.2012
updated various tools
1.0.7 sparc 11.12.2011
1.0.7 x86 11.12.2011
11.12.2011
updated various tools
1.0.6 sparc 01.10.2011
1.0.6 x86 01.10.2011
01.10.2011
updated various tools
1.0.5 sparc 24.06.2011
1.0.5 x86 24.06.2011
24.06.2011 cleanup menues
add MENU_LIST file
1.0.5 sparc 22.06.2011
1.0.5 x86 22.06.2011
22.06.2011 initial release


back to top

Installation


JWM is delivered in a compressed tar archive.

The compressed tar archive for SPARC (sun4u and sun4v) is:    jwm_for_sparc_v1012.tar.gz
The compressed tar archive for x86 (32 Bit and 64 Bit) is:         jwm_for_x86_v1012.tar.gz

(Note that 1012 is the version number (1.0.12)  which will change for newer versions)

To use JWM unpack the tar.gz file using gzip and gtar in an empty directory and execute either vnc_with_jwm.sh (for direct VNC access without an ssh tunnnel) or vnc_with_jwm_and_ssh.sh (for VNC access via an ssh tunnel). Both scripts use either the display number in the environment variable DISPLAY_NUMBER if set or search the next free display number for the VNC server (look at the messages written by the script); the port for the ssh tunnel is always display_mumber+2000 (e.g. for the display 5901 the ssh tunnel port is 7901).

The default screen resolution for the VNC window is 1200x800; to use another screen resolution call the start script with the requested   resolution, e.g.

./vnc_with_jwm.sh 900x1440

or define a environment variable XSERVER_GEOMETRY before starting JWM , e.g.

XSERVER_GEOMETRY=1280x900 ./vnc_with_jwm.sh

To change the default value for the resolution change the variable DEF_XSERVER_GEOMETRY in the script ${JWM_BASEDIR}/jwm/jwm_env.
(see also Environment variables used by JWM)

Be aware that some of the menues for the window manager are "dynamic" menues (marked with [Menu last updated xx.xx.xxxx yy:yy:yy]).

These menues are created while starting JWM depending on the current configuration of the machine and can be updated while the window manager is running (see the sub menu JWM Desktop / Update dynamic menues).
Dynamic menues are available for

To disable some of the dynamic menues do the following before starting JWM:

ls ${JWM_BASEDIR}/jwm/etc/create_dynamic* >${JWM_BASEDIR}/MENU_LIST
# now edit the file ${JWM_BASEDIR}/MENU_LIST and remove all menues that should NOT be
# created

To disable all dynamic menues do :

echo >${JWM_BASEDIR}/MENU_LIST

before starting JWM.


Be aware that it takes some time for the window manager to start. Therefore you might see the grey X server desktop after connecting to the VNC session. In this case just wait until the window manager started.

Multiple JWM session can run in parallel; JWM can be used by every user (but some tools require root access). Note that the default cmd prefix for all commands executed via menu entries is pfexec - therefore if a user in Solaris 10 or newer has the aprobiate role these commands will be executed with root access.


See Using tools from JWM in a ssh or telnet for how to use JWM without VNC.




Note: ${JWM_BASEDIR} in this documentation is the directory in which the tar file was extracted.



back to top



Requirements for the server running JWM


JWM supports Solaris 10/SPARC, Solaris 9/SPARC, and Solaris 10/x86. JWM should also run on Solaris 11/SPARC and Solaris 11/x86 but that was not tested yet.

Note that the development is only done as root in Solaris 10/SPARC and Solaris 10/x86. Therefore there might be some root cmd prefixes for some commands missing.

To use JWM via ssh tunnel ssh must be installed and running and the sshd configuration must allow ssh tunnel.

Some programs in JWM need java 1.5 or newer. You may use the script search_java to add another java bin directory to the path. You should do this before starting a JWM session.

Some programs in JWM use the ncurses library - this library is not part of JWM (because it installs always in /usr/local).



back to top

Requirements for the client


A VNC viewer (or a web browser) for the VNC access and ssh (or a program with similar functionality like fore example putty) if using a ssh tunnel.

Two sample scripts for calling JWM via ssh tunnel are included in the archive: for Linux: ssh_for_vnc_client.sh and for Windows: ssh_for_vnc_client.cmd.



Creating your own tar archive


To create a customized version of JWM just unpack the tar archive; do your changes and create a new compressed tar archive using the script  create_jwm_archive.sh.




Back to top

Tools installed in JWM

Note: n/a = not installed in this JWM version


General tools


Tool
SPARC Version
x86 Version
Description/Purpose
GUI
Usage
Source
jwm
v2.2.0
v2.2.0
Window Manager
yes
executed automatically
http://joewing.net/programs/jwm/
Xvnc
4.1.3
installed
VNC server
yes
executed automatically http://www.realvnc.com/
opera
10.11-4791
10.11-4791
Webbrowser (GUI)
yes
opera.sh
http://www.opera.com
links
1.00per23
n/a Webbrowser (Text)
no
links
http://elinks.or.cz/
elinks
n/a 0.11.7



http://www.sunfreeware.com
mc
4.6.1
4.7.0.10
File Browser, Midnight Commander
no
mc
http://www.sunfreeware.com
nedit
5.5 30 Sept 2004
5.5 30 Sept 2004 editor
yes
nedit
http://www.sunfreeware.com
ne
2.1
2.1
editor
no
ne
http://www.sunfreeware.com
local doc: doc/ne/index.html

ne needs ncurses - ncurses is not part of JWM!
putty
Aug 29 2009
Aug 29 2009 terminal program
yes
putty
http://www.sunfreeware.com
xterm
installed
installed
terminal program
yes
xterm
http://www.sunfreeware.com
aterm
installed n/a terminal program
yes
aterm
http://www.afterstep.org/aterm.php
mxrvt
n/a 0.5.4
terminal program
yes
mrxvt
http://www.sunfreeware.com
rxvt
2.7.10
26 Mar 2003
n/a terminal program yes
rxvt
http://www.sunfreeware.com
md5
installed installed
calculate md5 sum
no
md5
Sun
ckermit C-Kermit 8.0.211, 10 Apr 2004
C-Kermit 8.0.212, 20 Dec 2006
terminal emulator no
ckermit
http://www.columbia.edu/kermit/
rsync
3.0.7 

3.0.8
synchronize two directories no
rsync
http://www.sunfreeware.com
ncftp
NcFTP 3.2.1
(Jul 29, 2007)
NcFTP 3.2.5 (Feb 02, 2011) ftp client
no
ncftp
http://www.sunfreeware.com
wget
GNU Wget 1.8.2
GNU Wget 1.8.2 http retrieval program
no
wget
http://www.opencsw.org/
unfsd3
09.22
09.22
user mode NFS daemon
no
unfsd
http://unfs3.sourceforge.net/
jwm/start_stop_jwm
installed installed start/stop jwm via rc script or SMF service
no
start_stop_jwm my own script
jwm/jwm_session
installed installed kornshell script to init the JWM environment in an ssh or telnet session
no
# in ksh or bash:
cd ${JWM_BASEDIR}
. jwm/jwm_session
my own script
search_java
installed installed add a java bin directory to the path

cd ${JWM_BASEDIR}
. jwm/bin/search_java
my own script
ack
2.08
2.08
grep replacment in perl
no
ack
http://betterthangrep.com/
unrar
4.1.4
4.1.4
unpack rar archives
no
unrar
http://www.sunfreeware.com
pkgutil
2.6.6,REV=2013.11.12
2.6.6,REV=2013.11.12
pkgutil from  the OpenCSW package repository
no
pkgutil
http://www.opencsw.org/
bvi
1.4rc0 1.4rc0 vi like editor for binary files
no
bvi
bmore
http://bvi.sourceforge.net/



General Solaris Tools


Tool
SPARC
Version
x86 version
Description/Purpose
GUI
Usage
Source
mtx
1.3.12
1.3.12
tool for tape libraries and tape drives no
mtx
http://www.sunfreeware.com
local doc: doc/mtx.txt
startstop_ramdisk.sh
1.0 1.0
create or destroy a ramdisk
no
startstop_ramdisk.sh
my own script
remove_patch_backups.sh
installed installed
remove old patch backups
no
remove_patch_backups.sh
my own script
ldm_config.sh
installed n/a view/configure LDoms
no
ldm_config.sh
my own script
create_zone.sh
1.1.27 1.1.27
create a zone
no
create_zone.sh
my own script
zadmin
1.0.0
1.0.0
adminstration tool for zones
no
zadmin
my own script
addtimestamp
installed installed
add a time stamp to the messages of a program
no
addtimestamp
my own script
my_dsmc
installed installed create a temporay dsmc config and call dsmc
no
my_dsmc
my own script
split_iso_image.sh 1.0 1.0
split an ISO image or an harddisk image into files for every slice that can than be mounted with lofiadm
no
split_iso_image.sh
my own script
boot_archive
installed 19.01.2010
view files in a Solaris 10 boot archive
no
boot_archive
my own script
libhoard
Hoard version 3.8,
n/a library for memory allocation no
use_hoard <program_to_execute>
or
use_hoard32 <program_to_execute>
or
use_hoard64 <program_to_execute>
http://www.hoard.org/
see also
http://developers.sun.com/solaris/articles/multiproc/multiproc.html
Sun Explorer
8.0.2
8.0.2
Sun tool to collect system configuration and log files
no
SUNWexplo/bin/explorer

execute_on_all_hosts.sh
1.1.0
1.1.0
execute a script or command on multiple machines using scp and ssh
no
execute_on_all_hosts.sh
my own script
scriptt.sh
2.0.0.6 01.02.2014
2.0.0.6 01.02.2014 ksh script template
no
edit ${JWM_BASEDIR}/jwm/develop/scriptt.sh my own script, indepth documentation for scriptt.sh
zone_console
installed installed
script to start, stop, or connect to the console of a zone
no
zone_console
my own script;
Note: This script needs the tool screen which is NOT part of JWM
guds
3.3
3.3
Solaris tool to collect performance data
no
guds
Sun/Oracle
Doc ID 1285485.1
guds.cronjob
1.0
1.0
Simple script to call guds if the CPU usage is more than 90% for  defined time interval
no
guds.cronjob

dtrace_syscalls
0.0.5
0.0.5
Script to call dtrace to monitor syscall probes
no
dtrace_syscalls
my own script
pkgapp
3.6.2
3.6.2
collect all libraries of a process core dump
no
pkgapp
Sun/Oracle



Back to top

Hardware tools


Tool
SPARC Version
x86 version Description
GUI
Usage
Source
scadm
installed n/a System controller configuration program for ALOM
no
scadm
Sun
rscadm
installed n/a System controller configuration program for RSC
no
cd ${JWM_BASEDIR}/jwm/tools/bin/rsc ; ./rscadm
Sun
lom
installed n/a System controller configuration program for the LOM
no
lom
Sun
obpbanner
installed n/a print the OBP banner
no
obpbanner
Solaris internals
show_devalias.sh installed n/a show eeprom device aliases no
show_devalias.sh
my own script
memconf
V3.03 19-Jul-2013
V3.03 19-Jul-2013
display installed memory modules
no
memconf
http://www.4schmidts.com/unix.html
get_network_adapter.sh installed installed
view network adapter settings no
get_network_adapter.sh my own script
configure_network_adapter.sh installed installed
set network adapter configuraton (FD/HD, autoneg, etc) no
configure_network_adapter.sh my own script
ipmitool
v1.8.11 (from Solaris 10 Update 10)

access the ILOM
no
${JWM_BASEDIR}/jwm/tools/bin/ipmitool-v1.8.11_s10u10

ipmiutil
2.92
2.92
access the ILOM
no
ipmiutil
http://ipmiutil.sourceforge.net
local doc:
/doc/ipmiutil_UserGuide.txt
dmidecode
n/a
2.12
view BIOS information
no
dmidecode
http://www.nongnu.org/dmidecode/

powertop
1.0
1.0
powertop from Intel
no
powertop
http://www.opencsw.org/



Back to top

General Monitoring tools


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
Chime
1.4.45
1.4.37
dtrace GUI
yes
chime
http://www.opensolaris.org/os/project/dtrace-chime/
http://hub.opensolaris.org/bin/view/Project+dtrace-chime/WebHome
RICHPse
3.5.1
3.5.1
general monitoring tool
partially
se <se_script>
se sample scripts are in the directory:
./jwm/RICHPse
http://sourceforge.net/projects/setoolkit/
Local docs: RICHPse/doc/
ksar
5.0.6
5.0.6
sar with GU
yes
ksar
http://sourceforge.net/projects/ksar/
Local docs: kSar/docs/README
esar
1.0.5
1.0.5
extended sar
no
esar
http://ksar.atomique.net/Esar/
kar
1.0
1.0
kstat activity reporter


http://www.petertribble.co.uk/Solaris/kar.html
solview
1.0
1.0
general info tool
yes

http://www.petertribble.co.uk/Solaris
cfg2html
1.6.4
1.6.4
general info collecting tool
no
cfg2html.sh

top
3.8beta1
3.8beta1
general monitoring tool
no
top
http://www.opencsw.org/







swat
3.0.2
3.0.2
Sun StorageTek Workload Analysis Tool
yes
swat
http://sun.systemnews.com/
see also the notes below

03.09.2013/bs


added the fix for swat and a lot of devices from
       https://blogs.oracle.com/henk/entry/swat302_buffer_overflow_java_nio

to aovid buffer overflows

01.01.2014/bs

added the fix to remove the expiration date
pca
20140115-01

20140115-01 list / install solaris patches
no
pca
http://www.par.univie.ac.at/solaris/pca/
zonestat
1.4.1
1.4.1
view zone status
no
zonestat
http://hub.opensolaris.org/bin/view/Project+zonestat/WebHome
sysstat
20111025

20111025 general monitoring tool
no
sysstat
http://www.maier-komor.de/sysstat.html
watch_system.sh
installed installed
general script to collect performance data
no
watch_system.sh
Sun
svclog
svcmethods
svcmilestone
svcservices
installed installed
view SMF service infos
no
svclog
svcmethods
svcmilestone
svcservices
Sun, my own scripts







pid2port.sh
installed installed view ports used by a process
no
pid2port.sh
Sun
pcp
installed installed view ports used by a process
no
pcp
Sun
dtrace Toolkit
installed installed various dtrace scripts
no
${JWM_BASEDIR}/jwm/DTT/*
http://www.brendangregg.com/
Local docs: DTT/Docs
get_coredump_size.sh
installed installed get the size of a core dump
no
get_coredump_size.sh
my own script
getport.sh
installed installed list processes and used ports
no
getport.sh

Xmonitor.sh
installed installed start various xterms with Solaris monitoring tools
yes
Xmonitor.sh
my own script
sysmax
installed installed list system configuration
no
sysmax
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
sysperfstat
installed installed monitor system startus (Utilisation and Saturation)

no
sysperfstat
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
sta
installed installed print process tree
no
sta
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
statit
installed n/a list general configuration
no
statit
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
xvmstat
installed installed monitor vmstat
GUI
xvmstat
http://www.brendangregg.com/
sys_diag
7.04b
7.04b collect system config and performance data
no
sys_diag
http://www.sunfreeware.com
lsof
4.87
4.87
show open files
no
lsof
http://www.opencsw.org/

act
8.17
8.17
analyze crashdump
no
act
Sun
iscda
installed installed
script to analyze a crash dump
no
iscda unix.3 vmcore.3
iscda /dev/ksyms /dev/mem
Sun
jkstat
1.0
1.0 view/monitor kstat values
yes
jkstat
http://www.petertribble.co.uk/Solaris
jangle
0.11
0.11
snmp viewer
yes
jangle
http://www.petertribble.co.uk/Solaris
lsfd
installed
installed
list file handles for a pid
no
lsfd
http://www.brendangregg.com/
OSWatcher Black Box
6.0
02/11/13
6.0
02/11/13
Oracle monitoring tools
yes
oswbb
http://support.oracle.com


back to top

Process tools


Tool
SPARC Version
x86 version Description
GUI
Usage
Source
qps
installed n/a process manager
yes
qps
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
jproc
1.0
1.0 process manager
partial
jproc
http://www.petertribble.co.uk/Solaris










Back to top

Network tools


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
ntop
1.1
n/a network monitoring tool
web
use
ntop
to start the daemon; then connect via web browser; the port used is 3000.
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
ntop
3.x
3.3rc2
network monitoring tool
web
use
ntop3.sh
to start the daemon
then connect via web browser; the default port used is 3300 (this can be changed while starting ntop 3.x)
http://www.ntop.org

see also Using a persistent data directory for ntop3
netcat
1.10 1.10
general network tool
no
nc
http://www.sunfreeware.com
ngrep
1.45 1.45
network grep
no
ngrep
http://www.sunfreeware.com
nmap
3.93
4.85 BEA7
network port checking tool
no
nmap
http://www.sunfreeware.com
http://www.insecure.org/nmap
nmapfe
installed
n/a GUI for nmap
yes
nmapfe
http://www.sunfreeware.com
netperf
2.5.0
2.4.5
network bandwith test program
no
netperf / netserver
http://www.sunfreeware.com
examples are here:
doc/netperf/doc/examples/
tcpstat
1.5 1.5
monitor tcp connections
no
tcpstat
http://www.sunfreeware.com
arping
2.09 2.09
ping MAC address
no
arping
http://www.sunfreeware.com
arpwatch
2.1a15 2.1a15
monitor ARP cache
no
arpwatch
http://www.sunfreeware.com
nload
0.7.2 0.7.2
monitor network traffic
no
nload
http://www.sunfreeware.com
cdpr
2.2.0 installed
monitor Cisco Discovery Protocol packets
no
cdpr
http://sourceforge.net/projects/cdpr/
snoop_cdpr
installed
installed
use snoop to listen for CDPR packets
no
snoop_cdpr [network_port]
my own script
cdpinfo
1.2
1.2
monitor Cisco Discovery Protocol packets with snoop
no
cdpinfo

uset cdpinfo_for_all to monitor all ports in use
https://github.com/wildajet/scripts/blob/master/cdpinfo
ifstat
1.1
1.1
monitor network traffic
no
ifstat
use enhanced_ifstat.sh for ifstat with timestamps
http://gael.roualland.free.fr/ifstat/
iftop
0.15
0.17
monitor network traffic
no
iftop
http://www.ex-parrot.com/pdw/iftop/

iftop needs ncurses - ncurses is not part of JWM!
darkstat
3.0.716
3.0.716

monitor network traffic
web
darkstat
to start the daemon
then connect via web browser
http://unix4lyfe.org/darkstat/

see also see also Using a persistent data directory for darkstat
knetstat
installed installed
monitor network traffic
no
knetstat
http://southbrain.com/south/2008/06/knetstat-network-io-statistics.html
mtr
0.72
0.80
monitor network traffic
no
mtr
http://www.bitwizard.nl/mtr/
nicstatus
installed
installed
monitor network traffic
no
nicstatus
http://www.sun.com (link does not work anymore
pchar
1.5
1.5
monitor detailed network traffic between two hosts
no
pchar
http://www.kitchenlab.org/www/bmah/Software/pchar/
get_ip_val.sh
installed installed
get IP settings
no
get_ip_val.sh
my own script
get_tcp_val.sh
installed installed get TCP settings
no
get_tcp_val.sh
my own script
netbar
installed installed monitor network performance
yes
netbar
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
netload
installed installed view network load
no
netload
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
netsum
installed installed monitor network traffic
no
netsum
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
nicstat
installed installed monitor network performance
no
nicstat
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
iperf
2.0.5 (08 Jul 2010) pthreads
2.0.5 (08 Jul 2010) pthreads network bandwidth test program
no
iperf
http://www.sunfreeware.com
jperf
2.0.2
2.0.2
GUI for iperf
yes
jperf
http://www.nwlab.net/know-how/JPerf/
netio
1.26
1.26
network bandwidth test program
yes
netio
http://www.ars.de/ars/ars.nsf/docs/netio
tcpdump
4.1.1
4.1.1
monitor network packets
no
tcpdump
http://www.sunfreeware.com
bwm-ng
0.6
0.6
monitor network packets
no
bwm-ng
Note: bwm-ng can also be used for disk I/O monitoring via kstat values
http://www.gropp.org/?id=projects&sub=bwm-ng
hping2
2.0.0 release candidate 1
2.0.0 release candidate 1 network test program
no
hping2
http://www.kyuzz.org/antirez/hping2.html
http://www.hping.org
see also
doc/HPING2-HOWTO.txt
doc/hping2.html
tcpdrop
installed installed
drop an active TCP connection
no
tcpdrop
http://typo.submonkey.net/pages/tcpdrop-solaris
nx
5.0
5.0
monitor network
no
nx
http://blogs.oracle.com/rweisner/entry/nx_revisited_yet_another_network
local doc: doc/README.nx
socketsnoop.d
installed installed
monitor which processes are using sockets for network usage
no
socketsnoop.d
http://www.brendangregg.com/










Back to top

I/O tools



General I/O


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
check_fc_config.sh
1.2.2
1.2.2
Script to check the fiber channel connections
no
check_fc_config.sh [ -L outputfile]
my own script
dio
installed installed monitor I/O
no
dio
(wrapper script for iostat)
http://www.brendangregg.com/
inq
v7.6.1.0

v7.6.1.0
view detailed disk information on a low level
no
inq
use inq_all_disks to call the tool for all disks
ftp://ftp.emc.com/pub/symm3000/inquiry/
vhci_stat
installed n/a view MPxiO status
no
vhci_stat
http://southbrain.com/south/
scsiping
installed n/a ping a SCSI device
no
scsiping

wd.sh
installed installed
list sd* -> c* relations
no
wd.sh
Sun
view_mpxio_status.sh
installed installed
list mpxio status
no
view_mpxio_status.sh
my own script
list_wwns.sh
installed installed
list wwns for QLogic FC adapter
no
list_wwns.sh
my own script







label_disks.sh
installed installed
label all unlabeled disks
no
label_disks.sh
my own script
iobar
installed installed
monitor I/O
yes
iobar
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
iotop
installed installed
monitor I/O
no
iotop
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
bonnie
1.03e
1.03e
harddisk I/O performance test
no
bonnie++
http://www.sunfreeware.com
smartctl
5.40
5.41 2011-06-09 r3365 [i386-pc-solaris2.10]
smartmontools contains utility programs (smartctl, smartd) to control/monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI disks.
no
smartctl
http://sourceforge.net/projects/smartmontools/
dtaz
0.51
n/a DTraceTazTool is a disk activity analysis tool for Solaris 10 or newer. It uses DTrace to read disk activity and GTK to plot a graph.
Note: May not run on all machines!
yes
dtaz
http://www.brendangregg.com/dtrace.html#Examples
di
4.27
4.27
df replacment
no
di
http://www.sunfreeware.com
iozone
3.420
3.420
I/O test tool
no
iozone

http://www.iozone.org/



Back to top

UFS


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
CacheKit
0.96 0.96
View I/O cache status
no
use the menu or call the scripts directly from ./jwm/CacheKit
http://sourceforge.net/projects/cachekit/
Local doc: CacheKit/README
directiostat
installed n/a monitor direct I/O
no
directiostat
http://www.solarisinternals.com/
filestat
installed n/a view extended infos about a file
no
filestat
http://www.solarisinternals.com/



Back to top

ZFS


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
zilstat
installed installed
View ZFS ZIL cache
no
zilstat.ksh
http://www.richardelling.com/Home/scripts-and-programs-1
arc_summary.pl
0.3 0.3
view ZFS ARC counters
no
arc_summary.pl
http://cuddletech.com/arc_summary/
arcstat.pl 0.0
.0.0
view ZFS arc statistics
no
arcstat.pl
https://blogs.oracle.com/realneel/entry/zfs_arc_statistics
arcstat.pl
0.1
0.1
arcstat.pl with L2ARC support
no
arcstat01.pl
http://blog.harschsystems.com/2010/09/08/arcstat-pl-updated-for-l2arc-statistics/
filemon_zfs.d


ZFS file access monitor dtrace script
no
filemon_zfs.d <filename>
http://blogs.corenetworks.es/2010/03/zfs-file-access-monitor-dtrace-script/




Back to top

VxVM / VxFS


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
vxdf
vxtree.pl
installed installed
view VxVM volumes
no
vxdf
vxtree.pl

check_plexe.sh installed installed
check the plexes of all VxVM volumes no
check_plexe.sh my own script
vxsumdisk
installed installed
vxvm disk summary
no
vxsumdisk

enable_vxvm
installed
installed
enable and start VxVM
no
enable_vxvm
my own script
disable_vxvm_for_next_reboot
installed
installed
temporary disable VxVM for the next reboot
no
disable_vxvm_for_next_reboot my own script



Back to top

SVM


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
metafree
metainfo.sh
metamap.sh
installed installed
view SVM / SDS infos
no
metafree
metainfo.sh
metamap.sh
Sun




Back to top

CPU tools


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
perfbar
installed installed
Monitor CPU performance
yes
perfbar
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
thrbar
installed n/a Monitor CPU thread performance
yes
thrbar
http://blogs.sun.com/rweisner/entry/thrbar_perfbar_for_threads

corestat.pl installed n/a view corestatus on T machines
no
corestat.pl Sun
cputrackall
installed installed
Run application under all hardware performance counters
no
cputrackall Sun
har21
2.1
n/a Monitor performance using hardware counters
no
har21
Sun
http://blogs.sun.com/openomics/entry/cpu_hardware_counter_stats
xcpustate
2.9
2.9
Monitor CPU performance
yes
xcpustate
http://www.sunfreeware.com




Back to top

Memory tools


Tool
SPARC Version
x86 version Description/Purpose
GUI
Usage
Source
memstat
installed n/a monitor memory usage
no
memstat
http://www.solarisinternals.com/
memusage
installed installed list memory usage of all processes
no
memusage

memmon
installed n/a monitor memory

memmon
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
prtswap
installed installed list swap configuration
no
prtswap
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
rate
installed n/a memory test program
no
rate
Solaris Performance CD
http://blogs.sun.com/partnertech/entry/update_solaris_performance_toolscd_3
freemem
1.0.3
1.0.3
show free memory
no
freemem.pl
http://theengguy.blogspot.de/2012/08/free-memory-script-that-supports-zfs.html



Back to top

Internals


Using tools from JWM in a ssh or telnet session

Notes:

The tools can also be executed in a ssh or telnet session. To execute the tools in a ssh or telnet session connect to the machine and do the following

cd ${JWM_BASEDIR}
ksh
. jwm/jwm_session


Example:

bash-3.00# cd /applications/tools
bash-3.00# . jwm/jwm_session
Setting environment for jwm 1.0.5 x86 ...

LD_LIBRARY_PATH for jwm is: /applications/tools/jwm/lib/test:/applications/tools/jwm/lib/sfw_5.9:/applications/tools/jwm/lib/5.10:/applications/tools/jwm/lib::/applications/tools/jwm/lib/sfw_5.10

PATH for jwm is: /applications/tools/jwm/tools/scripts:/applications/tools/jwm/bin/5.10:/applications/tools/jwm/bin:/applications/tools/jwm/dss/bin:/applications/tools/jwm/tools/bin/5.10:/applications/tools/jwm/tools/bin:/applications/tools/jwm/DTT//Bin:/applications/tools/jwm/vnc/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/openwin/bin
[bash]
[bash] Select the JWM home directory to use:
1) /tmp/jwm_homedir.15852  3) /tmp/jwm_homedir.28055  5) new
2) /tmp/jwm_homedir.17449  4) none              6) quit
#? 1
JWM_HOME to use is "/tmp/jwm_homedir.15852"
HOME to use is "/tmp/jwm_homedir.15852"
[JWM session] bash-3.00#

 


Note: The script works for the shells ksh and bash.



back to top

Adding java to the PATH


You can use the script ${JWM_BASEDIR}/bin/search_java to add a java directory to the path:


tsunv44-1:/ #  /applications/tools/jwm/bin/search_java
WARNING: This script should be sourced in!
Searching installed java versions ...........
 1) /applications/Java/1.4.2.10/bin:Version_1.4.2_10
 2) /applications/Java/1.4.2.10/jre/bin:Version_1.4.2_10
 3) /applications/Java/1.5.0.17/bin:Version_1.5.0_17-rev
 4) /applications/Java/1.5.0.17/jre/bin:Version_1.5.0_17-rev
 5) /applications/Java/1.5.0.6/bin:Version_1.5.0_06
 6) /applications/Java/1.5.0.6/jre/bin:Version_1.5.0_06
 7) /applications/SCM/jc1/_jvm/bin:Version_1.3.1_10
 8) /usr/j2se/bin:Version_1.4.2_04
 9) /usr/j2se/jre/bin:Version_1.4.2_04
10) /usr/jdk/instances/jdk1.5.0/bin:Version_1.5.0_05
11) /usr/jdk/instances/jdk1.5.0/jre/bin:Version_1.5.0_05
12) none
#? 6
Selected /applications/Java/1.5.0.6/jre/bin
Use
PATH=/applications/Java/1.5.0.6/jre/bin:${PATH}; export PATH


tsunv44-1:/ # ksh
# . /applications/tools/jwm/bin/search_java
Searching installed java versions ...........
 1) /applications/Java/1.4.2.10/bin:Version_1.4.2_10
 2) /applications/Java/1.4.2.10/jre/bin:Version_1.4.2_10
 3) /applications/Java/1.5.0.17/bin:Version_1.5.0_17-rev
 4) /applications/Java/1.5.0.17/jre/bin:Version_1.5.0_17-rev
 5) /applications/Java/1.5.0.6/bin:Version_1.5.0_06
 6) /applications/Java/1.5.0.6/jre/bin:Version_1.5.0_06
 7) /applications/SCM/jc1/_jvm/bin:Version_1.3.1_10
 8) /usr/j2se/bin:Version_1.4.2_04
 9) /usr/j2se/jre/bin:Version_1.4.2_04
10) /usr/jdk/instances/jdk1.5.0/bin:Version_1.5.0_05
11) /usr/jdk/instances/jdk1.5.0/jre/bin:Version_1.5.0_05
12) none
#? 5
Selected /applications/Java/1.5.0.6/bin
Added /applications/Java/1.5.0.6/bin to the PATH

# echo $PATH
/applications/Java/1.5.0.6/bin:/usr/j2se/bin:/applications/ssh/CURRENT/bin:/applications/rcm/bin:/usr/openwin/bin:/usr/local/vnc:/usr/bin:/bin:/usr/sbin:/sbin:/applications/ssh/4.10.110.0/bin:/usr/local/bin::/export/install/tools/scripts:/usr/local/mysql/bin:/usr/db/RCM/bin:/usr/db/RCM/InstServer/:/applications/gpg/bin

# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)


Adding static menu entries

To extend the JWM menu with your own menu entries you can use two files:

${JWM_BASEDIR}/jwm-local

and

${JWM_HOME}/jwm-local


The main menu of JWM includes these files if they exist.

To dynamically update these menu entries do:

Create a script which recreates one or both of the files. After the update is done the script should execute

${JWM_BASEDIR}/jwm/bin/jwm -restart

to request JWM to reread the menu file.

An example script for this action is included:  ${JWM_BASEDIR}/jwm/etc/_create_dynamic_local_menu_entries.sh

Example jwm-local file:

<JWM>
<Menu icon="folder.png" label="Example local menus created Tue Apr  5 09:35:33 MEST 2011">
<Program icon="browser.png" label="firefox">/usr/bin/firefox </Program>
</Menu>
</JWM>


Note: See Environment variables used by JWM for environment variables that can be used in the jwm-local file; see the JWM documentation for information about the file format.


 

Using an ssh tunnel for JWM


The script to start VNC server and an ssh tunnel (${JWM_BASEDIR}/vnc/bin/vnc_with_ssh) uses the ssh key

${HOME}/.ssh/id_jwm_tunnel

to start the ssh tunnel.
(where ${HOME} is the home directory of the user starting JWM).

If this key exists the script uses it Therefor the key must NOT use a passphrase and must be added to the authorized_keys file of the user.

If the key id_jwm_tunnel does not exist the script creates a temporary key named id_jwm_tunnel with no passphrase, adds the public key for id_jwm_tunnel to the authorized_keys file of the user starting JWM and starts the ssh tunnel. After ssh is started the script removes the temporary key again and restores the authorized_keys file.

Be aware the the necessary settings for SSH tunnel in the /etc/ssh/sshd_config file are mandatory to use ssh tunnel.



Back to top

Stopping and Removing a JWM session

The startup script for JWM creates two scripts to stop and remove the JWM instance just started:

/tmp/remove_jwm.<displaynumber>.sh 
/tmp/stop_jwm.<displaynumber>.sh

(<displaynumber>  is the DISPLAY number used for VNC)

Note that the script remove_jwm_<displaynumber>.sh will remove the JWM home directory (which is by default /tmp/jwm_homedir.<pid>)

To stop JWM manually just kill all processes started from the JWM directory (and the ssh process for the tunnel if used), e.g.:

[Fri Dec 17 23:26:25 root@dbkrtdev02 /applications/tools]
#  ps -ef | grep jwm | grep -v grep
  nobody  7942  7941   0   Dec 16 pts/8      23:00 ./ntop -w 3300 -W 0 -Q "/tmp/jwm_homedir.29458//ntop.spool" -P "/tmp/jwm_homedi
    root 29602     1   0   Dec 10 ?           1:35 /applications/tools/jwm/tools/bin/ntop -w 3000 -i vnet0
    root 12359     1   0 20:53:30 pts/3       0:04 /applications/tools/jwm/tools/bin/xterm -sb -sl 10000 -geometry 80x25 -ls -titl
    root 12571 12570   0 21:25:26 pts/3       0:03 /applications/tools/jwm/tools/bin/xterm -geometry 90x25 -sb -e /applications/to
    root 12574 12572   0 21:25:26 pts/12      0:00 ksh ./opera /applications/tools/jwm/JWM_short_online_help.html
    root 12356     1   0 20:53:25 pts/3       0:00 /applications/tools/jwm/vnc/bin/vncconfig -iconic
    root 12357     1   0 20:53:25 pts/3       0:22 /applications/tools/jwm/bin/jwm


#-> to stop JWM do a

kill 7942 29602 12359 12571 12574 12356 12357

Note: If more than one JWM instance is running you should be carefull to only kill the JWM processes from the correct JWM instance!


Back to top

Removing JWM


To remove JWM from a machine stop all running instances of JWM and then remove the directory ${JWM_BASEDIR}.
You should also remove all files and directories that are listed with

ls -d /tmp/*jwm*

Note that you will loose all opera settings and also the monitor files of swat if removing the ${JWM_BASEDIR}


Back to top

Temporary files and directories used by JWM

JWM creates the following temporary files and directories:

Name
Type
Usage
Comment
/tmp/jwm Directory
Directory with libs and files for JWM; used by all running JWM instances
This directory is shared by all JWM instances. Before installing a new JWM version you should remove this directory.
This directory will only be removed by the remove script if no JVM instance is still running.
/tmp/jwm_homedir.<pid>
Directory
home directory for a JWM session
/tmp/remove_jwm.<displaynumber>.sh File
Script to remove all files and directories for a JWM session The remove script only removes the files and directories for one JWM instance.
/tmp/stop_jwm.<displaynumber>.sh File
Script to stop a JWM session

/tmp/jwm_darkstat
Directory
Directory for darkstat data files
this directory will NOT be removed by the remove script!
see also Using a persistent data directory for darkstat
/tmp/jwm_ntop3
Directory
Directory for ntop 3.x data files
this directory will NOT be removed by the remove script!
see also Using a persistent data directory for ntop
/var/tmp/config
Directory
Directory used by cfg2html
this directory will NOT be removed by the remove script!



back to top

Using a persistent home directory for JWM


To use a persistent home directory for JWM set the environment variable JWM_HOME before starting JWM.



back to top

Sample script to automatically start JWM after a reboot


# start/stop script for JWM
#
# This is a sample start script to start JWM automatically after reboot
#
# Be aware that
#
# - this only works with a persistent JWM home dir which must be initialized once
#   via the JWM start scripts
#
# - you should use a fix DISPLAY_NUMBER
#
JWM_BASEDIR=/applications/tools

JWM_HOME=/home/jwm

DISPLAY_NUMBER=50

export JWM_HOME DISPLAY_NUMBER

# set XSERVER_GEOMETRY to the window size
# XSERVER_GEOMETRY=1960x900

case $1 in

  start )
    cd "${JWM_BASEDIR}"
    ./vnc_with_jwm.sh ${XSERVER_GEOMETRY}
# or
#   ./vnc_with_jwm_and_ssh.sh ${XSERVER_GEOMETRY}
    ;;

  stop )
    STOP_SCRIPT="/tmp/stop_jwm.${DISPLAY_NUMBER}.sh"
    [ -x "${STOP_SCRIPT}" ] && ${STOP_SCRIPT}
    ;;

  * ) echo "Usage: $0 [start|stop]"
      exit 5
    ;;

esac



Back to top    

Using a persistent data directory for darkstat

The data directory used for darkstat is /tmp/jwm_darkstat.  The data in this directory is not persistent (that's because /tmp is mounted on swap).
To use a persistent data directory for darkstat do


Note: You must do this after every reboot.

Or call darkstat manually with the parameter --chroot, e.g.

darkstat -i  e1000g0 -p 9003 --chroot /var/tmp --pidfile /var/run/darkstat_e1000g0.pid



Back to top

Using a persistent data directory for ntop3


The data directory used for ntop 3.x  is /tmp/jwm_ntop3.  The data in this directory is not persistent (that's because /tmp is mounted on swap).
To use a persistent data directory for ntop 3.x do

Note: You must do this after every reboot.



Back to top

swat internals

The monitor files for swat are in the directory

${JWM_BASEDIR}/jwm/swat/monitor_data/<hostname>



Environment variables used by JWM


The following table lists some of the environment variables used in JWM -- for all environment variables see the scripts used to start JWM, especially

${JWM_BASEDIR}/jwm/jwm_env.


Environment variable
use existing variable (yes/no)?
Default
Content
ROOT_CMD_PREFIX
yes
pfexec if it's available via PATH
prefix for all commands




VNC_TIMEOUT
yes
0
Timeout for the VNC clients
XSERVER_OPTIONS
yes
-p 0 -s 0 -AlwaysShared -Protocol3.3 -httpd ${JWM_BASEDIR}/jwm/vnc/bin/java  -IdleTimeout=${VNC_TIMEOUT}
add. options for the X Server
XSERVER_GEOMETRY
yes
1200x800
VNC viewer window size
XTERM_OPTIONS
yes
-sb -sl 10000
add. options for the xterm
XTERM_BINARY
yes
${JWM_BASEDIR}/jwm/tools/bin/xterm
xterm to use




JWM_BASEDIR
no
JWM installation directory
JWM installation directory
JWM_VERSION
no
JWM version
JWM version




WRAPPER_SCRIPT
no
${JWM_BASEDIR}/jwm/tools/scripts/execute"
execute a script or binary and wait only if the RC is not zero
WRAPPER_WAIT_SCRIPT
no
${JWM_BASEDIR}/jwm/tools/scripts/execute_and_wait"
execute a script or binary and wait for a key press after execution
WRAPPER_PAGE_SCRIPT
no
${JWM_BASEDIR}/jwm/tools/scripts/execute_and_page
execute a script or binary and pipe the output to the PAGER program
PAGER

less if found else mor
PAGER program used
SSH_BINARY
yes
/usr/bin/ssh
SSH binary for the ssh tunnel
DISPLAY_NUMBER
yes
use the next free DISPLAY NUMBER
display number for VNC








Back to top

Additional information




Trouble Shooting



Solaris commands complain about wrong libraries

Some standard Solaris commands do not work with the libraries in the JWM library directories - these commands do not work in JWM sessions out of the box.

To get around these limitations use either

LD_LIBRARY_PATH=  <solaris_command>

or, if the LD_LIBRARY_PATH setting from before calling jwm is necessary,

LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}  <solaris_command>

e.g

LD_LIBRARY_PATH=${OLD_LIB_LIBRARY_PATH} zoneadm list



Links to other resources


My homage page: http://bnsmb.de

http://wikis.sun.com/display/Performance/Home

http://bnsmb.de/linux/JWM_Linux_documentation.html


Back to top