The /sbin directory contains statically linked binaries (COFF format), mainly
for use by the system manager when /usr is not mounted and the shared
object libraries are not available. /sbin does not need to be in a typical
user's path.
There are a few commands in /sbin which are used by the system manager--
scu, savecore, etc.--which are only found in /sbin. Therefore, /sbin
should be in root's path, but after /usr/bin which also contains ls and df
in a dynamically linked, more efficient form than /sbin/ls and /sbin/df.
If a user requires /sbin in his path, it should be placed after /usr/bin.
I had asked why ps appeared to report a larger memory usage for
dynamically linked executables (/usr/sbin and /usr/bin) than for
statically linked executables (/sbin). Under ps, the VSZ appears to be
much larger for the binaries found in /usr/sbin because the ps utility
reports all the pages that are mapped in the shared address space,
including both the user's and those that are shared with all other
users. The RSS appears larger because of an undocumented way that
OSF/1 reports memory usage, and is basically incorrectly reported by ps
(DU 3.2c, at least). The significant fact is that executables from
/usr/sbin and /usr/bin are most efficient, regardless of the reported
memory usage from ps.
We recommend setting path in .cshrc so that rsh finds binaries in /usr/local
and $HOME/bin, not just those in the default path. We also include /usr/sbin
because it contains useful commands like ping and traceroute which help
users diagnose their connections to other sites. Our recommended path
for users is
( /usr/{bin,sbin} /usr/bin/X11 /usr/local/bin $HOME/bin . )
If the user needs /sbin, it should be after /usr/bin and /usr/sbin:
( /usr/{bin,sbin} /usr/bin/X11 /usr/local/bin $HOME/bin /sbin . )
A much belated thanks to Dr. Tom Blinn, UNIX Software Group, Digital
Equipment Corporation, and Anthony D'Atri. If you would like the
entire text of the emails, please mail me. The original post is at the end
of this message.
Anne M. Hammond
hammond_at_Colorado.EDU
---------------------
Original Posting:
> From hammond_at_jila02.Colorado.EDU Tue Jan 30 13:38:48 1996
> Date: Tue, 30 Jan 1996 13:38:32 -0700
> From: Anne Hammond <hammond_at_jila02.Colorado.EDU>
> To: alpha-osf-managers_at_sws1.ctd.ornl.gov
> Subject: /sbin vs /usr/sbin in path
> Cc: chela_at_jila.Colorado.EDU, hammond_at_jila02.Colorado.EDU
> Content-Length: 1714
>
> Hello OSF Managers,
>
> This question concerns which path to provide users in .cshrc. Since
> most of the commands in /sbin are found either in /usr/sbin or /usr/bin in
> a dynamically linked form, the question is whether it is more efficient to
> include the statically linked /sbin first in the path, or after /usr/bin
> and /usr/sbin.
>
> My understanding was that dynamically linked executables should use less
> system memory, since certain pages might be shared among users, indicating
> that the preferable path for users would include /usr/sbin instead of
> /sbin.
>
> However, the following output from ps showing the resident and virtual
> memory usage for two commands, df and sleep, shows that the dynamically
> linked executables use far more memory.
>
> USER PID %CPU %MEM VSZ RSS TTY S STARTED TIME COMMAND
>
> shared (dynamic):
> root 2460 0.0 0.1 1.23M 104K ttyp2 U 13:06:22 0:00.01 /usr/bin/df
> root 2479 0.0 0.1 1.22M 96K ttyp2 S 13:11:42 0:00.01 /usr/bin/sleep 60
>
> static:
> root 2430 0.0 0.0 216K 48K ttyp2 U 13:05:32 0:00.01 /sbin/df
> root 2476 0.0 0.0 152K 16K ttyp2 S 13:11:00 0:00.00 /sbin/sleep 60
>
>
> In the above usage, df shared uses 1.4M total memory, and df static uses
> 264K. sleep shared uses 2.1M total memory, and sleep static uses
> 168K. These may be simplistic examples, but they indicate that the
> dynamic versions are using far greater amounts of both resident and
> virtual memory, or swap space. This is under Digital UNIX V3.2C.
>
> If you have a comment on the above interpretation, or on which path to
> provide on a multiuser system, it would be very much appreciated.
>
> TIA,
> Anne Hammond
> hammond_at_Colorado.EDU
>
Received on Wed Apr 03 1996 - 00:51:06 NZST