[comp.sys.sgi] /debug directory -- what is it?

RUITERJR@FEDC06.FED.ORNL.GOV ("To Thine Own Self be True.") (10/01/90)

Hello all, 

      What is the /debug directory for?  I've looked through the
manuals and can't find anything on it.  Seems its taking up a rather
large portion of our disk space, but I've never seem much of it used.

      Anyway I can reduce its space (or is this even desirable?) ?

Thanks
 Jason Ruiter
 ORNL, FED
 (615) 574 1308
 ruiterjr@fedc04.fed.ornl.gov

ciemo@bananapc.wpd.sgi.com (Dave Ciemiewicz) (10/02/90)

In article <901001113629.21202546@FEDC06.FED.ORNL.GOV>, RUITERJR@FEDC06.FED.ORNL.GOV ("To Thine Own Self be True.") writes:
|> Hello all, 
|> 
|>       What is the /debug directory for?  I've looked through the
|> manuals and can't find anything on it.  Seems its taking up a rather
|> large portion of our disk space, but I've never seem much of it used.
|> 
|>       Anyway I can reduce its space (or is this even desirable?) ?
|> 
|> Thanks
|>  Jason Ruiter
|>  ORNL, FED
|>  (615) 574 1308
|>  ruiterjr@fedc04.fed.ornl.gov

Here we go again . . .  :^) /debug is an artificial filesystem interface to
the processes running on your IRIS.  The size of /debug represents your total
virtual memory of your system which is real memory + the size of your swap
partition.  In a way, it is consuming real disk space, however, without the
disk space set aside for your swap partion, you'd be very limited to the size
and number of processes you'd be able to run on your system.  In otherwords,
don't go messing with /debug or your swap partion unless you know what your
doing.  /debug is not really stealing any diskspace from / or /usr.

So what's /debug good for, you might ask?  Well, /debug provides a convenient
mechanism for manipulating processes as though they were files.  This interface
makes writing and implementing a debugger like dbx easier.  Note, if you
unmount /debug, you will not be able to run dbx.

/debug is similar to /proc which is being introduced in AT&T's System V.4.
You'll be seeing more of /proc (/debug) on other vendors systems as /proc
is adopted as a standard.  Silicon Graphics just happened to do something
like /proc sooner so we could better handle multiple process debugging from
a single dbx session.

For fun, you can do an "ls -l /debug" and a "ps -e" and you'll see that
the process ids correspond.

At the very least, you're just seeing what has been previously hidden on
just about every vendor's virtual memory workstation -- the swap partion.
Don't worry about it.

						--- Ciemo

pj@giraffe.asd.sgi.com (Paul Jackson) (10/02/90)

In article <901001113629.21202546@FEDC06.FED.ORNL.GOV>, RUITERJR@FEDC06.FED.ORNL.GOV ("To
Thine Own Self be True.") writes:
|>       What is the /debug directory for?  I've looked through the
|> manuals and can't find anything on it.  Seems its taking up a rather
|> large portion of our disk space, but I've never seem much of it used.

The /debug directory is an early version of AT&T's /proc directory.
It provides access to per-process information to debuggers and such.
It is a mapping into the file system name space of information that
is contained in various main memory data structures and regions.

It is NOT a mapping into the file system name space of any disk
resources, it consumes NO disk space and it has essentially nothing
to do with disks.  The "size" numbers that show up when you do an
"ls" are an indication, by an unusual means, of the total virtual
memory size of a process.

The /debug contents are much like the output of the "ps" command,
just a transient display of kernel data that the kernel supplies
on demand from existing data.

-- 

				Thanks, take care ...
				Paul Jackson (pj@asd.sgi.com), x1373

" ratcliffe) (10/02/90)

In article <901001113629.21202546@FEDC06.FED.ORNL.GOV> RUITERJR@FEDC06.FED.ORNL.GOV ("To Thine Own Self be True.") writes:
>Hello all, 
>
>      What is the /debug directory for?  I've looked through the
>manuals and can't find anything on it.  Seems its taking up a rather
>large portion of our disk space, but I've never seem much of it used.
>
>      Anyway I can reduce its space (or is this even desirable?) ?

neither of the other responses mentioned:  check out the DBG(4) man page on
the debug file system.
--
                                             daveus rattus   

                                   yer friendly neighborhood ratman

                              KOYAANISQATSI

   ko.yan.nis.qatsi (from the Hopi Language)  n.  1. crazy life.  2. life
       in turmoil.  3. life out of balance.  4. life disintegrating.  
         5. a state of life that calls for another way of living.

daveh@xtenk.asd.sgi.com (David A Higgen) (10/03/90)

In article <901001113629.21202546@FEDC06.FED.ORNL.GOV>, RUITERJR@FEDC06.FED.ORNL.GOV ("To Thine Own Self be True.") writes:
> Hello all, 
> 
>       What is the /debug directory for?  I've looked through the
> manuals and can't find anything on it.  Seems its taking up a rather
> large portion of our disk space, but I've never seem much of it used.
> 
>       Anyway I can reduce its space (or is this even desirable?) ?

Have you tried 'man debug'?   8-)

Actually I'm not sure if this finds it in releases earlier than 3.3 which you
may not be running yet.... try 'man dbg' if necessary. Meanwhile:

The /debug directory is a pseudo-filesystem used by dbx. The "files" you
see in it do not represent real files taking up disk space; they are 
representations of the address spaces of running processes. This gives
the debugger an easy way to access the text & data of processes it is working
on. The "size" of the /debug filesystem is just an indication of your 
machine's total available virtual space (real memory + swap).

You don't need to worry about its space, it is not using any disk blocks!


			Dave Higgen (daveh@xtenk.asd.sgi.com)