[comp.unix.ultrix] Hidden commands ?

envbvs@epb2.lbl.gov (Brian V. Smith) (10/07/89)

In article <14444@uhnix1.uh.edu>, rr@csuna.cs.uh.edu (Ravindran
Ramachandran) writes:

[...]
< core dumping when trying to allocate stack space. Now I know that
< what I'm going to say must be in one of the documents, but it's too
< darn well hidden for my liking (even a 'man -k' does not find it!).
< The command that I'm talking about is 'limit'. This permits you to
< manipulate and change your system quotas. I just stumbled over it
< with a little luck. Even a 'whereis' command is unable to trace it.
 
This is because the limit command is built-in to the shell (csh).
You won't find it in its own manual entry, but under 'man csh'.
That is also why 'whereis' doesn't find it.
Unfortunately, without reading the manual entry for csh entirely,
one cannot apriori know if a command is built-in or not.

< I love the system books for the VMS. We are also willing to purchase
< any ULTRIX docs that come, so, I hope that at least a master index
< of all keywords is created, stating which of these documents contain
< them.

There is a master index in the Ultrix manuals, and fortunately it does
show the built-in commands in their own right.

< Is there some command (other than vmstat) which shows the actual
< memory statistics; the memory size, et al. Something like 
< $show memory
< on a VMS. I have 12 MB of physical memory, and have rebuilt the
< kernel with that configuration. I want to check to make sure that
< I've done the right thing. 
< 
< 
I believe the only way to find how much physical memory you have is to
watch it when it boots up or look in the error log file for the
boot message entry:

ultrix: uerf -r 300

********************************* ENTRY     1.
*********************************

----- EVENT INFORMATION -----

EVENT CLASS                             OPERATIONAL EVENT
OS EVENT TYPE                  300.     SYSTEM STARTUP
SEQUENCE NUMBER                  6.
OPERATING SYSTEM                        ULTRIX 32
OCCURRED/LOGGED ON                      Mon Oct  2 07:37:00 1989 PDT
OCCURRED ON SYSTEM                      epb2
SYSTEM ID                 x08000000
SYSTYPE REG.              x01010000
                                        FIRMWARE REV = 1.
PROCESSOR TYPE                          KA630
MESSAGE                                 Ultrix-32 V3.0 (Rev 64) UWS V2.0 (BL
                                         _10.0) System #2: Mon Mar 20 11:11:38
                                         _PST 1989
                         here   >>>>    real mem  = 9433088
                                        avail mem = 7054336
                                        using 460 buffers containing 943104
                                         _bytes of memory
                                        MicroVAX-II with an FPU
                                   ....
_____________________________________
Brian V. Smith    (bvsmith@lbl.gov)
Lawrence Berkeley Laboratory
I don't speak for LBL, these non-opinions are all mine.

watch it when it boots up or

alan@shodha.dec.com ( Alan's Home for Wayward Notes File.) (10/07/89)

In article <14444@uhnix1.uh.edu>, rr@csuna.cs.uh.edu (Ravindran
Ramachandran) writes:

> Is there some command (other than vmstat) which shows the actual
> memory statistics; the memory size, et al. Something like 
> $show memory
> on a VMS. I have 12 MB of physical memory, and have rebuilt the
> kernel with that configuration. I want to check to make sure that
> I've done the right thing. 

	As Brian Smith pointed out you can use uerf(8) look at
	the boot listing to find the memory size.

	If you know what to command to feed it you can use adb
	on VAX systems and dbx on RISC systems to look at what 
	the kernel keeps track of (_physmem for example).  Or
	you can write a program that uses the namelist in /vmunix
	and then read from /dev/kmem the things you're interested
	in.

-- 
Alan Rollow				alan@nabeth.enet.dec.com

graham@fuel.dec.com (kris graham) (10/11/89)

> I believe the only way to find how much physical memory you have is to
> watch it when it boots up or look in the error log file for the
> boot message entry:
> 
> ultrix: uerf -r 300

> watch it when it boots up or


Try..

dd if=/dev/mem of=/dev/null bs=1024 conv=noerror

-- 
Christopher Graham          
Digital Equipment Corp            
Ultrix Resource Center                                             
New York City.

hubcap@hubcap.clemson.edu (Mike Marshall) (10/11/89)

From article <1501@riscy.dec.com>, by graham@fuel.dec.com (kris graham):
> Try..
> 
> dd if=/dev/mem of=/dev/null bs=1024 conv=noerror

What a cool idea! It took forever on our 8810 with 114 meg though.

t. patterson (tp@decwrl.dec.com) posted this a while back - it works
in a flash:


#!/bin/sh
#    show amount of memory on machine in kilobytes
machine=vax
[ -f /bin/machine ] && {
	machine=`/bin/machine`
}
x=`echo "&physmem/D ; quit " | dbx -k /vmunix /dev/mem | tail -1 |\
	 awk '{print  $2}'`
case "${machine}" in
    vax)
	# a little bit of round-off error will creep in...
	echo `expr $x /  2` " K"
	;;
    mips)
	echo `expr $x \* 4` " K"
	;;
    *)
	exit 1
	;;
esac
exit 0