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 = echo "Used\tAvailable\tCapacity\tMounted\tType"; df -k | nawk 'NR>1 { cmd="stat -f -c %T " $6; cmd | getline fs_type; close(cmd); print $3, $4, $5, $6, fs_type }'

Used    Available       Capacity        Mounted Type
6140090 136777408 5% / zfs
0 0 0% /devices devfs
0 0 0% /dev dev
0 0 0% /system/contract ctfs
0 0 0% /proc proc
0 0 0% /etc/mnttab mntfs
1632 922156 1% /system/volatile tmpfs
0 0 0% /system/object objfs
0 0 0% /etc/dfs/sharetab sharefs
6140090 136777408 5% /lib/libc.so.1 zfs
0 0 0% /dev/fd fd
3431068 136777408 3% /var zfs
24 922156 1% /tmp tmpfs
440449 136777408 1% /var/share zfs
32 136777408 1% /export zfs
3506107 136777408 3% /export/home zfs
34 136777408 1% /export/home/sysadmin zfs
4753 136777408 1% /rpool zfs
31 136777408 1% /system/zones zfs
32 136777408 1% /var/share/pkg zfs
31 136777408 1% /var/share/pkg/repositories zfs

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,pid,args
COMMAND  %CPU %MEM   PID COMMAND
sched     0.0  0.0     0 sched
zpool-rp  0.0  0.0     5 zpool-rpool
kmem_tas  0.0  0.0     6 kmem_task
init      0.0  0.1     1 /usr/sbin/init
pageout   0.0  0.0     2 pageout
fsflush   0.1  0.0     3 fsflush
intrd     0.0  0.0     7 intrd
vmtasks   0.0  0.0     8 vmtasks
postwait  0.0  0.0     9 postwaittq
ipmgmtd   0.0  0.1    75 /lib/inet/ipmgmtd
svc.star  0.0  0.9    13 /lib/svc/bin/svc.startd
svc.conf  0.1  0.7    15 /lib/svc/bin/svc.configd


Uptime

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


                  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 resident, ...
                    • 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.