Calculation of various attributes in FreeBSD server

Calculation of various attributes in FreeBSD server

Memory Utilization

Command: export UNIX95;top -d 1 -n 2

Sample Output:

last pid: 69468;  load averages:  0.23,  0.13,  0.09  up 439+07:00:37    18:32:00
27 processes:  2 running, 25 sleeping

Mem: 8204K Active, 125M Inact, 100M Wired, 21M Buf, 109M Free
Swap: 410M Total, 13M Used, 397M Free, 3% Inuse

 PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
69461 root          1  28    0 83092K  8196K select   0:00   0.20% sshd
69464 test          1  24    0 83092K  8228K select   0:00   0.20% sshd

Disk Utilization

Command: /bin/df -m

Sample Output:

Filesystem 1M-blocks Used Avail Capacity  Mounted on
/dev/da0a       7525 3248  3675    47%    /
devfs              0    0     0   100%    /dev

CPU Utilization

Command: /usr/bin/vmstat 1 3

Sample Output:

procs  memory       page                    disks     faults         cpu
r b w  avm   fre   flt  re  pi  po    fr   sr da0 cd0   in    sy    cs us sy id
1 0 0 434M  113M    25   0   0   0    27    1   0   0   44    72    20  0  0 99
0 0 0 434M  113M     1   0   0   0     0    2   0   0  162   116   362  0  0 100
0 0 0 434M  113M     1   0   0   0     0    2   0   0  174   122   394  0  0 100

CPU Core

Command: /usr/bin/vmstat -n 0 -P 1 3

Sample Output:

procs  memory       page                      faults        cpu0   
r b w  avm   fre   flt  re  pi  po    fr   sr   in    sy    cs us sy id
1 0 0 434M  113M    25   0   0   0    27    1   44    72    20  0  0 99
0 0 0 434M  113M     3   0   0   0     0    2  216   135   469  0  0 100
0 0 0 434M  113M     0   0   0   0     0    2  112   122   271  0  1 99

Process

Command: /bin/ps -axwwwwwwwwo comm,pcpu,pmem,command|cat

Sample Output:

COMMAND         %CPU %MEM COMMAND
kernel           0.0  0.0 [kernel]
init             0.0  0.0 /sbin/init --
crypto           0.0  0.0 [crypto]
crypto returns   0.0  0.0 [crypto returns]
cam              0.0  0.0 [cam]
mpt_recovery0    0.0  0.0 [mpt_recovery0]
fdc0             0.0  0.0 [fdc0]
sctp_iterator    0.0  0.0 [sctp_iterator]
rand_harvestq    0.0  0.0 [rand_harvestq]
soaiod1          0.0  0.0 [soaiod1]
audit            0.0  0.0 [audit]
idle           100.0  0.0 [idle]
intr             0.0  0.2 [intr]
geom             0.0  0.0 [geom]
soaiod2          0.0  0.0 [soaiod2]
soaiod3          0.0  0.0 [soaiod3]
soaiod4          0.0  0.0 [soaiod4]
pagedaemon       0.0  0.0 [pagedaemon]
vmdaemon         0.0  0.0 [vmdaemon]
pagezero         0.0  0.0 [pagezero]
bufdaemon        0.0  0.0 [bufdaemon]
bufspacedaemon   0.0  0.0 [bufspacedaemon]
syncer           0.0  0.0 [syncer]
vnlru            0.0  0.0 [vnlru]
dhclient         0.0  0.5 dhclient: em0 [priv] (dhclient)
dhclient         0.0  0.6 dhclient: em0 (dhclient)
devd             0.0  0.2 /sbin/devd
unbound          0.0  1.6 /usr/sbin/unbound -c /var/unbound/unbound.conf
syslogd          0.0  0.6 /usr/sbin/syslogd -s
ntpd             0.0  2.9 /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift
sshd             0.0  1.3 /usr/sbin/sshd
sendmail         0.0  1.4 sendmail: accepting connections (sendmail)
sendmail         0.0  0.3 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
cron             0.0  0.2 /usr/sbin/cron -s
moused           0.0  0.6 /usr/sbin/moused -p /dev/psm0 -t auto
sshd             0.0  2.3 sshd: test [priv] (sshd)
sshd             0.0  2.3 sshd: test@pts/0 (sshd)
sshd             0.0  2.3 sshd: test [priv] (sshd)
sshd             0.0  2.3 sshd: test@pts/1 (sshd)
getty            0.0  0.5 /usr/libexec/getty Pc ttyv0
getty            0.0  0.5 /usr/libexec/getty Pc ttyv1
getty            0.0  0.5 /usr/libexec/getty Pc ttyv2
getty            0.0  0.5 /usr/libexec/getty Pc ttyv3
getty            0.0  0.5 /usr/libexec/getty Pc ttyv4
getty            0.0  0.5 /usr/libexec/getty Pc ttyv5
getty            0.0  0.5 /usr/libexec/getty Pc ttyv6
getty            0.0  0.5 /usr/libexec/getty Pc ttyv7
sh               0.0  0.8 -sh (sh)
ps               0.0  0.8 /bin/ps -axwwwwwwwwo comm,pcpu,pmem,command
sh               0.0  0.8 -sh (sh)
sh               0.0  1.0 -sh (sh)

System Uptime

Command: uptime|cut -d ',' -f1,2|tr -s ' ' '^'|cut -d '^' -f 2-

Sample Output:
6:35PM^up^439^days,^7:04


                  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 + ...
                      • 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 ...
                      • 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  ...
                      • Calculation of various attributes in HP UX server

                        CPU Utilization Command: /usr/bin/vmstat 1 3                                                    Sample Output:          procs           memory                   page                              faults       cpu     r     b     w      avm    free  ...