#! /bin/sh
# ux2html
#
# Unix Systems Configuration HTML Report
#
# ux2html collect information from almost all Unix boxes:
# Linux/GNU, SunOS/Solaris, AIX, HP-UX, Darwin/OSX, Cygwin, System V, Android, Tru64, NonStop-UX, ...
# The script is very flexible with customizable parameters and plug-in support
#
# Usage:
# Install the script under /usr/local/amm directory then execute it as root user:
# sh ux2html.sh > outputfile.html 2>/dev/null
#
# Author: Bartolomeo Bogliolo mail@meo.bogliolo.name
#
# Notes:
# Running the script requires root privileges for best results
#
# Customization can be performed setting parameters in (in order of precedence):
# ux2c-`hostname`.sh (suggested)
# ux2c.sh (suggested only when pre-configuring installations)
# ux2html.sh (not suggested)
# or adding custom plug-ins (ux2p* files are plug-ins)
#
# Change history:
# 23 May 95 1.0.0 meo First release (dethtml.cmd)
# 1 May 96 1.1.0 meo More info: Security, Oracle, ...
# 1 May 98 1.2.0 meo First HTML release
# ... meo Additional Unix OS support (almost all Unix flavours)
# 25 Dec 05 1.2.33 meo Last dethtml.cmd release; Cygwin support
# 1 Apr 06 1.3.0 meo First ux2html.sh release; self contained pure Bourne shell, HTML 4.01, plug-ins, ...
# 1 May 06 1.3.1 meo Minor graphical changes and bug fixing; more OS specific infos
# 1 Apr 09 1.3.2 meo More plugins
# 1 Jan 10 1.3.3 meo MAC OS X info
# 1 Apr 12 1.3.4 meo HTML5, generated file list
# 1 Sep 12 1.3.5 meo Plug-in updates
# 1 Jan 13 1.3.6 meo System Security Files
# 1 Jan 15 1.3.7 meo Several plug-in updates (eg default DB plugin: Oracle 11g+, MySQL 5.6+, Postgres 9.2+, ...)
# 1 Jan 17 1.3.8 meo Plug-in updates, XMP tag, new CSS
# 1 Jan 18 1.3.9 meo Plug-in updates
# 1 Feb 18 1.3.10 meo Multiple execution paths
# 1 Jan 19 1.3.11 meo Variable setting for standalone execution
# 1 Apr 19 1.3.12 meo Plugin updates
# 1 Aug 19 1.3.13 meo Plugin updates. (a) More security file checked
# 1 Jan 20 1.3.14 meo Plugin updates
# 3 Sep 22 1.3.15 meo Several plugin updates, some due to egrep/fgrep explicit deprecation in GNU egrep 3.8
VERSION=1.3.15
# Copyright 1995-2022 mail@meo.bogliolo.name
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## Custom configuration NB can be superseeded by other configuration files
SUMMARY=0
SUMMARY_MENU=0
ENABLE_CUSTOM=1
ENABLE_PLUGIN=1
TMP_FILE=.tmp_file
INST_DIR=/usr/local/amm
HTML_DIR=/usr/local/amm
LOC_DIR=/usr/local/amm
export INST_DIR HTML_DIR LOC_DIR
## Utility functions
break_lines()
{
while true
do
read a
if [ $? -ne 0 ]
then
break
fi
echo "
" "$a"
done
}
table_row()
{
awk '{ print "
", $1, " | ", $2, " | ", $3, " | ", $4, " | ", $5, " | ", $6, " | ", $7, " | ", $8, " | ", $9, " | ", $10 }' echo " |
", $1, " | ", $2, " | ", $3, " | ", $4, " | ", $5, " | ", $6, " | ", $7 }' echo " |
'; dladm show-phys; echo '
'; netstat -an" HW_NET='ifconfig -a' if [ -x /usr/platform/`uname -m`/sbin/prtdiag ] then HW_DIAG='/usr/platform/`uname -m`/sbin/prtdiag -v' HW_MEM='/usr/platform/`uname -m`/sbin/prtdiag -v | grep Memory | grep -v =====' fi if [ -x /usr/kvm/prtdiag ] then HW_DIAG='/usr/kvm/prtdiag -v' HW_MEM='/usr/kvm/prtdiag -v | grep Memory | grep -v =====' fi SWAP='swap -l; swap -s' DU='du -sk' MAC_DET='uname -a ; showrev' PKG='pkginfo' PATCH='showrev -p' LICENSE='cat /etc/opt/licenses/licenses_combined' KERNEL='cat /etc/system; echo; sysdef -i' NFS='cat /etc/dfs/sharetab /etc/dfs/dfstab; echo; showmount -a' WHO='who /var/adm/wtmpx | tail -$ERRLEN; echo; tail -$ERRLEN /var/adm/sulog' zoneadm list > /dev/null 2>&1 RES=$? if [ $RES -eq 0 ] then ETC_PAR='zoneadm list -cv' fi ## HP HP-UX elif [ $SYSTYPE = HPUX -o $SYSTYPE = HP-UX ] then MAC_TYPE='HP HP-UX' MAC_TYPE=`echo HP-UX; model` HW_PROC=' ioscan -kC processor; echo; /usr/sbin/icod_stat ' HW_MEM=' head -l -n 200 /var/adm/syslog/syslog.log|grep Physical|grep avail|cut -c 35-' DF='bdf | sed -e "s/Mounted on/Mounted_on/g" ' VOL_TOT="vgdisplay | grep -E 'VG Name|PE Size|Total PE|Free PE'" VOL='vgdisplay -v' # On hpux 11.23 rad -> olrad HW_DEVICE='ioscan -fkn; rad -q' HW_DISK='ioscan -kC disk' FC_DISK='fcmsutil /dev/fcd0 ; fcmsutil /dev/fcd1' HW_NET="lanscan; echo '
'; HP_lan_scan" PKG='swlist -l bundle' PATCH=swlist # On hpux 11.23 kmtune -> kctune KERNEL='kmsystem ; echo; kmtune; echo; echo Kernel Loadable Modules ; kmadmin -s; echo; crashconf -v' if [ `uname -r` = A.09.04 ] then SW_DIAG='tail -$ERRLEN /usr/adm/syslog; tail -$ERRLEN /var/adm/shutdownlog' PKG='ls /etc/filesets' WHO='who /etc/wtmp | tail -$ERRLEN' else SW_DIAG='tail -$ERRLEN /var/adm/syslog/syslog.log; tail -$ERRLEN /var/adm/shutdownlog' WHO='who /var/adm/wtmp | tail -$ERRLEN' fi SWAP='swapinfo' NETA="netstat -i; echo '
'; netstat -an"
cmviewcl > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
ETC_CLU='echo "HP Cluster ServiceGuard";echo;cmviewcl'
DET_CLU='cmviewcl -v'
LOG_CLU='ls -l /etc/cmcluster/*/*.log /var/adm/syslog/syslog.log'
fi
parstatus -s > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
ETC_PAR='parstatus'
vparstatus > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
if [ $SUMMARY -eq 0 ] ; then
ETC_PAR='echo Hardware Partitioning;parstatus;echo;echo Virtual Partitioning;vparstatus -v'
else
ETC_PAR='echo Hardware Partitioning;parstatus;echo;echo Virtual Partitioning;vparstatus'
fi
fi
else
vparstatus > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
if [ $SUMMARY -eq 0 ] ; then
ETC_PAR='echo Virtual Partitioning;vparstatus -v'
else
ETC_PAR='echo Virtual Partitioning;vparstatus'
fi
fi
fi
BOOT='cat /etc/inittab;echo;echo RC2;ls -lL /sbin/rc2.d;echo;echo RC3;ls -lL /sbin/rc3.d'
## Tandem NON-STOP UX
elif [ $SYSTYPE = tandem -o $SYSTYPE = "NonStop-UX" ]
then
MAC_TYPE='HP/Compaq/Tandem NON-STOP UX'
DF='df -k | sed -e "s/Mounted on/Mounted_on/g" | grep -v /proc '
VOL='volprint -th'
HW_DEVICE=cfiolist
HW_DIAG='cfstatus'
SW_DIAG='lcat /var/adm/messages | tail -$ERRLEN'
SWAP='swap -l'
## IBM AIX
elif [ $SYSTYPE = AIX ]
then
MAC_TYPE='IBM AIX'
DF='df -k | sed -e "s/Mounted on/Mounted_on/g" '
IP='grep `uname -n` /etc/hosts ; lssrc -a'
# cpu_state (Model: G, J, R)
cpu_state -l > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
HW_PROC='cpu_state -l; echo; lsdev -C -c processor'
else
HW_PROC='lsdev -C -c processor'
fi
HW_MEM='lsdev -C | grep mem; lsattr -El mem0'
HW_DEVICE='lsdev -C -H'
# lsattr -E -l
HW_DISK='lsdev -C -c disk'
FC_DISK='AIX_fc_scan'
# FCA = ... fcstat fcs0 ...
VOL_TOT='lsvg -o'
# datapath query essmap ; lsvpcfg
VOL='lsvg -o | lsvg -i -l | sed -e "s/LV /LV_/g" '
SWAP='lsps -a'
PKG='lslpp -l'
LICENSE='lslicense'
HW_NET='ifconfig -a; echo; netstat -i'
SW_DIAG='errpt -a | head -$ERRLEN'
ETC_CLU='lssrc -g cluster;echo;cllsgrp'
DET_CLU='clshowres'
ETC_PAR='lparstat; lparstat -i'
KBOOT='echo BootList; bootlist -m normal -o'
BOOT='cat /etc/inittab;echo;echo RC2;ls -lL /etc/rc.d/rc2.d'
KERNEL='oslevel; echo;echo VirtualMemory_Options;vmo -a; echo Network_Options;no -a; echo NFS_Options;nfso -a; echo IO_Options;ioo -a; echo Reliability_Options;raso -a; echo Scheduling_Options;schedo -a '
# PATCH='echo "ML/TL:"; oslevel -r;echo "
"; oslevel -s|grep 00; echo; instfix -ik'
PATCH='echo "ML/TL:"; oslevel -r;echo "
"; oslevel -s|grep 00'
MAC_DET='uname -a; uname -M'
NFS='cat /etc/exports; echo ; showmount -a'
WHO='who -m /var/adm/wtmp | tail -$ERRLEN'
## Digital Unix OSF1 - Compaq Tru64 - HP Tru64
elif [ $SYSTYPE = OSF1 ]
then
MAC_TYPE='HP/Compaq/Digital Digital Unix/OSF1/Tru64'
DF='df -k | sed -e "s/Mounted on/Mounted_on/g" | grep -v /proc '
HW_PROC='psrinfo -v; consvar -v -d'
HW_MEM='uerf -r 400 | grep -i mem'
HW_DEVICE='scu scan edt > /dev/null; scu show edt'
HW_DISK='echo "See Device Section"'
VOL_TOT=' ls /etc/fdmns | xargs showfdmn -k '
VOL='volprint -Ath'
VXDG='voldg'
VXPRINT='volprint'
SWAP='swapon -s'
PKG='setld -i'
PATCH='uname -v'
LICENSE='lmf list'
HW_NET='ifconfig -a'
HW_DIAG='uerf -R | head -$ERRLEN'
asemgr -d > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
ETC_CLU='echo "HP Cluster ASE Tru64";echo;asemgr -d'
DET_CLU='asemgr -d -C'
fi
caa_stat > /dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
ETC_CLU='echo "HP Cluster CAA Tru64";echo;caa_stat -t'
DET_CLU='caa_stat -t -v; echo; echo; caa_stat -f'
fi
if [ `uname -r` = V5.1 ]
then
HW_DEVICE='scu scan edt > /dev/null; scu show edt; dsfmgr -vV;hwmgr -show scsi -full'
fi
KERNEL='cat /etc/sysconfigtab'
BOOT='cat /etc/inittab;echo;echo RC2;ls -lL /sbin/rc2.d;echo;echo RC3;ls -lL /sbin/rc3.d'
MAC_DET='uname -a ; sizer -v'
## Sequent NUMA
elif [ $SYSTYPE = DYNIX/ptx ]
then
MAC_TYPE='Numa Unix'
DF='df -k | cat'
HW_DISK='echo "See Device Section"'
SWAP='swap -l; swap -f'
HW_NET='ifconfig -a'
SW_DIAG='tail -$ERRLEN /usr/adm/messages'
VXDG=vxdg
VXPRINT=vxprint
VOL='vxprint -Ath'
## Linux/GNU
elif [ $SYSTYPE = Linux ]
then
MAC_TYPE='Linux / GNU'
MAC_DET='uname -a ; dmidecode|grep Vendor|grep -v Syndrome;dmidecode|grep Manufacturer|head -1;dmidecode|grep Product|head -1' # dmidecode -q -t system does not work with RH 4.x
DF='df -kP | sed -e "s/Mounted on/Mounted_on/g" | sed -e "s/^ /./" | grep -v /proc '
SWAP='swapon -s'
IPC='ipcs -a;echo;ls -al /dev/shm'
PS='ps -efaww'
TAILFROM='-n'
PKG='rpm -aq --queryformat "%{NAME}-%{VERSION}-%{RELEASE} %{ARCH}\n"|sort'
REPO='echo;yum repolist; echo; yum check-update'
which dpkg >/dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
PKG="dpkg -l"
fi
PATCH='uname -v -r;echo "
"; cat /etc/redhat-release ; cat /etc/SuSE-release; cat /etc/debian_version; cat /etc/lsb-release; cat /etc/issue; echo "
"; rpm -q kernel 2>/dev/null; rpm -qa | grep release'
NETA="netstat -i; echo '
'; netstat -an"
HW_NET='ifconfig -a; echo; ethtool eth0; echo; mii-tool 2>/dev/null; echo; cat /proc/net/bonding/*; echo; brctl show ; bridge vlan show 2>/dev/null'
ROUTE='netstat -rn; echo; echo ARP table; arp -a; echo; echo IP table; iptables -L'
if [ $SUMMARY -eq 0 ] ; then
HW_PROC="uname -p; echo;cat /proc/cpuinfo| grep -E 'model name|processor|bogo|cpu|cache'"
else
HW_PROC="uname -p; echo;cat /proc/cpuinfo| grep -E 'model name'"
fi
HW_MEM='free -t; echo Meminfo; cat /proc/meminfo; echo;echo NUMA; numactl --hardware; echo; echo PS; ps aux --sort -rss | head -50'
HW_DISK='(echo "IDE";echo "p"|fdisk /dev/hda;\
echo;echo "
SCSI";echo "p"|fdisk /dev/sda;\
echo;echo "
ESDI";echo "p"|fdisk /dev/eda;\
echo;echo "
XT";echo "p"|fdisk /dev/xda;\
echo;echo "
Configuration"; cat /proc/scsi/*/*) 2>/dev/null |grep -v "Command" | grep -v "EOF" | grep -v Unable'
# Useful: cat /proc/partitions; dmsetup ls --tree; pvscan ;
HW_DISK='fdisk -l; echo; cat /proc/scsi/*/*; echo; multipath -ll'
HW_DEVICE='echo "PCI";lspci;echo "
USB";lsusb;echo "
Plug&Play";lspnp 2>/dev/null;echo "
BIOS"; dmidecode'
FC_DISK='lspci|grep Fibre; echo WWNs; cat /sys/class/fc_host/host*/node_name /sys/class/fc_host/host*/port_name 2>/dev/null'
SW_DIAG='tail -$ERRLEN /var/log/messages'
LICENSE='echo No Licenses, this is a Linux box!'
HW_DIAG='dmesg'
LP='lpstat -t'
# VOL_TOT='lsraid -D -p '
VOL='lsraid -R -p ; echo; vgdisplay -v; echo; lvm dumpconfig'
CRON_DIR=/var/spool/cron
####### find $CRON_DIR -type f -print -exec cat {} \; -exec echo '
' \;"
CRON_INFO="ls -l /etc/cron*; echo ;ls -l $CRON_DIR; echo; echo 'Crontabs'; echo ; find $CRON_DIR -type f -print -exec cat {} \;"
KERNEL='cat /etc/modprobe.conf;echo;sysctl -a'
ETC_CLU='clustat; echo; mkqdisk -L'
DET_CLU='clustat -l ; echo ;cman_tool nodes; echo ; cat /etc/cluster/cluster.conf'
# cman_tool status nodes services
WHO='who /var/log/wtmp | tail -$ERRLEN; echo; tail -$ERRLEN /var/log/sulog'
BOOT='cat /etc/inittab;echo;echo RC2;ls -lL /etc/rc2.d;echo;echo RC3;ls -lL /etc/rc3.d;echo;chkconfig --list'
LBOOT="who -b;echo;grep 'Booting processor' /var/log/messages* | awk -F : ' { print \$2 \":\" \$3 \":\" \$4 } ' | uniq ; last reboot"
# RHEL7/CentOS7/OEL7 or Fedora20 use systemctl, hostnamectl, ... Please install: net-tools lsof
which systemctl >/dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
BOOT='systemctl list-dependencies; echo; systemctl list-units'
fi
which hostnamectl >/dev/null 2>&1
RES=$?
if [ $RES -eq 0 ]
then
MAC_DET2='hostnamectl status; echo; localectl'
fi
## Darwin
elif [ $SYSTYPE = Darwin ]
then
MAC_TYPE='Darwin / MAC OS X'
DF='df -lh'
SWAP='vm_stat'
PS='ps -feww'
TAILFROM='-n'
PKG='ls /Applications; echo; pkgutil --pkgs'
# lsbom
PATCH='sw_vers'
HW_NET='ifconfig -a; echo; netstat -a'
HW_PROC="hostinfo | grep -i processor; system_profiler SPHardwareDataType | grep -i processor"
HW_MEM='hostinfo | grep -i memory; echo; ls -l /var/vm'
HW_DISK='diskutil list' ## pdisk -l
if [ $SUMMARY -eq 0 ] ; then
# HW_DEVICE='hostinfo; echo; ioreg -bls; echo; system_profiler; echo; nvram -p'
HW_DEVICE='hostinfo; echo; ioreg -bls -d 3; echo; nvram -p'
else
HW_DEVICE='hostinfo'
fi
SW_DIAG='tail -$ERRLEN /var/log/system.log'
LICENSE='echo "N.A."'
HW_DIAG='dmesg'
LP='lpstat -t'
CRON_DIR=/var/spool/cron
CRON_INFO="launchctl list; echo; crontab -l"
KERNEL='launchctl limit; echo; sysctl -a'
WHO='last'
BOOT='ls -lL /System/Library/StartupItems;echo;ls -lL /Library/StartupItems; echo; ls -lL /etc/rc*'
NFS='cat /etc/exports; echo ; showmount -a'
APPL_FSS="/usr /var /Users/* /Users/*/Documents"
## Cygwin
elif [ `echo $SYSTYPE | cut -b 1-6` = CYGWIN ]
then
MAC_TYPE='Cygwin / Windows'
DF='df -k | sed -e "s/Mounted on/Mounted_on/g" | grep -v /proc '
PS='ps -lW'
PKG='ls -l /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE'
PATCH='uname -v -r'
HW_DISK='cat /proc/partitions'
HW_NET='ipconfig'
VMSTAT='cat /proc/loadavg; echo; cat /proc/stat'
if [ $# -eq 0 ] ; then
HW_PROC="cat /proc/cpuinfo| grep -E 'model name|processor|bogo|cpu|cache'"
else
HW_PROC="cat /proc/cpuinfo| grep -E 'model name'"
fi
HW_MEM='cat /proc/meminfo'
SW_DIAG='tail -$ERRLEN /cygdrive/c/windows/WindowsUpdate.log'
HW_DIAG='tail -$ERRLEN /cygdrive/c/windows/setup*.log'
LICENSE='echo GPL'
BOOT='echo Boot information not found'
IPC='echo IPC information not found'
CRON_INFO="at"
LP='prnmngr -l'
## VMWare ESX 4.1
elif [ $SYSTYPE = VMkernel ]
then
MAC_TYPE='VMware VMkernel'
MAC_DET='uname -a'
DF='df -h; vdf; vdu'
PS='ps'
PATCH='uname -v -r'
fi
# VCS can be installed on all boxes!
if [ -f /etc/VRTSvcs/conf/config/main.cf ]
then
PATH=$PATH:/opt/VRTSvcs/bin/:/opt/VRTS/bin/
ETC_CLU='echo "Veritas Cluster VCS";echo;hastatus -sum; echo; lltstat -nvv | grep -v DOWN | grep -v WAIT | grep -v IDLE'
#DET_CLU='hagrp -dep; echo; hares -display -attribute Group ; echo ; cat /etc/VRTSvcs/conf/config/main.cf | sed "s/-/g" | sed "s/>/-/g"'
DET_CLU='cat /etc/VRTSvcs/conf/config/main.cf;echo; hagrp -dep'
LOG_CLU='halog -info'
fi
## Read external custom configuration
G_CONF=0
C_CONF=0
H_CONF=0
if [ $ENABLE_CUSTOM -eq 1 ] ; then
if [ -f ux2c.sh ] ; then
. ./ux2c.sh
G_CONF=1
fi
if [ -f ux2cc.sh ] ; then
. ./ux2d.sh
C_CONF=1
fi
if [ -f ux2c.$MACHINE.sh ] ; then
. ./ux2c.$MACHINE.sh
H_CONF=1
fi
fi
### Printout data collection
## MENU
echo ''
echo '
|
|
|
' ## Printing system info echo '
Statistics generated on: ' date echo 'from: ' pwd echo 'by: ' id echo 'format: ' if [ $SUMMARY -eq 0 ] ; then echo 'detailed' else echo 'summary' fi echo '
General Unix Schema: ux2html.sh v.' $VERSION
if [ $G_CONF -eq 1 ] ; then
echo '+ Custom Configuration '
fi
if [ $H_CONF -eq 1 ] ; then
echo '+ Local Host Custom Configuration'
fi
echo '
This software is released under the'
echo 'GNU General Pubblic License'
echo 'by Meo Bogliolo.'
echo 'See below for more information
' echo '
'
echo "System evaluated as: " $MAC_TYPE ''
echo '
'
echo '
' echo '
' eval $MAC_DET echo '' echo '
Go to the top' echo '
' eval $MAC_DET2 echo '' echo '
Go to the top' if [ $SUMMARY -eq 0 ] ; then echo '
' eval $USERS echo '' echo '
Go to the top' echo '
' eval $GRPS echo '' echo '
Go to the top' echo '
' ls -l $SECF 2> /dev/null echo '
' openssl md5 $SECF 2> /dev/null | break_lines echo '
' # The following line SHOULD BE SKIPPED... more $SECF 2> /dev/null echo '' echo '
Go to the top' fi echo '
' grep -v '^#' $MOUNT_OPT | grep -v '^$' echo '
Go to the top' echo '
VxVM Volume Summary
' vx_tot | table_buildn fi echo '
Go to the top' if [ $SUMMARY -eq 0 ] ; then echo '
' eval $VOL 2> /dev/null echo '' # Veritas VxVM if [ "X$VXPRINT" != "X" ] then echo '
VxVM Volume Details
' $VXPRINT | table_build if [ "X$VXVVR" != "X" ] then echo '
VxVM Performance statistics
' echo '
' vxstat -o alldgs 2> /dev/null echo '' echo '
VVR Details
' echo '
' eval $VXVVR echo '' fi fi echo '
Go to the top' fi echo '
' eval $IP echo '' echo '
' eval $HW_NET echo '' if [ $SUMMARY -eq 0 ] ; then echo '
' eval $HOSTS echo '' echo '
' eval $DNSS echo '' echo '
' eval $ROUTE 2>/dev/null echo '' echo '
' eval $NFS echo '' echo '
' eval $NTP echo '' echo '
Go to the top' echo '
' iftop -t -s 60 2>/dev/null echo '' echo '
Go to the top' fi echo '
' eval $HW_PROC echo '' echo '
Go to the top' echo '
Go to the top' echo '
' if [ $SUMMARY -eq 0 ] ; then eval $HW_DEVICE else eval $HW_DEVICE | head -$DATLEN echo '...' fi echo '' echo '
Go to the top' if [ $SUMMARY -eq 0 ] ; then echo '
' eval $HW_DISK echo echo '' echo 'Storage Extended Infos
' eval $HW_DISK2 echo '
Go to the top' echo '
' eval $FC_DISK echo '' echo '
Go to the top' fi echo '
Go to the top' echo '
' eval $ETC_PAR 2>/dev/null echo '' echo '
Go to the top' echo '
' eval $SWAP echo '' echo '
Go to the top' echo '
' for i in $APPL_FSS do eval $DU $i/* | sort -rn 2>/dev/null done echo '' echo '
Go to the top' if [ $SUMMARY -eq 0 ] ; then echo '
' eval $LP echo '' echo '
Go to the top' echo '
' eval $PKG eval $REPO echo '' echo '
Go to the top' echo '
' eval $LICENSE which vxlicrep > /dev/null 2> /dev/null RES=$? if [ $RES -eq 0 ] then echo '' echo '' vxdctl license echo '
' # Very OLD (VxVM 3.2): /sbin/vxlicense -p vxlicrep fi echo '
Go to the top' echo '
' eval $KERNEL echo '' echo '
Go to the top' echo '
' eval $PATCH echo '' echo '
Go to the top' echo '
' eval $KBOOT echo '
' eval $BOOT echo '' echo '
Go to the top' echo '
Go to the top' echo '
Go to the top' fi echo '
' eval $ETC_CLU echo '' echo '
' eval $LOG_CLU echo '
Go to the top' echo '
Go to the top' echo '
' eval $WHO echo '' echo '
' eval $LASTB echo '
' eval $AUREP echo '
Go to the top' if [ $SUMMARY -eq 0 ] ; then echo '
' eval $SW_DIAG echo '' echo '
Go to the top' echo '
' eval $HW_DIAG echo '' echo '
Go to the top' fi echo '
' # nlwp to check threads; jstack PID to check java threads ps -e -o user,vsz,rss,sz,size | tail $TAILFROM +2 | sort | \ awk ' BEGIN {u=69;c=0;m=0;uu=0;mm=0;m2=0;m3=0;m4=0;mm2=0;mm3=0;mm4=0} { if ($1 != u) { if (u == 69) { print "User", "Count", "VirtualSize", "ResidentSize", "PhysicalSize", "WriteSize" } else { print u,c,m,m2,m3,m4; } u=$1;c=1;m=$2;m2=$3;m3=$4;m4=$5;mm=mm+$2;mm2=mm2+$3;mm3=mm3+$4;mm4=mm4+$5;uu=uu+1 } else { c=c+1; m=m+$2;mm=mm+$2;m2=m2+$3;mm2=mm2+$3;m3=m3+$4;m4=m4+$5;mm3=mm3+$4;mm4=mm4+$5;uu=uu+1 } } END { print u,c,m,m2,m3,m4 ; printf "Total(MB) %.0f %.0f %.0f %.0f %.0f \n",uu,mm/1024,mm2/1024,mm3/1024,mm4/1024 }' | table_buildn else eval $PSL | tail $TAILFROM +2 | awk ' { print $3 , $10 } '| sort | \ awk ' BEGIN {u=69;c=0;m=0;uu=0;mm=0} { if ($1 != u) { if (u == 69) { print "User", "Count", "Memory" } else { print u,c,m; } u=$1; c=1; m=$2;mm=mm+$2;uu=uu+1 } else { c=c+1; m=m+$2;mm=mm+$2;uu=uu+1 } } END { print u,c,m ; print "Total",uu,mm }' | table_buildn fi echo '
' if [ $SYSTYPE = HPUX -o $SYSTYPE = HP-UX ] ; then netstat -an | grep tcp | cut -b69-80 | sort | uniq -c elif [ $SYSTYPE = Solaris -o $SYSTYPE = SUN -o $SYSTYPE = SunOS ] ; then netstat -an -P tcp | awk ' { print $7 } ' | sort | uniq -c elif [ $SYSTYPE = Linux ] ; then netstat -an | grep tcp | awk ' { print $6 } ' | sort | uniq -c elif [ $SYSTYPE = AIX ] ; then netstat -an | grep tcp | cut -b68-80 | sort | uniq -c fi echo '' echo '
Go to the top' if [ $SUMMARY -eq 0 ] ; then echo '
Go to the top' echo '
' eval $VMSTAT echo '' echo '
Go to the top' echo '
' eval $IPC echo '' echo '
Go to the top' echo '
' eval $NETA echo '' echo '
Go to the top' echo '
' eval $SERVS | awk ' { print $3 , $1 , $9 } ' | sort | uniq 2> /dev/null echo eval $SERVS2 echo '' echo '
' eval $CRON_INFO echo '' echo '
Go to the top' fi echo '
Go to the top' echo '
UX2HTML - Unix Configuration Report in HTML format'
echo '
Copyright (C) 1995-2022 Meo Bogliolo'
echo '
Statistics generated on: '
date
echo '
'
echo ' This program is free software; you can redistribute it and/or modify'
echo ' it under the terms of the GNU General Public License as published by'
echo ' the Free Software Foundation; either version 3 of the License, or'
echo ' (at your option) any later version.'
echo '
'
echo ' This program is distributed in the hope that it will be useful,'
echo ' but WITHOUT ANY WARRANTY; without even the implied warranty of'
echo ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the'
echo ' GNU General Pubblic License'
echo ' for more details.'
echo '
' echo 'Sources: Sourceforge.' echo '' echo '' exit 0