On Fri, Feb 6, 2009 at 10:19 AM, Valdemar Moreira Pavesi
<valdemar.pavesi at nsn.com> wrote:
> Hello,
>
> What does means 35% for /lib/libc.so.1  ?
>
>
>    root 15747 15432   0 10:55:45 pts/3       0:00 grep 7204
> # mdb -p ^C
> # df -k
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/dsk/c2t0d0s0    50772096 17470209 32794167    35%    /
> /devices                   0       0       0     0%    /devices
> ctfs                       0       0       0     0%    /system/contract
> proc                       0       0       0     0%    /proc
> mnttab                     0       0       0     0%    /etc/mnttab
> swap                 23552172     648 23551524     1%    /etc/svc/volatile
> objfs                      0       0       0     0%    /system/object
> sharefs                    0       0       0     0%    /etc/dfs/sharetab
> /usr/lib/libc/libc_hwcap2.so.1
>                     50772096 17470209 32794167    35%    /lib/libc.so.1
> fd                         0       0       0     0%    /dev/fd
> swap                  524288   40560  483728     8%    /tmp
> swap                 23551588      64 23551524     1%    /var/run
> /dev/dsk/c2t0d0s5    45131229   44886 44635031     1%    /software
> /dev/dsk/c2t0d0s6    8456523   81958 8290000     1%    /log
> /dev/dsk/c2t0d0s7    16921095 1771296 14980589    11%    /home/solid
> /dev/dsk/c2t1d0s0    25820759   30742 25531810     1%    /cdr
> /dev/dsk/c2t1d0s1    7230086 7230084       0   100%    /software/rtpcore
> /dev/dsk/c2t1d0s5     497312   30226  417355     7%    /global/user
> /dev/dsk/c2t1d0s4    49577044   49178 49032096     1%    /global/RtpTicketpool
> #

Note that ti's the same value as / .

What is happening is a bit of a (rather neat IMO) optimization.
During startup, the OS dynamically picks an optimized version of libc
for the running system (based on the capabilities of the cpu) and
overlays the default libc with that version (note it doesn't modify
anything on disk, it just 'hides' the default one).  In your case, it
determined that /usr/lib/libc/libc_hwcap2.so.1 was the best fit, and
so it loopback mounts that as /lib/libc.so.1.  Because of that, the
used/free/etc. stats for the 'filesystem' (which is just a single
file) are the same as the underlying filesystem (i.e. /).

 http://blogs.sun.com/darren/date/20041116#whats_this_lofs_mount_onto
goes into a bit more detail on the libc 'trick', and probably lots of
documentation is available on loopback mounts if you're more
interested in that.

Reply via email to