Calculation of various attributes in Sun Solaris server

Calculation of various attributes in Sun Solaris server

CPU Utilization

CPU utilization = command=/usr/bin/vmstat 1 3

 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr cd s0 -- --   in   sy   cs us sy id
 0 0 0 1459384 744528 34 233 0  0  0  0  0 12  0  0  0 2452 1060 1037  1  3 96
 0 0 0 1394368 681056 375 1362 0 0 0  0  0  0  0  0  0 2234 2667 1052  6  3 91
 0 0 0 1394368 680892 0  20  0  0  0  0  0  0  0  0  0 4468  462 1075  1  2 97

UserTime=us
SystemTime=sy
WaitTime=wa
IdleTime=id
RunQueue=r
BlockedProcess=b

CPU Core

CPU Core =command=/usr/bin/vmstat 1 3

 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr cd s0 -- --   in   sy   cs us sy id
 0 0 0 1459384 744528 34 233 0  0  0  0  0 12  0  0  0 2452 1060 1037  1  3 96
 0 0 0 1394368 681056 375 1362 0 0 0  0  0  0  0  0  0 2234 2667 1052  6  3 91
 0 0 0 1394368 680892 0  20  0  0  0  0  0  0  0  0  0 4468  462 1075  1  2 97
-bash-4.1$ /usr/bin/mpstat -p 1 3
 CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  st idl set
   0  116   0    1  2129 1791  528    3   35   11    0   528    1   3   0  96   0
   1  117   0    1   323  107  509    2   35   11    0   532    1   3   0  97   0
 CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  st idl set
   0    0   0    0  4362 4009  431    6   42    6    0  1137   10   3   0  87   0
   1   69   0    1   687  235  766    3   40    3    0   624    2   2   0  96   0
 CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  st idl set
   0 4089   0   19  2895 2308  926   65   97   62    0  2779   10  14   0  76   0
   1 3500   0  104   506  120  734   62  101   48    0  4104   14  14   0  72 

Memory Utilization

Memory utilization =Command= /usr/sbin/swap -l|awk '{TOT+=$4} {FREE+=$5} END {print " total: "TOT "  used: " TOT-FREE}';/usr/sbin/prtconf|grep Memory;vmstat 1 3;kstat zfs:0:arcstats:size | grep size|tr -s ' ' ''|tr -s '\t' '^'
 total: 2097144  used: 0
Memory size: 4092 Megabytes
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr cd s0 -- --   in   sy   cs us sy id
 0 0 0 1459384 744528 34 233 0  0  0  0  0 12  0  0  0 2452 1060 1037  1  3 96
 0 0 0 1397472 683556 11 55  0  0  0  0  0  0  0  0  0 3959  626 1023  1  2 97
 0 0 0 1397472 683472 0   0  0  0  0  0  0  0  0  0  0 3022  574 1020  1  2 98
^size                            2138425680

Memory Utilization MB= /usr/sbin/swap -l|awk '{TOT+=$4} {FREE+=$5} END {print " total:" TOT "  used: " TOT-FREE}';/usr/sbin/prtconf|grep Memory;vmstat 1 3;kstat zfs:0:arcstats:size | grep size|tr -s ' ' ''|tr -s '\t' '^'

 total:2097144  used: 0
Memory size: 4092 Megabytes
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr cd s0 -- --   in   sy   cs us sy id
 0 0 0 1459384 744528 34 233 0  0  0  0  0 12  0  0  0 2452 1060 1037  1  3 96
 1 0 0 1390836 677576 373 1310 0 0 0  0  0  5  0  0  0 3295 3295 1115  6 52 42
 0 0 0 1390948 677304 0  20  0  0  0  0  0  0  0  0  0 2907  517 1082  0 50 49
^size                            2139325904

Disk Utilization

Disk utilization = /usr/bin/df -k |awk '{print $3 " " $4  " " $5 " " $6}'

Used Available Capacity Mounted
3200920 145533173 3% /
0 0 0% /devices
0 0 0% /dev
0 0 0% /system/contract
0 0 0% /proc
0 0 0% /etc/mnttab
1636 1394428 1% /system/volatile
0 0 0% /system/object
0 0 0% /etc/dfs/sharetab
3200920 145533173 3% /lib/libc.so.1
0 0 0% /dev/fd
1462059 145533173 1% /var
0 1394428 0% /tmp
102744 145533173 1% /var/share
32 145533173 1% /export
3348 145533173 1% /export/home
34 145533173 1% /export/home/sysadmin
4753 145533173 1% /rpool
31 145533173 1% /system/zones
32 145533173 1% /var/share/pkg
31 145533173 1% /var/share/pkg/repositories

Disk IO Statistics

Disk IO statistics  iostat -Ix;echo '-----DISK_EXTENDED_STATS-----';iostat -x 1 3

                 extended device statistics                 
device    r/i    w/i   kr/i   kw/i wait actv  svc_t  %w  %b 
cmdk0  32817942.0 236529595.0 186571237.0 1407714773.0  0.0  0.0    0.5   0   0 
sd0      11.0   10.0    0.4    0.0  0.0  0.0    0.0   0   0 
-----DISK_EXTENDED_STATS-----
                 extended device statistics                 
device    r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b 
cmdk0     1.5   10.9    8.6   64.8  0.0  0.0    0.5   0   0 
sd0       0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 
                 extended device statistics                 
device    r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b 
cmdk0     0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 
sd0       0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 
                 extended device statistics                 
device    r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b 
cmdk0     0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 
sd0       0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 

Process  /bin/ps -eo fname,pcpu,pmem,args

COMMAND  %CPU %MEM COMMAND
sched     0.0  0.0 sched
zpool-rp  0.1  0.0 zpool-rpool
kmem_tas  0.0  0.0 kmem_task
init      0.0  0.1 /usr/sbin/init
pageout   0.0  0.0 pageout
fsflush   0.1  0.0 fsflush
intrd     0.0  0.0 intrd
vmtasks   0.0  0.0 vmtasks
postwait  0.0  0.0 postwaittq
dlmgmtd   0.0  0.1 /usr/sbin/dlmgmtd
svc.star  0.0 11.3 /lib/svc/bin/svc.startd
svc.conf  0.2  1.5 /lib/svc/bin/svc.configd
python2   0.8  2.4 /opt/site24x7/venv/bin/python /opt/site24x7/monagent/lib/devops/source/python3.
in.mpath  0.0  0.0 /lib/inet/in.mpathd
ipmgmtd   0.0  0.1 /lib/inet/ipmgmtd
netcfgd   0.0  0.1 /lib/inet/netcfgd
pfexecd   0.0  0.1 /usr/lib/pfexecd
zonestat  0.0  0.0 /usr/lib/zones/zonestatd
picld     0.0  0.1 /usr/lib/picl/picld
kcfd      0.1  0.6 /lib/crypto/kcfd
rpcbind   0.0  0.1 /usr/sbin/rpcbind
hald      0.0  0.1 /usr/lib/hal/hald --daemon=yes
login     0.1  0.1 login -p -h app-support-w10.csez.zohocorpin.com -d /dev/pts/3 --
dbus-dae  0.0  0.1 /usr/lib/dbus-daemon --system
bash      0.0  0.1 -bash
cron      0.0  0.1 /usr/sbin/cron
hotplugd  0.0  0.0 /usr/lib/hotplugd
in.ndpd   0.0  0.1 /usr/lib/inet/in.ndpd
vbiosd    0.0  0.0 /usr/sbin/vbiosd
nwamd     0.0  0.1 /lib/inet/nwamd
rad       0.0  0.0 /usr/lib/rad/rad -sp
utmpd     0.0  0.0 /usr/lib/utmpd
sysevent  0.0  0.1 /usr/lib/sysevent/syseventd
sshd      0.0  0.2 /usr/lib/ssh/sshd
dhcpagen  0.0  0.1 /sbin/dhcpagent
inetd     0.1  0.2 /usr/lib/inet/inetd start
asr-noti  0.0  0.0 /usr/lib/fm/notify/asr-notify
iscsid    0.0  0.0 /lib/svc/method/iscsid
cupsd     0.0  0.1 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
syslogd   0.0  0.1 /usr/sbin/syslogd
devfsadm  0.2  0.1 /usr/lib/devfsadm/devfsadmd
hald-add  0.0  0.1 /usr/lib/hal/hald-addon-storage
hald-run  0.0  0.1 hald-runner
sshd      0.0  0.1 /usr/lib/ssh/sshd
login     0.0  0.1 /usr/bin/login
hald-add  0.0  0.1 /usr/lib/hal/hald-addon-cpufreq
hald-add  0.0  0.1 /usr/lib/hal/hald-addon-acpi
fmd       0.4  0.5 /usr/lib/fm/fmd/fmd
auditd    0.0  0.1 /usr/sbin/auditd
nfsmapid  0.0  0.1 /usr/lib/nfs/nfsmapid
ttymon    0.0  0.1 /usr/sbin/ttymon -g -d /dev/vt/2 -l console -m ldterm,ttcompat -h -p ctl-solari
ttymon    0.0  0.1 /usr/sbin/ttymon -g -d /dev/vt/3 -l console -m ldterm,ttcompat -h -p ctl-solari
ttymon    0.0  0.0 /usr/sbin/ttymon -g -d /dev/vt/5 -l console -m ldterm,ttcompat -h -p ctl-solari
bash      0.0  0.1 -bash
vtdaemon  0.0  0.1 /usr/lib/vtdaemon -c 16
ttymon    0.0  0.1 /usr/sbin/ttymon -g -d /dev/vt/6 -l console -m ldterm,ttcompat -h -p ctl-solari
ttymon    0.0  0.1 /usr/sbin/ttymon -g -d /dev/vt/4 -l console -m ldterm,ttcompat -h -p ctl-solari
in.telne  0.1  0.1 /usr/sbin/in.telnetd
nmz       0.0  0.1 /usr/lib/ocm/ccr/bin/nmz
rmvolmgr  0.0  0.1 /usr/lib/rmvolmgr -s
devchass  0.0  0.1 /usr/lib/devchassis/devchassisd
smtp-not  0.0  0.1 /usr/lib/fm/notify/smtp-notify
ps        0.1  0.1 /bin/ps -eo fname,pcpu,pmem,args
in.telne  0.0  0.1 /usr/sbin/in.telnetd
automoun  0.0  0.1 /usr/lib/autofs/automountd
bash      0.3  0.1 -bash
mpstat    0.1  0.1 /usr/bin/mpstat -p 1 3
login     0.0  0.1 login -p -h selva-6311.csez.zohocorpin.com -d /dev/pts/1 --
python2   0.1  0.3 /opt/site24x7/venv/bin/python /opt/site24x7/monagent/lib/devops/source/python3.
automoun  0.0  0.1 /usr/lib/autofs/automountd
nscd      0.1  0.1 /usr/sbin/nscd
sshd      0.0  0.1 /usr/lib/ssh/sshd
bash      0.0  0.1 -bash
sendmail  0.0  0.1 /usr/lib/sendmail -Ac -q15m

Uptime

Uptime = command =  uptime|cut -d ',' -f1,2|tr -s ' ' '^'|cut -d '^' -f 2-
6:24pm^up^251^day(s),^6:12


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • Calculation of various attributes in Linux server

                        Physical memory utilization Command: free -m Sample Output: total used free shared buff/cache available Mem: 16338247680 6590242816 1372995584 662192128 8375009280 8734982144 Swap: 100 10 0 Calculation: Physical memory % = 100 -(((MemFree + Buffers + ...
                      • How is Memory Utilization calculated in SUN Solaris server?

                        Memory Calculation We run the below command to check if the SUN server is a zone-supported server:  /usr/bin/prstat -n 1 -Z 1 1 2> /dev/null|grep -v "PID"|grep -v "Total:"  If the command gives the proper output then we conclude that the server is ...
                      • Calculation of various attributes in AIX server

                        Page Space Command: lsps -a Sample Output: Page Space      Physical Volume   Volume Group       Size       %Used       Active     Auto        Type       Chksum ...
                      • Calculation of various attributes in MACOS server

                        Memory Utilization Command: export UNIX95;top -l 1 -n 2 Sample Output: Processes: 154 total, 2 running, 152 sleeping, 600 threads  2020/03/04 14:49:04 Load Avg: 1.46, 1.60, 1.62  CPU usage: 5.40% user, 8.10% sys, 86.48% idle  SharedLibs: 202M ...
                      • How is CPU Utilization calculated in the SUN Solaris Server?

                        In SUN Solaris Server, CPU Utilization is calculated based on Idlecputime. Idlecputime is calculated from the command vmstat 1 3 and it is subtracted from 100 to find the CPUUtilization.