Nov 201999

System tools – toys I have found

This topic deals with some system tools I’ve recently encounterd.  I figured everyone should know about them.  If you don’t see your favourite tool here, please add your comments.  In some cases, I’ve merely reproduced the first bit of the man page for the command in question.

Thanks to Lazarus\ from #FreeBSD on undernet irc for prompting this topic.

See also My list of things for a new box.


Last will list the sessions of specified users, ttys, and hosts, in reverse time order. Each line of output contains the user name, the tty from which the session was conducted, any hostname, the start and stop times for the session, and the duration of the session.  If the session is still continuing or was cut short by a crash or shutdown, last will so indicate.


This command will print the strings of printable characters in files.  Very useful.  strings is mainly useful for determining the contents of non-text files.


This command I’ve actually seen before and I’ve discussed it previously under swap files.  But I figured it should be included here.  I’ve not used this command often, so I can’t tell you much more about it.
su-2.02# swapinfo
Device      1K-blocks     Used    Avail Capacity  Type
/dev/wd0s1b    256000     9568   246368     4%    Interleaved


This command displays various systems statistics.  There are various options.   See man systat.  Here’s what it did for me.
                /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
     Load Average   

                /0   /10  /20  /30  /40  /50  /60  /70  /80  /90  /100
root         systat XXX


This displays and updates the information about the top cpu processes.  It’s dynamic and will refresh as you watch.  Here’s a short sample from entering top -S -I -q:
last pid: 28805;  load averages:  0.00,  0.00,  0.00          14:17:00
40 processes:  1 running, 39 sleeping
CPU states: 0.4% user, 0.0% nice,  1.5% system, 0.4% interrupt, 97.7% idle
Mem: 888K Active, 64K Inact, 100K Wired, 272K Cache, 1511K Buf, 1728K Free
Swap: 250M Total, 6980K Used, 243M Free, 3% Inuse

28805 root    -12 -20   624K   864K RUN      0:00  3.11%  1.72% top
    4 root     28   0     0K    12K update  16:27  0.04%  0.04% update
   95 root      2 -12   424K   404K select  13:37  0.04%  0.04% xntpd

the z tools

These tools work just the regular tools, but work on both compressed and uncompressed files.