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,pid,command|cat

Sample Output:
COMMAND        %CPU %MEM  PID COMMAND
kernel          0.0  0.0    0 [kernel]
init            0.0  0.0    1 /sbin/init
KTLS            0.0  0.0    2 [KTLS]
crypto          0.0  0.0    3 [crypto]
cam             0.0  0.0    4 [cam]
zfskern         0.0  0.0    5 [zfskern]
rand_harvestq   0.0  0.0    6 [rand_harvestq]
pagedaemon      0.0  0.0    7 [pagedaemon]
vmdaemon        0.0  0.0    8 [vmdaemon]
bufdaemon       0.0  0.0    9 [bufdaemon]
audit           0.0  0.0   10 [audit]
idle          200.0  0.0   11 [idle]
intr            0.0  0.0   12 [intr]
geom            0.0  0.0   13 [geom]
sequencer 00    0.0  0.0   14 [sequencer 00]
usb             0.0  0.0   15 [usb]
vnlru           0.0  0.0   16 [vnlru]
syncer          0.0  0.0   17 [syncer]
dhclient        0.0  0.0  416 dhclient: system.syslog (dhclient)
dhclient        0.0  0.0  419 dhclient: vtnet0 [priv] (dhclient)
dhclient        0.0  0.0  482 dhclient: vtnet0 (dhclient)
devd            0.0  0.0  483 /sbin/devd
syslogd         0.0  0.0  681 /usr/sbin/syslogd -s
ntpd            0.0  0.1  763 /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift
sshd            0.0  0.1  801 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups (sshd)
sendmail        0.0  0.1  804 sendmail: accepting connections (sendmail)
sendmail        0.0  0.1  807 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
cron            0.0  0.0  811 /usr/sbin/cron -s
sshd            0.0  0.1 8526 sshd: test [priv] (sshd)
sshd            0.0  0.1 8528 sshd: test@pts/0 (sshd)
getty           0.0  0.0  826 /usr/libexec/getty Pc ttyv0
getty           0.0  0.0  827 /usr/libexec/getty Pc ttyv1
getty           0.0  0.0  828 /usr/libexec/getty Pc ttyv2
getty           0.0  0.0  829 /usr/libexec/getty Pc ttyv3
getty           0.0  0.0  830 /usr/libexec/getty Pc ttyv4
getty           0.0  0.0  831 /usr/libexec/getty Pc ttyv5
getty           0.0  0.0  832 /usr/libexec/getty Pc ttyv6
getty           0.0  0.0  833 /usr/libexec/getty Pc ttyv7
sh              0.0  0.0 8529 -sh (sh)
ps              0.0  0.0 8532 /bin/ps -axwwwwwwwwo comm,pcpu,pmem,pid,command
cat             0.0  0.0 8533 cat


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 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 resident, ...
                    • 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 ...
                    • 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 re at pi po fr de sr in sy cs us sy id 3 1 0 255571 1582773 0 0 0 0 0 0 0 240 4039 81 0 1 99 3 1 0 255571 1582690 0 0 0 0 0 0 0 210 349 61 0 0 100 ...